[FFmpeg-user] Recoding H.264/4.2.2 to H.264/4.2.0
Andy Furniss
adf.lists at gmail.com
Thu Jun 8 02:36:39 EEST 2017
Mike Brown wrote:
> On Wed, Jun 07, 2017 at 03:00:12PM +0100, Andy Furniss wrote:
>> Mike Brown wrote:
>>> On Wed, Jun 07, 2017 at 12:03:33PM +0200, Moritz Barsnick wrote:
>>>> On Tue, Jun 06, 2017 at 21:54:41 -0500, Mike Brown wrote:
>>>>> If given an H.264/4.2.2 elementary stream, can ffmpeg recode
>>>>> it to H.264/4.2.0. If so, what would the command line be?
>>>>
>>>> $ ffmpeg -i myelementarystream_422.h264 -c:v libx264 [ other
>>>> x264/encoding options ] -pix_fmt yuv420p outfile.h264
>>>
>>> Thanks, I appreciate the response.
>>
>> OK as long as it's progressive, interlaced would need different,
>> maybe (untested/from memory)
>>
>> -vf scale=interl=1,format=yuv240p
>>
>> plus specific interlace encode options to libx264.
>
> It is interlaced and I need to keep it that way (2:3 pulldown
> video).
I don't have any experience with pulldown.
> Is there a list of all the libx264 options online?
As you don't need a container then I think all you will need is to use
something like -
.... -x264-params tff=1 ...
if the source is top field first or bff=1 otherwise.
That should make libx264 use mbaff - which you should seen in the output.
There's probably a way to do it without using x264 options, I am just
pasting from old notes.
Historically, IME ffmpeg has trouble with generating and or determining
framerate with raw h264 streams - I don't know if that will be an issue
for you or not.
options after -x264-params are listed by x264 --fullhelp, but you need
to change the format eg, --tff becomes tff=1.
More information about the ffmpeg-user
mailing list