FAQ  •  Register  •  Login

Audio out of sync with MP4 and Sony Bravia

<<

lxndr

Serviio newbie

Posts: 2

Joined: Thu Mar 10, 2011 6:23 pm

Post Thu Mar 10, 2011 6:35 pm

Audio out of sync with MP4 and Sony Bravia

Folks,

I have a serious problem with Serviio and my Sony Bravia KDL-40NX705 (Europe).

Setting up Serviio was an absolute breeze: just start, configure the folders, and pronto! everything worked right out of the box -- both MPEG2 (my vanilla .vob files from unmodified DVD rips) and M4V (encoded from such a rip with Handbrake to H.264/AAC+AC3) played nicely and without problems. I then started to encode some random other DVDs (again M4V), and ended up with movies in which the audio stream lags behind the video stream for about four or five (!) seconds.

It does not seem to be an "infrastructure" issue -- as said, the older M4V files play nicely. I have the latest iMac model with a 3.6GHz Core i5 CPU, and a fast 802.11n WiFi network, so this shouldn't be an issue (no HD material). Also, when playing back the files on my Mac (using Perian), the lag is just not there.

So the only things to blame are a) Handbrake, b) my Sony Bravia, or c) Serviio.

MediaInfo Mac reports the following on the two files (where the first one works, and the second one lags):

  Code:
* * * MediaInfo Mac 0.7.36.0 file analysis report.
* * * MediaInfo Mac is ©2010 by Diego Massanti - http://mediainfo.massanti.com
* * * MediaInfoLib by Jerome Martinez - http://mediainfo.sourceforge.net
Created on: 10.03.2011 19:02:37 MEZ
Report for file: Folge 5.m4v

General / Container Stream #1
   Total Video Streams for this File.................1
   Total Audio Streams for this File.................2
   Total Subtitle Streams for this File..............1
   Video Codecs Used.................................AVC
   Audio Codecs Used.................................AAC LC / AC3
   SubTitle Codecs Used..............................text
   File Format.......................................MPEG-4
   Play Time.........................................19mn 33s
   Total File Size...................................249 MiB
   Total Stream BitRate..............................1 777 Kbps
   Encoded with......................................HandBrake 0.9.4 2009112300
Video Stream #1
   Codec (Human Name)................................AVC
   Codec (FourCC)....................................avc1
   Codec Profile.....................................Baseline@L3.0
   Frame Width.......................................720 pixels
   Frame Height......................................576 pixels
   Frame Rate........................................25.000 fps
   Total Frames......................................29322
   Display Aspect Ratio..............................4:3
   Video Standard....................................PAL
   Scan Type.........................................Progressive
   Color Space.......................................YUV
   Codec Settings (Summary)..........................2 Ref Frames
   QF (like Gordian Knot)............................0.137
   Codec Settings (CABAC)............................No
   Codec Settings (Reference Frames).................2
   Video Stream Length...............................19mn 32s 920ms
   Video Stream BitRate..............................1 423 Kbps
   Video Stream BitRate Mode.........................VBR
   Bit Depth.........................................8 bits
   Video Stream Size.................................199 MiB (80%)
   Video Encoder.....................................x264 - core 79 r1347 5ddd61b
   Video Encoder (Settings)..........................cabac=0 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=umh / subme=6 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=0 / wpredp=0 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
   Date of Original Encoding.........................UTC 2010-06-26 13:26:03
   Color Primaries...................................BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
   Transfer Characteristics..........................BT.709-5, BT.1361
   Matrix Coefficients...............................BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Audio Stream #1
   Codec.............................................AAC
   Codec (FourCC)....................................40
   Audio Stream Length...............................19mn 33s 13ms
   Audio Stream BitRate..............................160 Kbps
   Audio Stream BitRate Mode.........................VBR
   Number of Audio Channels..........................2
   Audio Channel's Positions.........................Front: L R
   Sampling Rate.....................................48.0 KHz
   Audio Stream Size.................................22.3 MiB (9%)
   Audio Stream Language.............................German
   Date of Original Encoding.........................UTC 2010-06-26 13:26:03
Audio Stream #2
   Codec.............................................AC-3
   Codec (FourCC)....................................ac-3
   Codec Profile.....................................Dolby Digital
   Audio Stream Length...............................19mn 32s 992ms
   Audio Stream BitRate..............................192 Kbps
   Audio Stream BitRate Mode.........................CBR
   Number of Audio Channels..........................2
   Audio Channel's Positions.........................Front: L R
   Sampling Rate.....................................48.0 KHz
   Bit Depth.........................................16 bits
   Audio Stream Size.................................26.8 MiB (11%)
   Audio Stream Language.............................German
   Date of Original Encoding.........................UTC 2010-06-26 13:26:03
Subtitle Stream #1
   Format............................................Apple text
   Codec ID..........................................text

and
  Code:
* * * MediaInfo Mac 0.7.36.0 file analysis report.
* * * MediaInfo Mac is ©2010 by Diego Massanti - http://mediainfo.massanti.com
* * * MediaInfoLib by Jerome Martinez - http://mediainfo.sourceforge.net
Created on: 10.03.2011 19:02:56 MEZ
Report for file: Office Space.m4v

General / Container Stream #1
   Total Video Streams for this File.................1
   Total Audio Streams for this File.................2
   Total Subtitle Streams for this File..............1
   Video Codecs Used.................................AVC
   Audio Codecs Used.................................AAC LC / AC3
   SubTitle Codecs Used..............................text
   File Format.......................................MPEG-4
   Play Time.........................................1h 25mn
   Total File Size...................................1.17 GiB
   Total Stream BitRate..............................1 952 Kbps
   Encoded with......................................HandBrake 0.9.5 2011010300
Video Stream #1
   Codec (Human Name)................................AVC
   Codec (FourCC)....................................avc1
   Codec Profile.....................................Baseline@L3.0
   Frame Width.......................................704 pixels
   Frame Height......................................544 pixels
   Frame Rate........................................25.000 fps
   Total Frames......................................128476
   Display Aspect Ratio..............................16:9
   Scan Type.........................................Progressive
   Color Space.......................................YUV
   Codec Settings (Summary)..........................2 Ref Frames
   QF (like Gordian Knot)............................0.147
   Codec Settings (CABAC)............................No
   Codec Settings (Reference Frames).................2
   Video Stream Length...............................1h 25mn 39s 120ms
   Video Stream BitRate..............................1 405 Kbps
   Video Stream BitRate Mode.........................VBR
   Bit Depth.........................................8 bits
   Video Stream Size.................................861 MiB (72%)
   Video Encoder.....................................x264 - core 112
   Video Encoder (Settings)..........................cabac=0 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=umh / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
   Date of Original Encoding.........................UTC 2011-03-05 20:25:55
   Color Primaries...................................BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
   Transfer Characteristics..........................BT.709-5, BT.1361
   Matrix Coefficients...............................BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Audio Stream #1
   Codec.............................................AAC
   Codec (FourCC)....................................40
   Audio Stream Length...............................1h 25mn 39s 114ms
   Audio Stream BitRate..............................160 Kbps
   Audio Stream BitRate Mode.........................VBR
   Number of Audio Channels..........................2
   Audio Channel's Positions.........................Front: L R
   Sampling Rate.....................................48.0 KHz
   Audio Stream Size.................................97.9 MiB (8%)
   Audio Stream Language.............................German
   Date of Original Encoding.........................UTC 2011-03-05 20:25:55
Audio Stream #2
   Codec.............................................AC-3
   Codec (FourCC)....................................ac-3
   Audio Stream Length...............................1h 25mn 39s 104ms
   Audio Stream BitRate..............................384 Kbps
   Audio Stream BitRate Mode.........................CBR
   Number of Audio Channels..........................6
   Audio Channel's Positions.........................Front: L C R, Side: L R, LFE
   Sampling Rate.....................................48.0 KHz
   Bit Depth.........................................16 bits
   Audio Stream Size.................................235 MiB (20%)
   Audio Stream Language.............................German
   Date of Original Encoding.........................UTC 2011-03-05 20:25:55
Subtitle Stream #1
   Format............................................Apple text
   Codec ID..........................................text


I noticed that for the former rip, I used an older Handbrake version. Also, a few settings are slightly different, but I don't really have an idea what Handbrake is doing, so I might overlook something in the encoder settings -- any help would be really appreciated!

Thanks,
lxndr
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Thu Mar 10, 2011 10:00 pm

Re: Audio out of sync with MP4 and Sony Bravia

only real thing i notice is the audio bitrate is very high on the second file 384kbps and only 192kbps on the first file and also the second file has 6 channel audio and teh firt only 2 channel.

have you tried teh downmux to stereo option in serviios console ?
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

lxndr

Serviio newbie

Posts: 2

Joined: Thu Mar 10, 2011 6:23 pm

Post Fri Mar 11, 2011 8:17 am

Re: Audio out of sync with MP4 and Sony Bravia

Ok, it seems that after some research I managed to solve the issue by my own.

The problem was Handbrake -- the 0.9.4 version (donwloaded it yesterday for testing) I used seems to have slightly different defaults, which lead to this issue. In fact, Handbrake 0.9.5 uses "same as source" for the default frame rate setting which, for some reason, ends up with a frame rate of 29.<something> for my DVDs. Unfortunately, the DVDs are PAL and should have a 25FPS frame rate instead. Forcing Handbrake to use "25 (PAL Film/Video)" setting instead produces fine videos which play nice on the Bravia.

Sigh.

Return to Sony

Who is online

Users browsing this forum: No registered users and 5 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.