使用FFmpeg从mjpeg转换为mp4(libx264) [英] Conversion from mjpeg to mp4 (libx264) with FFmpeg

查看:173
本文介绍了使用FFmpeg从mjpeg转换为mp4(libx264)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您使用FFmpeg将mjpeg转换为mp4(libx264),在Windows·Mac上无法执行播放.

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

缩略图未显示在图标上.但是,使用HTML5视频代码可以播放.

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

推荐答案

通常的原因是像素格式.MJPEG可能具有4:2:2或4:4:4色度采样,这是大多数播放器在H264中不支持的.所以尝试

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

这篇关于使用FFmpeg从mjpeg转换为mp4(libx264)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆