简体   繁体   English

从.mov转换为mp4文件时,ffmpeg中的-pix_fmt发生错误

[英]error occured on -pix_fmt in ffmpeg while converting from .mov to mp4 file

I am trying to convert .mov to .mp4 using ffmpeg my command is : 我正在尝试使用ffmpeg将.mov转换为.mp4,我的命令是:

ffmpeg -i input.mov -vcodec libx264 -acodec copy output.mp4

but its giving me error like this 但是它给我这样的错误

    [buffer @ 00000000059bf480] Unable to parse option value "-1" as pixel format
Last message repeated 1 times

[buffer @ 00000000059bf480] Error setting option pix_fmt to value -1. [buffer @ 00000000059bf480]将选项pix_fmt设置为值-1时出错。 [graph 0 input from stream 0:4 @ 00000000043fd8a0] Error applying options to the filter. [来自流0:4的图形0输入@ 00000000043fd8a0]将选项应用于过滤器时出错。 Error opening filters! 打开过滤器时出错!

even I tried for another command 即使我尝试了另一个命令

ffmpeg -i input.mov -vcodec copy -acodec copy output.mp4

but it converts only some part and first part is blank with sound then after some time picture is coming.. 但是它只转换一部分,并且第一部分是空白的声音,然后经过一段时间后。

I have two Q's 我有两个Q

1] for first command what is -pix_fmt and what value to be set for ? 1]对于第一个命令,-pix_fmt是什么,要设置什么值?

2] for second command why it was giving only some part, as I am copying everything vcodec as well acodec.. 2]对于第二个命令,为什么只给出一部分内容,因为我正在复制所有vcodec以及acodec。

please guide me ..!! 请指导我..!

Probably, selected profile does not support 4:2:2. 可能是所选配置文件不支持4:2:2。

So, you need to mention the 4:2:0 by adding "-pix_fmt yuv420p" to the command. 因此,您需要通过在命令中添加"-pix_fmt yuv420p"来提及4:2:0。

Hope this will fix it. 希望这会解决它。

FFmpeg's "Unable to parse option value '-1' as pixel format" does occur with corrupted or harder to parse videos (although doubted on the mailing list). FFmpeg的“无法将选项值'-1'解析为像素格式”的确发生在视频损坏或解析困难的情况下(尽管在邮件列表中存有疑问 )。 I've had it, and the best comment on that is to try increasing analyzeduration - as in this ticket . 我已经知道了, 对此最好的评论是尝试增加分析能力-如这张票所示 Some ffmpegs/ avconvs also give a note about tinkering with probesize: 一些ffmpegs / avconvs还提供了有关修改probesize的说明:

Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 720x576, 869 kb/s): unspecified pixel format Consider increasing the value for the 'analyzeduration' and 'probesize' options 找不到流0的编解码器参数(视频:h264(avc1 / 0x31637661),无,720x576,869 kb / s):未指定像素格式请考虑增加“ analyzeduration”和“ probesize”选项的值

Well, both didn't work on a file where I tried it: 好吧,两个都无法在我尝试过的文件上运行:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c36940] multiple edit list entries, a/v desync might occur, patch welcome [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c36940] max_analyze_duration 5000000 reached [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c36940]多个编辑列表条目,可能会发生音频/视频不同步,欢迎使用补丁[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c36940] max_analyze_duration 5000000

but other people's mileage may vary. 但是其他人的里程可能会有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM