Progressive Prores file created by using ffmbc with yadif treated as interlaced by FCP7

400 views
Skip to first unread message

Robert Krüger

unread,
Oct 22, 2012, 11:41:45 AM10/22/12
to ffmbc-...@googlegroups.com
I have transcoded an MTS file, which should be 25 fps progressive
segmented frame material, to progressive prores by a command line like
this:

ffmbc -i ~/tmp/interlaced-problem/00450_Theater.MTS -vcodec prores -vf
yadif -t 10 -an -y
~/tmp/interlaced-problem/00450_Theater_yadif_noargs.mov
FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
Input #0, mpegts, from
'/Users/krueger/tmp/interlaced-problem/00450_Theater.MTS':
Duration: 00:00:45.82, start: 0.692033, bitrate: 36879 kb/s
Program 1
Stream #0.0[0x1011](und): Video: h264 (High), yuv420p, 1920x1080i
tff [PAR 1:1 DAR 16:9], 25.00 fps
Stream #0.1[0x1100](und): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2[0x1200](und): Subtitle: pgssub
Incompatible pixel format 'yuv420p' for codec 'prores', auto-selecting
format 'yuv422p10le'
[yadif @ 0x7fe141c05d20] mode:0 parity:-1 auto_enable:0
[scale @ 0x7fe141c06160] w:1920 h:1080 fmt:yuv420p -> w:1920 h:1080
fmt:yuv422p10le flags:0x4
Output #0, mov, to
'/Users/krueger/tmp/interlaced-problem/00450_Theater_yadif_noargs.mov':
Metadata:
encoder: FFmbc 0.7
Stream #0.0(und): Video: prores, yuv422p10le, 1920x1080p [PAR 1:1
DAR 16:9], 183500 kb/s, 25.00 fps
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
frame= 250 fps= 8 q=1.3 Lsize= 222995kB time=00:00:10.00
bitrate=182677.9kbits/s
video:222993kB audio:0kB global headers:0kB muxing overhead 0.001196%

The resulting file is displayed as progressive by ffmbc but imported
into FCP7 it has the value "Upper (Odd)" in the field dominance column
and sequences where it is dragged to offer to make themselves
compatible with the file and are then converted to interlaced
sequences. If I use the file in progressive sequences the picture is
screwed up with typical stair artefacts on edges. I even tried to
remux and then retranscode the file with ffmbc but the resulting files
behave the same way (especially the latter surprised me).

I can export still frames from the file which look like they are
progressive (there are no artefacts in motion) but something in the QT
file makes FCP think it is interlaced. Opening the same file with
Compressor it is displayed as progressive. Transcoding it with
compressor, it looks fine and FCP7 accepts it.

I have put a small test file in the dropbox folder you have access to,
in case you want to reproduce this.

Regards,

Robert

Robert Krüger

unread,
Oct 22, 2012, 12:21:06 PM10/22/12
to ffmbc-...@googlegroups.com
On Mon, Oct 22, 2012 at 5:41 PM, Robert Krüger <kru...@lesspain.de> wrote:
> I have transcoded an MTS file, which should be 25 fps progressive
> segmented frame material, to progressive prores by a command line like
> this:
>
I just remuxed the file created using Compressor with ffmbc and it is
also displayed as interlaced in FCP7.

Looking at the file structure I noticed that the "fiel" atom is
missing in the file written by ffmbc
(https://developer.apple.com/quicktime/icefloe/dispatch019.html#fiel).

I created a Prores file from the same MTS file using ffmpeg and it is
recognized as progressive by FCP7, OTOH my source file is treated as
50 fps and every other frame skipped. But the resulting file does not
have the fiel atom set either, so that does not seem to be the reason.

Weird, it is hard to believe nobody would have run into this earlier
as I thought there must be more people out there using ffmbc to create
Prores files for use with FCP7.

Maybe I'm missing something.

Robert Krüger

unread,
Oct 26, 2012, 8:11:59 AM10/26/12
to ffmbc-...@googlegroups.com
some more observations:

It does not seem to be related to the fact that the original video is
interlaced. I just transcoded a 25p XDCAM EX sample generated with
FCP7 once with ffmbc and once with Compressor. The one transcoded
using compressor is displayed as progressive.

As buggy as it is, it is not too unlikely that FCP7 is simply wrong
here but there must be something different in the files that
compressor produces.

Some files to reproduce this:

Original XDCAM 25p file:

https://dl.dropbox.com/u/33388463/fcp7_xdcam_ex_1080_25p_1s.mov

File recoded to prores using command line ffmbc -i <file> -vcodec
prores -an <outfile>:

https://dl.dropbox.com/u/33388463/fcp7_xdcam_ex_25p_recoded-prores-ffmbc.mov

File recoded to prores using Apple Compressor:

https://dl.dropbox.com/u/33388463/fcp7_xdcam_ex_1080_25p_1s-Apple%20ProRes%20422.mov

Field-Dominance in FCP7:

https://dl.dropbox.com/u/33388463/fcp-file-difference.png

Two pixel-by-pixel screenshots from FCP7 demonstrating what this does
to an editing project I'm helping with (unfortunately I stumbled over
this problem rather late when I noticed that all thin edges of
buildings etc. looked rather bad and checked against the raw footage
and the prores clips in the FCP7 viewer, where they look fine):

The 25p file (which FCP thinks is interlaced) put on a 25p sequence:

https://dl.dropbox.com/u/33388463/file-on-25p-sequence.png

And a similar screenshot from the same file on a 50i sequence:

https://dl.dropbox.com/u/33388463/file-on-50i-sequence.png

Another thing: I tried different codecs (mpeg4, png) and for them also
the files generated from the progressive sample using ffmbc are
displayed in FCP7 as interlaced, so this is not limited to prores but
then again, it might be a combination of several factors, you never
know.

(a bit later)

I hacked a patch that changes ffmbc's behaviour to always write the
fiel atom, i.e. also for progressive files and that fixes the problem
for me. Patch is attached.

Regards,

Robert
write-fiel-atom-for-progressive.patch

Baptiste Coudurier

unread,
Nov 1, 2012, 5:18:00 AM11/1/12
to ffmbc-...@googlegroups.com
Hi Robert,

On Oct 26, 2012, at 5:11 AM, Robert Krüger <kru...@lesspain.de> wrote:

> On Mon, Oct 22, 2012 at 6:21 PM, Robert Krüger <kru...@lesspain.de> wrote:
>> On Mon, Oct 22, 2012 at 5:41 PM, Robert Krüger <kru...@lesspain.de> wrote:
>>> I have transcoded an MTS file, which should be 25 fps progressive
>>> segmented frame material, to progressive prores by a command line like
>>> this:
>>>
>> I just remuxed the file created using Compressor with ffmbc and it is
>> also displayed as interlaced in FCP7.
>>
>> Looking at the file structure I noticed that the "fiel" atom is
>> missing in the file written by ffmbc
>> (https://developer.apple.com/quicktime/icefloe/dispatch019.html#fiel).
>>
>> I created a Prores file from the same MTS file using ffmpeg and it is
>> recognized as progressive by FCP7, OTOH my source file is treated as
>> 50 fps and every other frame skipped. But the resulting file does not
>> have the fiel atom set either, so that does not seem to be the reason.
>>

Can you share the file created by ffmpeg shown as progressive ?

>> Weird, it is hard to believe nobody would have run into this earlier
>> as I thought there must be more people out there using ffmbc to create
>> Prores files for use with FCP7.
>>
>> Maybe I'm missing something.
>
> some more observations:
>
> It does not seem to be related to the fact that the original video is
> interlaced. I just transcoded a 25p XDCAM EX sample generated with
> FCP7 once with ffmbc and once with Compressor. The one transcoded
> using compressor is displayed as progressive.
>
> As buggy as it is, it is not too unlikely that FCP7 is simply wrong
> here but there must be something different in the files that
> compressor produces.

Yes, it's more complicated it seems. I'll have a look, maybe I can figure something out

> Some files to reproduce this:
>
> Original XDCAM 25p file:
>
> https://dl.dropbox.com/u/33388463/fcp7_xdcam_ex_1080_25p_1s.mov
>
> File recoded to prores using command line ffmbc -i <file> -vcodec
> prores -an <outfile>:
>
> https://dl.dropbox.com/u/33388463/fcp7_xdcam_ex_25p_recoded-prores-ffmbc.mov
>
> File recoded to prores using Apple Compressor:
>
> https://dl.dropbox.com/u/33388463/fcp7_xdcam_ex_1080_25p_1s-Apple%20ProRes%20422.mov
>
> Field-Dominance in FCP7:
>
> https://dl.dropbox.com/u/33388463/fcp-file-difference.png
>
> Two pixel-by-pixel screenshots from FCP7 demonstrating what this does
> to an editing project I'm helping with (unfortunately I stumbled over
> this problem rather late when I noticed that all thin edges of
> buildings etc. looked rather bad and checked against the raw footage
> and the prores clips in the FCP7 viewer, where they look fine):
>
> The 25p file (which FCP thinks is interlaced) put on a 25p sequence:
>
> https://dl.dropbox.com/u/33388463/file-on-25p-sequence.png
>
> And a similar screenshot from the same file on a 50i sequence:
>
> https://dl.dropbox.com/u/33388463/file-on-50i-sequence.png
>
> Another thing: I tried different codecs (mpeg4, png) and for them also
> the files generated from the progressive sample using ffmbc are
> displayed in FCP7 as interlaced, so this is not limited to prores but
> then again, it might be a combination of several factors, you never
> know.

Very interesting.

> (a bit later)
>
> I hacked a patch that changes ffmbc's behaviour to always write the
> fiel atom, i.e. also for progressive files and that fixes the problem
> for me. Patch is attached.

Yes, if you write the atom, FCP will follow it.

--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org

Robert Krüger

unread,
Nov 1, 2012, 7:38:22 AM11/1/12
to ffmbc-...@googlegroups.com
Hi Baptiste,
In the meantime I came across some other progressive samples generated
by AfterEffects (codec was qtrle but I don't think it matters) which
showed "Upper (odd)" in the field dominance column as well, which also
screwed up the sequence qualitywise and remuxing with the patch then
fixed it. I will probably stick with the patch until I run into
anything were it causes problems.

Best regards,

Robert

Baptiste Coudurier

unread,
Nov 1, 2012, 2:15:46 PM11/1/12
to ffmbc-...@googlegroups.com
Robert,

On Nov 1, 2012, at 4:38 AM, Robert Krüger <kru...@lesspain.de> wrote:

> Hi Baptiste,
>
> On Thu, Nov 1, 2012 at 10:18 AM, Baptiste Coudurier
> <baptiste....@gmail.com> wrote:
>> Hi Robert,
>>
>> On Oct 26, 2012, at 5:11 AM, Robert Krüger <kru...@lesspain.de> wrote:
>>
>>> On Mon, Oct 22, 2012 at 6:21 PM, Robert Krüger <kru...@lesspain.de> wrote:
>>>> On Mon, Oct 22, 2012 at 5:41 PM, Robert Krüger <kru...@lesspain.de> wrote:
>>>>> I have transcoded an MTS file, which should be 25 fps progressive
>>>>> segmented frame material, to progressive prores by a command line like
>>>>> this:
>>>>>
>>>> I just remuxed the file created using Compressor with ffmbc and it is
>>>> also displayed as interlaced in FCP7.
>>>>
>>>> Looking at the file structure I noticed that the "fiel" atom is
>>>> missing in the file written by ffmbc
>>>> (https://developer.apple.com/quicktime/icefloe/dispatch019.html#fiel).
>>>>
>>>> I created a Prores file from the same MTS file using ffmpeg and it is
>>>> recognized as progressive by FCP7, OTOH my source file is treated as
>>>> 50 fps and every other frame skipped. But the resulting file does not
>>>> have the fiel atom set either, so that does not seem to be the reason.
>>>>
>>
>> Can you share the file created by ffmpeg shown as progressive ?
>>

Can you please share the file nonetheless ?

>>
>>> (a bit later)
>>>
>>> I hacked a patch that changes ffmbc's behaviour to always write the
>>> fiel atom, i.e. also for progressive files and that fixes the problem
>>> for me. Patch is attached.
>>
>> Yes, if you write the atom, FCP will follow it.
>>
> In the meantime I came across some other progressive samples generated
> by AfterEffects (codec was qtrle but I don't think it matters) which
> showed "Upper (odd)" in the field dominance column as well, which also
> screwed up the sequence qualitywise and remuxing with the patch then
> fixed it. I will probably stick with the patch until I run into
> anything were it causes problems.

I could add it automatically, I'm trying to figure out what's going on here.

Robert Krüger

unread,
Nov 2, 2012, 4:51:24 AM11/2/12
to ffmbc-...@googlegroups.com
Hi Baptiste,

On Thu, Nov 1, 2012 at 7:15 PM, Baptiste Coudurier
<baptiste....@gmail.com> wrote:
> Robert,
>
> On Nov 1, 2012, at 4:38 AM, Robert Krüger <kru...@lesspain.de> wrote:
>
>> Hi Baptiste,
>>
>> On Thu, Nov 1, 2012 at 10:18 AM, Baptiste Coudurier
>> <baptiste....@gmail.com> wrote:
>>> Hi Robert,
>>>
>
> Can you please share the file nonetheless ?
I no longer have access to the machine where I did those tests and
now, when I'm trying to recreate the file with current ffmpeg git
head, it no longer behaves that way (it does not have a fiel atom
either, btw), so it's hard to tell whether I simply made a mistake or
the ffmpeg version was not the same. Sorry about that!

Baptiste Coudurier

unread,
Dec 6, 2012, 4:00:01 PM12/6/12
to ffmbc-...@googlegroups.com
On 11/02/2012 01:51 AM, Robert Krüger wrote:
> Hi Baptiste,
>
> On Thu, Nov 1, 2012 at 7:15 PM, Baptiste Coudurier
> <baptiste....@gmail.com> wrote:
>> Robert,
>>
>> On Nov 1, 2012, at 4:38 AM, Robert Krüger <kru...@lesspain.de> wrote:
>>
>>> Hi Baptiste,
>>>
>>> On Thu, Nov 1, 2012 at 10:18 AM, Baptiste Coudurier
>>> <baptiste....@gmail.com> wrote:
>>>> Hi Robert,
>>>>
>>
>> Can you please share the file nonetheless ?
> I no longer have access to the machine where I did those tests and
> now, when I'm trying to recreate the file with current ffmpeg git
> head, it no longer behaves that way (it does not have a fiel atom
> either, btw), so it's hard to tell whether I simply made a mistake or
> the ffmpeg version was not the same. Sorry about that!
>

So after testing, I think FCP assume interlaced for 1080 by default but
progressive for 720 by default when the atom is missing.
FFmbc will now always write the atom when creating .mov files.

Robert Krüger

unread,
Dec 7, 2012, 9:09:29 AM12/7/12
to ffmbc-...@googlegroups.com
On Thu, Dec 6, 2012 at 10:00 PM, Baptiste Coudurier <baptiste....@gmail.com> wrote:
On 11/02/2012 01:51 AM, Robert Krüger wrote:
> Hi Baptiste,
>
> On Thu, Nov 1, 2012 at 7:15 PM, Baptiste Coudurier
> <baptiste....@gmail.com> wrote:
>> Robert,
>>
>> On Nov 1, 2012, at 4:38 AM, Robert Krüger <kru...@lesspain.de> wrote:
>>
>>> Hi Baptiste,
>>>
>>> On Thu, Nov 1, 2012 at 10:18 AM, Baptiste Coudurier
>>> <baptiste....@gmail.com> wrote:
>>>> Hi Robert,
>>>>
>>
>> Can you please share the file nonetheless ?
> I no longer have access to the machine where I did those tests and
> now, when I'm trying to recreate the file with current ffmpeg git
> head, it no longer behaves that way (it does not have a fiel atom
> either, btw), so it's hard to tell whether I simply made a mistake or
> the ffmpeg version was not the same. Sorry about that!
>

So after testing, I think FCP assume interlaced for 1080 by default but
progressive for 720 by default when the atom is missing.
FFmbc will now always write the atom when creating .mov files.

great. Thanks! 
Reply all
Reply to author
Forward
0 new messages