ffmpeg Using -movflags faststart

27,267

Solution 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.

Solution 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.

Share:
27,267
user3571514
Author by

user3571514

Updated on July 05, 2022

Comments

  • user3571514
    user3571514 almost 2 years

    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 ?)

  • Zombo
    Zombo about 10 years
    The + is no longer required, if it ever was. Using it or not produces identical files.
  • Gyan
    Gyan about 8 years
    The + sign indicates that ffmpeg should set the specified value in addition to any values that the MOV/MP4 muxer will automatically set during the course of executing the command. Omitting it means ffmpeg will reset the flags to their default values, and only toggle the state of faststart. Most MP4s generation doesn't involve the other flags so usually it doesn't make a difference.