Conversion from mjpeg to mp4 (libx264) with FFmpeg

那年仲夏 提交于 2021-01-29 10:56:57

问题


If you convert from mjpeg to mp4 (libx264) with FFmpeg, Playback can not be performed on Windows · Mac.

Thumbnails are not displayed on the icon. However, with the HTML5 Video tag, playback is possible.

Why? Please tell me if you understand. Thank you.

ffmpeg -i source_file.mov -b 4000k -vcodec libx264 destination_file.mp4

回答1:


The usual reason for this is the pixel format. The MJPEG may have 4:2:2 or 4:4:4 chroma sampling which most players don't support in H264. So try

ffmpeg -i source_file.mov -pix_fmt yuv420p -b:v 4000k -c:v libx264 destination_file.mp4


来源:https://stackoverflow.com/questions/52396602/conversion-from-mjpeg-to-mp4-libx264-with-ffmpeg

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