[FFmpeg-user] Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Mark Himsley mark at mdsh.com
Mon Sep 5 00:14:32 CEST 2011


On 04/09/2011 19:01, FrancoisMace wrote:
> Hello Mark,
>
> Thank you for your answer. Your completely right about what I am trying to
> do:
>
> I have a bunch of files formated in v210. Each file refers to one of the two
> fields of the image, the even numbered one corresponds to the bottom field
> and the odd one correspond to the top field.
>
> I have taken a look at your suggestion to use the mp filter and to go for a
> more recent version of the ffmpeg software.  To do so, I have downloaded an
> available windows build (the latest 32 bit static build from
> http://ffmpeg.zeranoe.com/builds/).
>
> However I am still experiencing some odd behavior:
>
> Here is the command line launched and the obtained result:
>
> ./ffmpeg.exe -s 1920x540 -vcodec v210 -f image2 -pix_fmt yuv422p16le -i
> "PATH_TO_FILES\ParkRun_YUV10_1080i25\PR_1080i_%05d.v210" -pix_fmt
> yuv422p10le -vcodec v210 -vf mp=tinterlace:0 -vcodec v210 -pix_fmt
> yuv422p16le -r 25 -s 1920x540 "test.avi"
>
> ffmpeg version N-32290-g6fc1299, Copyright (c) 2000-2011 the FFmpeg
> developers
>    built on Sep  2 2011 00:40:00 with gcc 4.6.1
>    configuration: --enable-gpl --enable-version3 --enable-memalign-hack
> --enable-
> runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
> --enable-libo
> pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
> --enable-libgsm --
> enable-libmp3lame --enable-libopenjpeg --enable-librtmp
> --enable-libschroedinger
>   --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx
> --enabl
> e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
>    libavutil    51. 14. 0 / 51. 14. 0
>    libavcodec   53. 12. 0 / 53. 12. 0
>    libavformat  53. 10. 0 / 53. 10. 0
>    libavdevice  53.  3. 0 / 53.  3. 0
>    libavfilter   2. 37. 0 /  2. 37. 0
>    libswscale    2.  0. 0 /  2.  0. 0
>    libpostproc  51.  2. 0 / 51.  2. 0
> Input #0, image2, from
> 'PATH_TO_FILE\ParkRun_YUV10_1080i25\PR_1080i_%05d.v210':
>    Duration: 00:00:20.16, start: 0.000000, bitrate: N/A
>      Stream #0.0: Video: v210, yuv422p10le, 1920x540, 25 tbr, 25 tbn, 25 tbc
> File 'test.avi' already exists. Overwrite ? [y/N] y
> Incompatible pixel format 'yuv422p16le' for codec 'v210', auto-selecting
> format
> 'yuv422p10le'
> [buffer @ 01ED2500] w:1920 h:540 pixfmt:yuv422p10le tb:1/1000000 sar:0/1
> sws_param:
> [mp @ 01ED2AC0] This is a unholy filter, it will be purified by the ffmpeg
> exorcist team which will change its syntax from dark -vf mp to light -vf.
> Thou shalst not make spells or scripts that depend on it
> [buffersink @ 01ED2780] auto-inserting filter 'auto-inserted scaler 0'
> between the filter 'Parsed_mp_0' and the filter 'out'
> [mp @ 01ED2AC0] auto-inserting filter 'auto-inserted scaler 1' between the
> filte r 'src' and the filter 'Parsed_mp_0'
> [scale @ 01ED3960] w:1920 h:540 fmt:yuv422p10le ->  w:1920 h:540 fmt:yuv420p
> flags:0x4
> [scale @ 01ED29A0] w:1920 h:1080 fmt:yuv420p ->  w:1920 h:1080
> fmt:yuv422p10le flags:0x4
> Output #0, avi, to 'test.avi':
>    Metadata:
>      ISFT            : Lavf53.10.0
>      Stream #0.0: Video: v210 (v210 / 0x30313276), yuv422p10le, 1920x1080,
> q=2-31
> , 200 kb/s, 25 tbn, 25 tbc
> Stream mapping:
>    Stream #0.0 ->  #0.0 (v210 ->  v210)
> Press [q] to stop, [?] for help
> [buffer @ 01ED2500] request_frame() called with no available frame!
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  1 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  1 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
>      Last message repeated 46 times
> request_frame() called with no available frame!
> frame=    1 fps=  0 q=0.0 Lsize=    5406kB time=00:00:00.04
> bitrate=1107060.8kbi
> ts/s dup=0 drop=46
>
>
>
> Two behaviors I cannot explain:
>
> - I do not undersand why a scaler filter is automatically insterted two
> times (goint from 422 to 420 and back)

Looking at the source, the mp tinterlace filter accepts these mplayer 
formats only: IMGFMT_YV12, IMGFMT_IYUV, IMGFMT_I420.

And in the shim between FFmpeg and mplayer filter all three equate to 
FFmpeg's YUV420P.

Therefore the FFmpeg filter chain has done the conversion to the only 
available format in the tinterlace filter.

Stefano's new tinterlace filter will do all these - so, not the 10 bit 
you're after, but better than 420.

  PIX_FMT_YUV420P,  PIX_FMT_YUV422P,  PIX_FMT_YUV444P,
  PIX_FMT_YUV444P,  PIX_FMT_YUV410P,  PIX_FMT_YUVA420P,
  PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P,
  PIX_FMT_YUVJ440P, PIX_FMT_GRAY8

Now I'm awake and can see you're using the EBU test material. Good man :-)

> - I do not understand why the output file size does not increase during the
> encoding process.

I don't quite understand your question.

But, at the input part you are not specifying the rate of your image 
stream and therefore FFmpeg is defaulting to 25. You have 50 frames per 
second at the input and 25 frames per second at the output, so add -r 50 
before the -i. Then FFmpeg won't drop half your frames (the "drop=46" at 
the end of your output.

-- 
Mark



More information about the ffmpeg-user mailing list