One frame short when transcoding to XDCAM

289 views
Skip to first unread message

phillip...@itn.co.uk

unread,
Jun 19, 2012, 8:14:22 AM6/19/12
to ffmbc-...@googlegroups.com
Hi,
I'm trying to use ffmbc to transcode random clips into XDCAMHD422, and then use bmxtranswrap from the BBC Ingex project to import into an Avid edit system. Unfortunately, I can't use the resultant video as it seems to arrive one frame short, which Avid balks at. As you can see from the uncut output below, the transcode reads the length at 00:01:03.32, but when the resultant file is fed back into ffmbc it appears to be one frame shorter. at 00:01:03.28
The video is 25fps all the way through.
I'm using the Windows binary (as I'm at work, in a non-Unix enviroment)

Any ideas?

Phillip

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.


F:\>ffmbc -i "C:\Users\barnett phillip\Desktop\Flypast1.mp4" -tff -target xdcamhd422 -an testlength.mxf -acodec pcm_s24le -ar 48000 -newaudio -acodec pcm_s24le -ar 48000 -newaudio
-map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:1:1:0:2:0
FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\barnett phillip\Desktop\Flypast1.mp4':
  Metadata:
    major_brand: mp41
    minor_version: 0
    compatible_brands: mp41isom
    creation_time: 2012-06-04 19:55:01
  Duration: 00:01:03.32, start: 0.000000, bitrate: 10189 kb/s
    Stream #0.0(eng): Video: mpeg4 (Simple Profile), yuv420p, 1280x720p [PAR 1:1 DAR 16:9], 10008 kb/s, 25.00 fps
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 175 kb/s
[scale @ 0307F180] w:1280 h:720 fmt:yuv420p -> w:1280 h:720 fmt:yuv422p flags:0x4
Incompatible sample format 's16' for codec 'pcm_s24le', auto-selecting format 's32'
    Last message repeated 1 times
Warning, QMAT_SHIFT is larger than 21, overflows possible
    Last message repeated 1 times
Output #0, mxf, to 'testlength.mxf':
  Metadata:
    encoder: FFmbc 0.7
    Stream #0.0(und): Video: mpeg2video, yuv422p, 1280x720i tff [PAR 1:1 DAR 16:9], cbr, 50000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.2(und): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1 [channel: 0 -> 0]
  Stream #0.1 -> #0.2 [channel: 1 -> 0]
Press [q] to stop, [?] for help
frame= 1583 fps= 11 q=2.0 Lsize=  407695kB time=00:01:03.25 bitrate=52800.9kbits/s
video:387708kB audio:17790kB global headers:0kB muxing overhead 0.541694%

F:\>ffmbc -i F:\testlength.mxf
FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
Input #0, mxf, from 'F:\testlength.mxf':
  Metadata:
    operational_pattern: Op1a
    system_timecode: 00:00:00:00
    timecode: 00:00:00:00
  Duration: 00:01:03.28, start: 0.000000, bitrate: 52778 kb/s
    Stream #0.0(und): Video: mpeg2video (4:2:2), yuv422p, 1280x720i tff [PAR 1:1 DAR 16:9], 50000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.2(und): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
At least one output file must be specified

F:\>

Baptiste Coudurier

unread,
Jun 19, 2012, 3:47:09 PM6/19/12
to ffmbc-...@googlegroups.com
Hi,

On 06/19/2012 05:14 AM, phillip...@itn.co.uk wrote:
> Hi,
> I'm trying to use ffmbc to transcode random clips into XDCAMHD422, and then use bmxtranswrap from
> the BBC Ingex project to import into an Avid edit system. Unfortunately, I can't use the resultant
> video as it seems to arrive one frame short, which Avid balks at. As you can see from the uncut
> output below, the transcode reads the length at 00:01:03.32, but when the resultant file is fed back
> into ffmbc it appears to be one frame shorter. at 00:01:03.28
> The video is 25fps all the way through.
> I'm using the Windows binary (as I'm at work, in a non-Unix enviroment)

It could be the source file, can you please send it to me ?

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

phillip...@itn.co.uk

unread,
Jun 20, 2012, 7:02:06 AM6/20/12
to ffmbc-...@googlegroups.com
OK - I've sent you details of the file location privately.

Thanks for taking a look.
Phillip


On Tuesday, 19 June 2012 20:47:09 UTC+1, Baptiste Coudurier wrote:
Hi,

ben...@gmail.com

unread,
Sep 12, 2012, 11:42:22 AM9/12/12
to ffmbc-...@googlegroups.com, phillip...@itn.co.uk
Hi,

Have got an idea ?

I have the same problem here...

thank you

Baptiste Coudurier

unread,
Sep 12, 2012, 4:57:25 PM9/12/12
to ffmbc-...@googlegroups.com, ben...@gmail.com, phillip...@itn.co.uk
Hi guys,

The problem arises when the audio track is shorter than the video track.
MXF Op1a mandates both tracks to be the same length exactly.

I'll accommodate for this.

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

Benoît GODARD

unread,
Sep 13, 2012, 5:15:36 AM9/13/12
to Baptiste Coudurier, ffmbc-...@googlegroups.com, phillip...@itn.co.uk
Hi guys,

thanks a lot for your response.

just an other thing :
I have a delay audio on track 1 when I encode from TS file (from the french TNT) to MXF file with XDCAMHD50i codec.
It's strange because I have the same stereo source mapping to 1&2 and 3&4 on the track destination and only the track 1 is asynch.
I can put my source file on a ftp if you want to test...

Here, my command line :

ffmbc -i tf1hd.ts 
-threads 2 
-tff 
-vf "scale=1920:1080:interl=1,fieldorder=tff" 
-acodec pcm_s24le -ar 48000 
-acodec pcm_s24le -ar 48000 
-acodec pcm_s24le -ar 48000 
-acodec pcm_s24le -ar 48000 
-map_audio_channel 0.1.0:0.1.0 
-map_audio_channel 0.1.1:0.2.0 
-map_audio_channel 0.1.0:0.3.0 
-map_audio_channel 0.1.1:0.4.0 
-target xdcamhd422 
-an tf1.mxf 
-newaudio 
-newaudio 
-newaudio 
-newaudio

On my Avid, I have this waveform when I import my MXF file :

An example of the output of ffmbc :

ffmbc -i tf1hd.ts -threads 2 -ss 00:00:05:00 -t 00:00:05:00 -tff -vf "scale=1920:1080:interl=1,fieldorder=tff" -target xdcamhd422 -an tf1audiotest.mxf -newaudio -newaudio -newaudio -newaudio -map_audio_channel 0.1.0:0.1.0 -map_audio_channel 0.1.1:0.2.0 -map_audio_channel 0.1.0:0.3.0 -map_audio_channel 0.1.1:0.4.0
FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] mmco: unref short failure
[h264 @ 0x7fed2b80fc00] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
Input #0, mpegts, from 'tf1hd.ts':
  Duration: 00:02:44.02, start: 74048.346656, bitrate: 5905 kb/s
  Program 1281
    Metadata:
      service_name: TF1 HD
      service_provider: MR5
    Stream #0.0[0x078](und): Video: h264 (High), yuv420p, 1920x1080i tff [PAR 1:1 DAR 16:9], 25.00 fps
    Stream #0.1[0x082](fra): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.2[0x083](qaa): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.3[0x084](qad): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.4[0x08c](fra): Subtitle: dvbsub (hearing impaired)
    Stream #0.5[0x08d](fra): Subtitle: dvbsub
    Stream #0.6[0x0aa](und): Data: unknown (0x0005)
    Stream #0.7[0x0ab](und): Data: unknown (0x00ff)
    Stream #0.8[0x0ac](und): Data: unknown (0x00ff)
    Stream #0.9[0x0ad](und): Data: unknown (0x00ff)
File 'tf1audiotest2.mxf' already exists. Overwrite ? [y/N] y
[fieldorder @ 0x7fed2b4042e0] output field order: tff
[scale @ 0x7fed2b403e40] w:1920 h:1080 fmt:yuv420p -> w:1920 h:1080 fmt:yuv422p flags:0x4
Warning, QMAT_SHIFT is larger than 21, overflows possible
    Last message repeated 1 times
Output #0, mxf, to 'tf1audiotest2.mxf':
  Metadata:
    encoder: FFmbc 0.7
    Stream #0.0(und): Video: mpeg2video, yuv422p, 1920x1080i tff [PAR 1:1 DAR 16:9], cbr, 50000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.2(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.3(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.4(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1 [channel: 0 -> 0]
  Stream #0.1 -> #0.2 [channel: 1 -> 0]
  Stream #0.1 -> #0.3 [channel: 0 -> 0]
  Stream #0.1 -> #0.4 [channel: 1 -> 0]
Press [q] to stop, [?] for help
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] non-existing SPS 0 referenced in buffering period
[h264 @ 0x7fed2b80fc00] non-existing PPS referenced
[h264 @ 0x7fed2b80fc00] error fetching slice type, discarding
[h264 @ 0x7fed2b80fc00] mmco: unref short failure
[h264 @ 0x7fed2b80fc00] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
    Last message repeated 7 times     0kB time=00:00:00.00 bitrate=   0.0kbits/s eta=N/A
adding 1186 audio samples in stream #0.1B time=00:00:00.00 bitrate=   0.0kbits/s eta=N/A
frame=  125 fps=  9 q=1.0 Lsize=   33644kB time=00:00:04.96 bitrate=55566.1kbits/s               
video:31537kB audio:1874kB global headers:0kB muxing overhead 0.694132%



Thanks a lot for your help.

Benoît Godard.

Baptiste Coudurier

unread,
Sep 13, 2012, 6:55:20 PM9/13/12
to Benoît GODARD, ffmbc-...@googlegroups.com, phillip...@itn.co.uk
Hi,
This is a different issue, and yes I'll need a source file.
Thanks

Benoît GODARD

unread,
Sep 18, 2012, 5:02:08 AM9/18/12
to Baptiste Coudurier, ffmbc-...@googlegroups.com, phillip...@itn.co.uk
Hi,

have you got an idea for this different synchro between Track 1 an 2 ?

thank you

Benoît

Baptiste Coudurier

unread,
Sep 18, 2012, 2:04:27 PM9/18/12
to ffmbc-...@googlegroups.com
On 09/18/2012 02:02 AM, Benoît GODARD wrote:
> Hi,
>
> have you got an idea for this different synchro between Track 1 an 2 ?

Yes, it will be fixed in the next version
Reply all
Reply to author
Forward
0 new messages