MP4 Not Playing Before Fully Loaded on Jwplayer

无人久伴 提交于 2019-12-11 06:09:47

问题


I've searched a lot but couldn't find any solution to the situation i'm in

What i do is i watermark video using ffmpeg.exe via php script but the output file doesn't play on jwplayer. i've found out that it is an encoding issue and i tried QTIndexSwapper but it is for windows. the input files i used is working nice on jwplayer but after watermark not working here is the code for ffmpeg i used

$ffmpeg_bin -i input.mp4 -s 320x240 -vf 'movie=$watermarkx $watermark_pos' -c:v libx264 -c:a aac -strict -2 $final_name   2<&1

NOTE: i used ffmpeg.exe


回答1:


Run this tool on your file - http://renaun.com/blog/2010/06/qtindexswapper-2/, it has to do with an encoding issue.




回答2:


You can try to add -movflags faststart to your command line:

$ffmpeg_bin -i input.mp4 -s 320x240 -vf 'movie=$watermarkx $watermark_pos' -movflags faststart -c:v libx264 -c:a aac -strict -2 $final_name   2<&1

You can also use this option for existing videos without the need to re-encode:

$ ffmpeg -i input.mp4 -c copy -movflags faststart output.mp4

Without this option the index atom (moov) is written at the end of the file and the player can't start playing until it's download / read it. Once encoding finishes this option moves the moov to the beginning of the file and allows the player to start playing immediately. FYI it adds a couples a seconds to the encode process.




回答3:


QTIndexSwapper made my file unplayable.

But you could also try to reencode the file with Handbrake. Just make sure that you have "Web optimized" checked.



来源:https://stackoverflow.com/questions/21676825/mp4-not-playing-before-fully-loaded-on-jwplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!