1

I need the FFMPEG command which could convert a 1080p to 1080i (both top bottom and bottom up) for H264 codec. Please help.

Thanks

2
  • Kindly explain your question in detail.
    – Irfan
    Mar 18, 2014 at 5:49
  • in fact you are looking for the tinterlace video filter. I will provide a full example in few minutes .... Mar 18, 2014 at 8:10

2 Answers 2

7

After some test, it looks like the "tinterlace" video filter describe here doesn't work in that case.

I finally produce a a stream x264 using MBAFF encoding mode with TF,BF order using

ffmpeg -i bbb_1min.ts -c:v libx264 -pix_fmt yuv420p -flags +ilme+ildct testi.mp4

To select the field you want, you have to specify the -x264opts -bff=1 for Bottom first or -x264opts tff=1 laike in the 2 command line below:

FOR Bottom Field First(BFF): 
ffmpeg -i ~/videos/bbb_1min.ts -pix_fmt yuv420p -c:v libx264 -flags +ilme+ildct -x264opts bff=1 ~/videos/testi.mp4

FOR Top Field First(TFF): 
ffmpeg -i ~/videos/bbb_1min.ts -pix_fmt yuv420p -c:v libx264 -flags +ilme+ildct -x264opts tff=1 ~/videos/testi.mp4

And not sure that 'perfectly' separate field encoding is available, because I found the following sentence: "Enable interlaced encoding and specify the top field is first. x264's interlaced encoding uses MBAFF, and is inherently less efficient than progressive encoding. For that reason, you should only encode interlaced if you intend to display the video on an interlaced display (or can't deinterlace the video before sending it to x264). Implies --pic-struct. " here

Tested with:

    ffmpeg version N-61580-g3d48cbc Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 19 2014 15:27:33 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
4
  • I'm so glad they removed the interlaced-support from H.265. No more MBAFF, hooray! +1 BTW Mar 18, 2014 at 9:22
  • maybe tell the ffmpeg devs that tinterlace doesn't work enough?
    – rogerdpack
    Mar 18, 2014 at 15:03
  • @rogerdpack yes I agree, but first I will test that feature on the ffmpeg trunk to be sure and report the issue if it's still not working! Mar 18, 2014 at 15:36
  • @rogerdpack, I finally found how to correctly pass the tff/bff flag to x264 ! Mar 19, 2014 at 17:51
2

For me work this:

ffmpeg -i city_4cif.y4m -vf "tinterlace=5" city_4cif_i.y4m

List of diffent interlacing modes (see 38.149)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.