[FFmpeg-user] Convert MPEG-PS progressive to Interlaced
adf.lists at gmail.com
Tue Jan 31 16:09:36 EET 2017
kumar vikram wrote:
>>> But the op specifically asked for field-encoding.
>> Note to everybody (including me): Please try not to guess - if the
>> op still needs the information, he can post his command line and
>> console output and we can try to answer.
> ffmpeg.exe -y -i INPUT_FILE -c:v mpeg2video -flags +ildct+ilme -vf
> scale=interl=1,tinterlace=merge,fieldorder=tff OUTPUT_FILE
You forgot the output - also I doubt this would make 422 from 420 so
it's not the command that made the analyzed stream?
If your input is mpeg2 you shouldn't need tinterlace=merge in addition
Paul said to use weave and he is a dev so knows.
You would only really need to weave if the input was fields and the
output of ffmpeg mpeg2decoder will always be weaved.
If you do need to convert 420 to 422 then scale=interl=1 is correct, but
not quite right - since ilpack was removed I don't know how you would be
able to get it perfect. The difference is hard to see and to do with
chroma subsampling positions being different for interlaced and progressive.
> (mpeg2 video is not necessarily frame-based.)
> Okay I think I have left too much scope for confusion here. So let me
> just clarify a bit.
> Attached two snapshots from elecard stream analyzer.
> 1. ps_interlaced.png - is for the the I-P filed based interlaced
> stream. 2. ps_ffmpeg_output.png - is for the converted stream using
> above command.
> The rect marked in red is the point which is the problem.
> As per my understanding of the PS spec(IEC-13818-2), if
> picture_structure is set to 3, it means frame picture.
I didn't read the spec but 3 may well be correct as frame coded
interlaced is what mpeg2 interlaced streams often are. You can see it's
not progressive and the field dominance of the weave is indicated.
> As you can see in ps_interlaced.png, the field picture_structure is
> set to either 1 or 2 which means top or bottom field.
> I have tried the above command and several other options which I
> could found from google.
> Hope someone could provide me the right solution (if any such
> solution exists with ffmpeg) :)
As has been said ffmpeg will not make field coded interlaced but will
make frame coded interlaced.
More information about the ffmpeg-user