Old 25th September 2006, 12:37   #1
UGJammin
Junior Member
 
Join Date: Aug 2006
Posts: 5
A/V Sync issues - driving me crazy!

Hi,

I am having a majorly annoying problem with my stream. Basically, I use my stream to broadcast pre-recorded files which I convert to NSV and upload to my dedicated server and then distribute using the Shoutcast Server.

I take a raw .avi file from a Sony DV camera and do a little bit of editing and stick on a logo etc using Adobe Premiere Pro 1.5. I then export the .avi file and encode it using NSVate.
I encode the video using VP61/VFW and the audio using RAW AAC v1.00
The problem I have is that when the end of the file is reached, the audio continues for 1-2 seconds longer than the video, causing it to be out of sync when the next file starts.
Here's my settings:

VP61 settings:
Bitrate: 128k
Mode: Realtime/Live encoding
End usage: Stream from a server
Material: Progressive
Noise reduction: 1
Auto Keyframe: checked
Max frames between keys: 90

Datarate Control:
Undershoot % target: 90
Adjust Quantizer: checked
Minimum: 4
Maximum: 56

Streaming Parameters:
Peak bitrate % as target: 100
Prebuffer (secs): 4
Optimal buffer (secs) 5
Max buffer: (secs) 6

Temporal Resampling & Spatial resampling both unchecked (I have no idea what they are)

NSV Format options:
Auto send-ahead (ms): 0
Min/max sync frame interval: 0 / 120

I have had a look through the really useful guides on the scvi.net website and tried following all the instructions on there but nothing seems to work.
Things I've tried:
*Changing bitrate
*Forcing different framerates
*Not forcing a framerate
*Using VP3 instead of VP6
*Changing the 'max frames between keys' option
*Swearing at it - and loads more.

I am wondering if I am doing something wrong server-side as when I play the individual files locally they are fine, it's just when I make the stream live it messes up at the end of each file. If you reconnect to the stream it syncs again.

Apologies for the length of this thread but I really really need some help and I wanted to show I had tried loads of different options.

Please help me!!!
UGJammin is offline   Reply With Quote
Old 25th September 2006, 17:44   #2
UGJammin
Junior Member
 
Join Date: Aug 2006
Posts: 5
OK, having spent ages looking at this I think I have pinpointed the problem.
The stream appears to drop the penultimate second of the video file but not the audio file.
I understand that winamp pre-buffers the video more than the audio and I think what is happening is that winamp pre-buffers the video but the server then tells it it has moved onto the next file and therefore it prematurely stops the video file to move onto the next one.
There definitely isn't a problem with the nsv files as they work fine on local playback and it doesn't seem to be a server problem as if you disconnect and reconnect the audio and video are in sync.
Any ideas would be much appreciated.
UGJammin is offline   Reply With Quote
Old 25th September 2006, 20:18   #3
rockouthippie
Banned
 
rockouthippie's Avatar
 
Join Date: Jun 2004
Location: Oregon
Posts: 11,002
You have to set the key frames right to keep sync.

Set threshold and minimum at 2 X your frame rate, set maximum at 4X the frame rate.
rockouthippie is offline   Reply With Quote
Old 25th September 2006, 20:35   #4
UGJammin
Junior Member
 
Join Date: Aug 2006
Posts: 5
Hi rockouthippie,

Thanks for the advice but I don't think that's the issue...
As I mentioned in my second post, on local playback there are no sync issues and on the stream it drops the penulimate second of video, no matter how long the file.
It's like winamp is buffering the file, then the server moves onto the next file to winamp drops what's in the buffer and starts the new file but the audio doesn't drop out.
I'll leave it up running for a bit with a short file on there so you can have a look and see what I mean.
http://69.57.128.41:14/;stream.nsv

Thanks for the advice, fingers crossed I can sort it out!
UGJammin is offline   Reply With Quote
Old 26th September 2006, 17:39   #5
rockouthippie
Banned
 
rockouthippie's Avatar
 
Join Date: Jun 2004
Location: Oregon
Posts: 11,002
What source program are you using?. I thought you were talking about losing sync in the file. Losing sync in between tracks is the fault of the source program. The only one I ever found that worked right was KXRMs sc_nsv (besides the nsv shouter). The others lose sync.

Something that sometimes cures the problem: Take the source file (before encoding to NSV) and cut the end of it off exactly at the last keyframe or keyframe minus one frame.
rockouthippie is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast TV / Nullsoft Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump