Audio/Video drift out of sync

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Post Reply
joediggety
Beginner
Beginner
Posts: 5
Joined: Thu May 31, 2012 2:35 am

Audio/Video drift out of sync

Post by joediggety » Thu May 31, 2012 2:48 am

I have previously been able to convert MXF videos without any problems. However, the last batch all have this issue. The audio is fine, but the video seems to slow down by a few frames per second. According to my math, the video changes from 29.97fps (source) to 32.8fps (destination), causing the drift.

FYI, this conversion was done on a fresh install (this morning) of MediaCoder Premium with all settings at default.

Source file:

Code: Select all

General
Complete name                            : AA003401.MXF
Format                                   : MXF
Commercial name                          : XDCAM HD422
Format profile                           : OP-1a
Format settings                          : Closed / Complete
File size                                : 1.09 GiB
Duration                                 : 2mn 59s
Overall bit rate                         : 52.2 Mbps
Encoded date                             : 2012-05-15 12:11:11.000
Writing application                      : CANON XF100 1.00
Writing library                          : CANON XF100 1.00

Video
ID                                       : 2
Format                                   : MPEG Video
Commercial name                          : XDCAM HD422
Format version                           : Version 2
Format profile                           : 4:2:2@High
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=15
Format_Settings_Wrapping                 : Frame
Duration                                 : 2mn 59s
Bit rate                                 : 50.0 Mbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 fps
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 1.810
Stream size                              : 1.04 GiB (96%)
Delay_SDTI                               : 8263067
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 3
Format                                   : PCM
Format settings, Endianness              : Little
Format_Settings_Wrapping                 : Frame (AES)
Duration                                 : 2mn 59s
Bit rate mode                            : Constant
Bit rate                                 : 768 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Stream size                              : 16.4 MiB (1%)
Delay_SDTI                               : 8263067

Audio #2
ID                                       : 4
Format                                   : PCM
Format settings, Endianness              : Little
Format_Settings_Wrapping                 : Frame (AES)
Duration                                 : 2mn 59s
Bit rate mode                            : Constant
Bit rate                                 : 768 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Stream size                              : 16.4 MiB (1%)
Delay_SDTI                               : 8263067



Destination file:

Code: Select all

General
Complete name                            : AA003401.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 24.3 MiB
Duration                                 : 3mn 16s
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 036 Kbps
Encoded date                             : UTC 2012-05-30 16:06:41
Tagged date                              : UTC 2012-05-30 16:06:41

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3mn 16s
Bit rate                                 : 1 000 Kbps
Maximum bit rate                         : 1 555 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.036
Stream size                              : 23.4 MiB (96%)
Writing library                          : x264 core 124 r2197 69a0443
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=1 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=abr / mbtree=1 / bitrate=1000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2012-05-30 16:06:41
Tagged date                              : UTC 2012-05-30 16:06:41

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 2mn 59s
Bit rate mode                            : Variable
Bit rate                                 : 40.5 Kbps
Maximum bit rate                         : 43.6 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 885 KiB (4%)
Encoded date                             : UTC 2012-05-30 16:06:41
Tagged date                              : UTC 2012-05-30 16:06:41

meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Re: Audio/Video drift out of sync

Post by meRobs » Thu May 31, 2012 10:31 am

What build of MediaCoder are you using? They are all beta versions.
Maybe try an earlier version, such as 5230.

Also, the result would depend on the tab settings.
Have you tried any of the suggestions in the Encoding Guide, listed under Tips & Guides (link below)?
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

joediggety
Beginner
Beginner
Posts: 5
Joined: Thu May 31, 2012 2:35 am

Re: Audio/Video drift out of sync

Post by joediggety » Fri Jun 01, 2012 1:32 am

MediaCoder Premium Version 0.8.12 build 5243 (built on May 14 2012, 11:45:55)

I have tried this on the standard MediaCoder 0.8.12 build 5248 on a different computer with the same results.
I can try an older version later today.

The "tab settings" are all set to the defaults.

I will look at the "Tips & Guides" again. The last time I looked none of it seemed to apply.

joediggety
Beginner
Beginner
Posts: 5
Joined: Thu May 31, 2012 2:35 am

Re: Audio/Video drift out of sync

Post by joediggety » Tue Jun 12, 2012 7:19 am

Tried with MediaCoder Version 0/8/1 build 5230 with the same results. Clean install, no settings changed. Defaulted to MP4.

meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Re: Audio/Video drift out of sync

Post by meRobs » Tue Jun 12, 2012 8:49 am

That is correct. The default gives an MP4.

Looks like you haven't tried any of the suggestions in the Encoding Guide.
You should experiment. Others won't do it for you.
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

joediggety
Beginner
Beginner
Posts: 5
Joined: Thu May 31, 2012 2:35 am

Re: Audio/Video drift out of sync

Post by joediggety » Tue Jun 12, 2012 9:39 am

I have tried all of the container types, different audio codec/video codec combinations, copy audio, vbr/cbr video, framerate conversion, and everything else I can think of. An MP4 was produced on my last test because I chose that container. You make it sound like I was surprised to get an MP4 output and didn't understand why. A clean installation of MediaCoder was performed, then without changing any settings (so that I could establish a base of reference, and so that you wouldn't assume the problem was simply because I screwed up by changing encoding settings), I loaded one of my Canon HD video's and processed it with the default settings.

I just paid $300 for the premium usb license key and was looking for help, I did not expect to get disrespected instead.

meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Re: Audio/Video drift out of sync

Post by meRobs » Tue Jun 12, 2012 10:52 am

joediggety wrote:Tried with MediaCoder Version 0/8/1 build 5230 with the same results. Clean install, no settings changed. Defaulted to MP4.
This post is what I responded to. You said you made changes and the result was an MP4 file. No other comment.
Hence, it sounded as if you expected a different outcome.

I am merely a non-paid user and am doing the best I can to help.
Before I or other users can help we need info, especially the settings on the main tabs.
If not those, then an indication that you tried a specific suggestion from the Encoding Guide and give the result.

I am not showing "disrespect", although, I was probably letting some of my impatience leak through.
Sorry.
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

cordsally
Amateur
Amateur
Posts: 20
Joined: Fri Jun 01, 2012 7:43 pm
Contact:

Re: Audio/Video drift out of sync

Post by cordsally » Wed Jun 13, 2012 4:05 pm

Lots of knowledge i get from this forum.......................May god bless you all, keep it up! :idea:

nefis
Beginner
Beginner
Posts: 2
Joined: Wed Jun 20, 2012 3:37 am

Re: Audio/Video drift out of sync

Post by nefis » Wed Jun 20, 2012 6:57 am

Looks like, I have same camcorder Canon XF100.
I've noticed same issue using ffmpeg from command line when I merge the 2 mono streams from left and right mics to stereo.

ffmbc worked ok with the merge. I wonder if it's somehow related to the issue.
this is the command i'm currently using

ffmbc -i INPUT.MXF -vcodec libx264 -vf yadif -b 8M -ac 2 -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:2:0:0:1:1 -acodec libmp3lame -ab 128k -y OUTPUT.MKV
-b 8M defines target bitrate 8 Mbit/s
the rest is to merge the mono streams to MP3 stereo with 128k bitrate

Anyway I see you've managed to create stereo out of the mono streams in MediaCoder. What settings do you use to do this?

meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Re: Audio/Video drift out of sync

Post by meRobs » Wed Jun 20, 2012 1:22 pm

FFmbc has been integrated into build 5260 (see changelog at viewtopic.php?f=17&t=6917).
Does this help?
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

Post Reply