[FFmpeg-user] Issue using "-flags2 +mixed_refs" option while converting .tif file to .mp4 file
Lou
lou at lrcd.com
Thu Apr 16 07:55:06 CEST 2015
On Wed, Apr 15, 2015, at 04:24 PM, Ali Mohammed wrote:
> Hello,
>
> I have recently install ffmpeg version 2.3.3 from source on Redhat linux
> 6.5.I am getting the below error while trying to convert a .tif file to
> .mp4 file using the below syntax.
Why do you want to encode a single image as a H.264 video?
> # /usr/local/ffmpeg/bin/ffmpeg -r 10 -i rain-26Aug2011_0Z.tif -s 1280x720
> -vcodec libx264 -crf 36 -flags +loop+mv4 -cmp 256 -partitions
> +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -subq 7 -trellis 1 -refs 5
> -bf 0 -flags2 +mixed_refs -coder 0 -me_range 16 -g 250 -keyint_min 25
> -sc_threshold 40 -i_qfactor 0.71 -qdiff 4 -acodec libfaac -ac 2 -ar 44100
> -ab 128000 rain-26Aug2011_0Z.mp4
There is no need to declare a legion of mixed up x264 encoding options.
That's what the x264 encoding presets are for. Generally you use the
slowest preset that you have patience for.
Your build appears to support libfdk_aac, which is better than libfaac,
so use that instead. However, your input has no audio so you can omit
audio encoding options.
Use -framerate instead of -r for the image file demuxer.
A crf value of 36 is quite high. It may look crappy. Use the highest
value that still gives an acceptable quality level. If you're happy with
36, then of course feel free to use that value.
So your command could look like this (ignoring the fact that your input
is a single image):
ffmpeg -framerate 10 -i images_%03d.tif -vcodec libx264 -crf 23 -preset
slow output.mp4
> ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers
It is recommended that most users use ffmpeg from git master if
possible. If you don't want to compile then recent static builds are
available via the FFmpeg download page.
> built on Apr 14 2015 17:41:47 with gcc 4.4.7 (GCC) 20120313 (Red Hat
> 4.4.7-11)
> configuration: --prefix=/usr/local/ffmpeg --enable-gpl
> --enable-version3
> --enable-nonfree --disable-static --enable-shared --disable-debug
> --enable-libass --enable-libfdk-aac --enable-libmp3lame
> --enable-libtheora
> --enable-libvorbis --enable-libvpx --enable-libx264 --enable-x11grab
None of your other configure options need --enable-version3.
> WARNING: library configuration mismatch
This warning can indicate a broken build.
[...]
> Codec AVOption b (set bitrate (in bits/s)) specified for output file #0
> (rain-26Aug2011_0Z.mp4) has not been used for any stream. The most likely
> reason is either wrong type (e.g. a video option with no video streams)
> or
> that it is a private option of some encoder which was not actually used
> for any stream.
This message is from using audio encoding options but without an audio
input stream.
> No pixel format specified, yuv444p for H.264 encoding chosen.
> Use -pix_fmt yuv420p for compatibility with outdated media players.
This message should not be ignored if it applies to you or your viewers.
More information about the ffmpeg-user
mailing list