Audio and video getting out of sync

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
Groetz
Posts:2
Joined:Tue Feb 07, 2012 9:34 pm
AV Hardware:Samsung UE37C5700
Sony BDP-S480
QNAP TS-212
Audio and video getting out of sync

Post by Groetz » Tue Feb 07, 2012 9:39 pm

Hi,

here is what I do:
I record TV with my DVB-T card and save it on my NAS (QNAP TS-212). I play the video either with my Bluray-Player (Sony BDP-S480) or my TV (Samsung UE37C5700).

After a while the audio and video is getting out of sync. You can see that the video does some "jumps" but the audio just continues. If I rewind the video for just for 1 second or even less, the video and audio are ok again. But then it starts again.

On the Sony BDP-S480 the offset between audio and video is obvious already after 1 or 2 minutes. On the Samsung TV it is better - but after maybe 30 minutes I have as well an offset.

Any idea? Thanks for your support.

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Audio and video getting out of sync

Post by phibertron » Wed Feb 08, 2012 9:12 pm

I think to help try and islolate the problem, if possible, we need to take twonky out of the equation

I dont do any video capture encodeing, but I do a lot of video encodeing.
In the past, I have seen as you describe, in doing video encodes with the various tools over the years
Some better and some worse than others
For example, I currently use handbrake for almost everything, and previous to that I used mencoder
In certain scenarios each tool could produce ill effects in regards to audio/video sync or video hiccups etc.

The reason I mentioned all of the above, is because too try and find out if the problem is with the file or the client,
we need to take twonky out of the picture, to many variables

What format are you saving the file captured from your DVB-T card?

Can you play the captured file on the computer?
If so, what software is being used to play it, and is it playhing ok?

Is it possible to put this file on a usb stick//usb hd and play it on the tv directly?
If so, does it exhibit the issues you are seeing when played via twonky from the nas?

Note:
I stream avc/aac encoded videos in the mp4 container, to multplie client devices in the home
each client device can/could/does have there own possible quirks
sometimes solved with firmware updates etc.
for example streaming mp4's to the ps3 a way back was painfull,
which was resolved with updates to it
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

Groetz
Posts:2
Joined:Tue Feb 07, 2012 9:34 pm
AV Hardware:Samsung UE37C5700
Sony BDP-S480
QNAP TS-212

Re: Audio and video getting out of sync

Post by Groetz » Sun Feb 12, 2012 8:50 am

Hi,

yesterday I tried to limited the involved parts. You were right - it does not depend on Twonky. I copied a recorded movie on an USB stick and plugged it into the Samsung TV. The result was the same: Afetr a while the audio and video were out of sync. Rewind solved it. But again just for a while.

Any idea what could cause the problem in the recorded stream? I record directly from my PC via the LAN (cable) on the NAS. Could a delay in writing the data cause a problem with the synchronization?

Thanks for your help

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Audio and video getting out of sync

Post by phibertron » Mon Feb 13, 2012 6:10 pm

I could be wrong, but I dont think it is because the file is being written to a network share
Possible, but in present day, not likely
For ex: back in the mid 90's if I tried to zip/unzip a file from a share on Win95
it would usually get corrupted =(
But those days are gone, programs and windows network stack is a lot better

Possible causes of the avsync are some of the following

1.
If you can play the video on the pc, does it de-sync there?
If not, then it could be the tv decoder that it is not buffering correctly
I would have said it was the time stamps,
but a ff/rw is finding a start/stop poiint and then re-sync is back
so the time stamps appear to be ok

Is there new firmware for the tv?
I would mention/search on the tv forums for the tv
that playback via usb displays the problem

2.
Does the encoder offer other types of file creation?
As maybe just maybe if you can put it into another format,
and or try to adjust some of the encode settings, it might help
but, this would help in the case of the tv, but could hurt other playback device abilities

3.
Another possible cause is in how the encoder is muxing the audio and video interleave
It might be worth a shot to see if you can demux the audio and video
and then mux them back together

I have had to do the demux/remux in the past on previously created avc/aac mp4's I created
as the muxer used at the timeintroduced issues
and by using an up to date or different muxer
I was able to aleviate the issues I was seeing, whcih arent the ones you see
But the idea/solution is relative
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

Locked