FAQ  •  Register  •  Login

MP4 Sound /video sync issues on Bravia running Serviio 0.5.2

<<

fidibity

Serviio newbie

Posts: 3

Joined: Fri Apr 29, 2011 2:12 am

Post Fri Apr 29, 2011 2:40 am

MP4 Sound /video sync issues on Bravia running Serviio 0.5.2

Hi all,

First off, I want to say I've been really happy with Serviio; it plays almost all of my library fantastically. However, for certain video's that I've encoded using Handbrake, the video starts off running at 1.5 times normal speed (est.) and the sound is about 2 seconds behind.

I thought it might be issue #201, but since it was fixed in version .5, I'm not so sure. It only appears to happen on files haveing been encoded using the HandBrake iphone preset profile. Using the normal profile doesn't appear to show this problem.

Anyway here's the pertinant information (let me know if you need more):

I'm running Centos 5.6 using the ffmpeg provided by rpmforge. The TV is a Bravia KDL46NX810.

output from process listing ( at start ):
  Code:
ffmpeg -i media_file.mp4 -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 384k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-3601-MPEG2TS.stf


output from ffmpeg -i:

  Code:
ffmpeg -i media_file.mp4
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec  4 2010 15:37:20 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8859850]max_analyze_duration reached

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'media_file.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 00:21:26.69, start: 0.000000, bitrate: 833 kb/s
    Chapter #0.0: start 0.000000, end 161.161000
    Metadata:
      title           : Chapter 5
    Chapter #0.1: start 161.161000, end 732.531800
    Metadata:
      title           : Chapter 6
    Chapter #0.2: start 732.531800, end 1209.791911
    Metadata:
      title           : Chapter 7
    Chapter #0.3: start 1209.791911, end 1286.660344
    Metadata:
      title           : Chapter 8
    Stream #0.0(und): Video: h264, yuv420p, 480x272, 701 kb/s, 23.98 fps, 90k tbr, 90k tbn, 180k tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s
    Stream #0.2(und): Subtitle: text / 0x74786574


and finally the output from MediaInfo:

  Code:
<?xml version="1.0" encoding="UTF-8"?>
<Mediainfo version="0.7.44">
<File>
<track type="General">
<CompleteName>M:\series\media_file.mp4</CompleteName>
<Format>MPEG-4</Format>
<Format_Profile>Base Media / Version 2</Format_Profile>
<CodecID>mp42</CodecID>
<FileSize_String>128 MiB</FileSize_String>
<Duration_String>21mn 26s</Duration_String>
<OverallBitRate_String>833 Kbps</OverallBitRate_String>
<Encoded_Date>UTC 2011-04-14 01:08:28</Encoded_Date>
<Tagged_Date>UTC 2011-04-14 01:26:28</Tagged_Date>
<Encoded_Application>HandBrake 0.9.5 2011010300</Encoded_Application>
</track>

<track type="Video">
<ID_String>1</ID_String>
<Format>AVC</Format>
<Format_Info>Advanced Video Codec</Format_Info>
<Format_Profile>Baseline@L2.1</Format_Profile>
<Format_Settings_CABAC_String>No</Format_Settings_CABAC_String>
<Format_Settings_RefFrames_String>2 frame2</Format_Settings_RefFrames_String>
<CodecID>avc1</CodecID>
<CodecID_Info>Advanced Video Coding</CodecID_Info>
<Duration_String>21mn 26s</Duration_String>
<BitRate_Mode_String>VBR</BitRate_Mode_String>
<BitRate_String>701 Kbps</BitRate_String>
<Width_String>480 pixel3</Width_String>
<Height_String>272 pixel3</Height_String>
<DisplayAspectRatio_String>16:9</DisplayAspectRatio_String>
<FrameRate_Mode_String>VFR</FrameRate_Mode_String>
<FrameRate_String>23.976 fps2</FrameRate_String>
<FrameRate_Minimum_String>19.969 fps3</FrameRate_Minimum_String>
<FrameRate_Maximum_String>29.970 fps3</FrameRate_Maximum_String>
<ColorSpace>YUV</ColorSpace>
<ChromaSubsampling>4:2:0</ChromaSubsampling>
<BitDepth_String>8 bit3</BitDepth_String>
<ScanType_String>Progressive</ScanType_String>
<Bits-_Pixel_Frame_>0.224</Bits-_Pixel_Frame_>
<StreamSize_String>108 MiB (84%)</StreamSize_String>
<Encoded_Library_String>x264 core 112</Encoded_Library_String>
<Encoded_Library_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=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=23 / 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</Encoded_Library_Settings>
<Encoded_Date>UTC 2011-04-14 01:08:28</Encoded_Date>
<Tagged_Date>UTC 2011-04-14 01:26:28</Tagged_Date>
<colour_primaries>BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M</colour_primaries>
<transfer_characteristics>BT.709-5, BT.1361</transfer_characteristics>
<matrix_coefficients>BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M</matrix_coefficients>
</track>

<track type="Audio">
<ID_String>2</ID_String>
<Format>AAC</Format>
<Format_Info>Advanced Audio Codec</Format_Info>
<Format_Profile>LC</Format_Profile>
<CodecID>40</CodecID>
<Duration_String>21mn 26s</Duration_String>
<BitRate_Mode_String>VBR</BitRate_Mode_String>
<BitRate_String>128 Kbps</BitRate_String>
<BitRate_Maximum_String>233 Kbps</BitRate_Maximum_String>
<Channel_s__String>2 channel2</Channel_s__String>
<ChannelPositions>Front: L R</ChannelPositions>
<SamplingRate_String>48.0 KHz</SamplingRate_String>
<Compression_Mode_String>Lossy</Compression_Mode_String>
<StreamSize_String>19.6 MiB (15%)</StreamSize_String>
<Language_String>en</Language_String>
<Encoded_Date>UTC 2011-04-14 01:08:28</Encoded_Date>
<Tagged_Date>UTC 2011-04-14 01:26:28</Tagged_Date>
</track>

<track type="Text">
<ID_String>3</ID_String>
<Format>Apple text</Format>
<CodecID>text</CodecID>
<Duration_String>21mn 26s</Duration_String>
<BitRate_Mode_String>CBR</BitRate_Mode_String>
<BitRate_String>1 bps</BitRate_String>
<StreamSize_String>92.0 Byte2 (0%)</StreamSize_String>
<Encoded_Date>UTC 2011-04-14 01:08:28</Encoded_Date>
<Tagged_Date>UTC 2011-04-14 01:26:28</Tagged_Date>
</track>

</File>
</Mediainfo>


I went through all the previous posts for the past 2 months, I wasn't able to find this issue. I was curious if this has come up before. Thanks for any and all help y'all can provide.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Apr 29, 2011 9:03 am

Re: MP4 Sound /video sync issues on Bravia running Serviio 0

The audio source is low "127 kb/s", could you try to modify the output audio bitrate option with aBitrate="192" under Sony Bravia profile (replace the "384" )
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

fidibity

Serviio newbie

Posts: 3

Joined: Fri Apr 29, 2011 2:12 am

Post Fri Apr 29, 2011 1:46 pm

Re: MP4 Sound /video sync issues on Bravia running Serviio 0

Thanks for the response!

I updated the profile in config/profiles.cml for Bravia and change all audio bitrates to 192. Stopped serviio, killed the java process, restarted, tried a different video in the same series in case there was caching. Unfortunately, I got the same result as before.
<<

shane

Serviio newbie

Posts: 2

Joined: Sat Apr 23, 2011 2:41 am

Post Mon May 02, 2011 1:21 am

Re: MP4 Sound /video sync issues on Bravia running Serviio 0

The video and the audio could actually be of sync in media_file.mp4

I had a video/audio sync issues and had this message from ffmpeg
"seems stream 0 codec frame rate differs from container frame rate".

Playing the video using VLC was ok, I read a thread where VLC sometimes can automatically sync video/audio using PTS. They said to try a different fps close to the original.
Manually picking a fps fixed my problem.
Sony KDL52NX800 Wireless N
<<

fidibity

Serviio newbie

Posts: 3

Joined: Fri Apr 29, 2011 2:12 am

Post Mon May 02, 2011 9:11 pm

Re: MP4 Sound /video sync issues on Bravia running Serviio 0

OK, I'll give that a shot. Thanks! It looks like it's not just that profile that's having the problem, all mp4s are. I'll fiddle with the settings some and see if I can get success. I'll post here if I find anything else out.

Return to Sony

Who is online

Users browsing this forum: No registered users and 20 guests

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