ffmpeg Using -movflags faststart

做~自己de王妃 提交于 2021-02-18 08:07:33

问题


I tried to use the command -movflags faststart

And got the following error:

Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\uploads\1\videos>ffmpeg -i simple1.mp4 -codec copy -map 0 -movflags faststart output.mp4

-movflags faststart output.mp4 ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers built on Nov 6 2011 22:02:08 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger - -enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable- libxvid --enable-zlib libavutil 51. 24. 0 / 51. 24. 0 libavcodec 53. 28. 0 / 53. 28. 0 libavformat 53. 19. 0 / 53. 19. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 47. 0 / 2. 47. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'simple1.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf54.29.104 Duration: 00:02:32.81, start: 0.000000, bitrate: 1166 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [ SAR 1:1 DAR 427:240], 1064 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, s16, 93 kb /s Metadata: handler_name : [mp4 muxer @ 04179D00] [Eval @ 0027DAB8] Undefined constant or missing '(' in 'f aststart'

[mp4 muxer @ 04179D00] Unable to parse option value "faststart"

[mp4 muxer @ 04179D00] Error setting option movflags to value faststart.

Output #0, mp4, to 'output.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf54.29.104 Stream #0:0(und): Video: h264, yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-3 1, 1064 kb/s, 29.97 fps, 90k tbn, 29.97 tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac, 44100 Hz, mono, 93 kb/s Metadata: handler_name : Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy)

Could not write header for output file #0 (incorrect codec parameters ?)


回答1:


The copyright date on your source code snapshot, as well as the build date of your binary (2011) indicate that the faststart feature had not yet been implemented in the FFmpeg codebase, which didn't happen until late last year, according to the source code; you might need a newer version of the program.




回答2:


Apart from the plus sign that is missing your command line, you might be trying to apply the flag to the input file, i.e. before the -i <filename>. Trying changing the order of the flags in your command line, and working with the latest version of FFmpeg.



来源:https://stackoverflow.com/questions/23419351/ffmpeg-using-movflags-faststart

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