Having got softdevice working recently (with Matrox G450 TV out), I've used it to watch a couple of films I've recorded. On one of them it seemed fine, but on the other there was a noticeable delay between audio and video. Every so often the picture would go sort of jerky for a few seconds as if it were dropping frames to try to get back in sync, but failing. The amount of delay seemed fairly consistent.
I had a similar problem with MPlayer (except the periods of jerking) until someone told me to try -ao oss because it's buggy with alsa. Is softdevice's audio code based on MPlayer's, perhaps?
libsoftmpeg's IDEAS file http://linuxtv.org/cgi-bin/viewcvs.cgi/libsoftmpeg/IDEAS?view=markup mentions adjusting the speed of sound playback (presumably by resampling) to avoid buffer xruns if the sound card's clock doesn't quite match the broadcast stream's. I think this resampling idea could be used to approach A/V sync from a different angle.
The curent problem is that existing players are designed to play the sound at a certain rate and then sync the picture to it. That means if video playback is also synced to vblank, and you can't control the video card's clock, you have to drop or repeat frames to adjust the picture timing. If you don't bother syncing video frame changeovers to the hardware vblank it tends to cause "tearing" artifacts for progressive scan video, and is pretty disastrous for interlaced video.
So seeing as there's a need to keep the video in sync with the hardware, why not base the playback timing on the video and adjust the sound to match it instead of the other way round? There are plenty of resampling libraries already available. You may still need to drop/repeat frames to keep up with a broadcast stream, but this approach could offer an improvement and avoid sound glitches from xruns if the video card's clock is a closer match to the source than the sound card's - in my PC I'd trust the Matrox more than its £5 sound card, but users with good sound cards just may be better off with the current method. For playback of recordings though I think my idea should give smoother results.
Tony Houghton h@realh.co.uk wrote:
I had a similar problem with MPlayer (except the periods of jerking) until someone told me to try -ao oss because it's buggy with alsa. Is softdevice's audio code based on MPlayer's, perhaps?
My softdevice VDR runs very stably (Asus A7V8X, Athlon XP-M 2400+, SUSE Linux 9.3, Matrox G550 DVI out (!), 1280x720 resolution). Maybe your CPU is too slow or the machine starts swapping. You don't say anything about your installation so I can only speculate. Me at your place I'd join the softdevice mailing list.
In 20060127162707.E796712F349@seneca.muc.de, Harald Milz wrote:
Tony Houghton h@realh.co.uk wrote:
I had a similar problem with MPlayer (except the periods of jerking) until someone told me to try -ao oss because it's buggy with alsa. Is softdevice's audio code based on MPlayer's, perhaps?
My softdevice VDR runs very stably (Asus A7V8X, Athlon XP-M 2400+, SUSE Linux 9.3, Matrox G550 DVI out (!), 1280x720 resolution). Maybe your CPU is too slow or the machine starts swapping. You don't say anything about your installation so I can only speculate. Me at your place I'd join the softdevice mailing list.
I've got a Celeron 1.2GHz (P3 class) on an i815 (IIRC) chipset [1] and it only has to cope with up to 720x576 ( :-( ). It should be enough. Last time I checked CPU load was about 60% while softdevice was running. It's only got 256MB RAM, but I've been keeping an eye on memory usage, and it hasn't been swapping lately. When I did run out of RAM in the past, the symptoms were much more obvious in MPlayer. I think the sound card is more likely to make a difference. I'm going to try to get a Santa Cruz from eBay (none all week, then 2 or 3 end at once).
Are you receiving HDTV, or just outputting PAL to a big monitor? How does your set-up deal with interlacing?
[1] BTW, even my current £5 sound card is an improvement on the onboard sound, which is too quiet!
In 20060127171403.GA16883@realh.co.uk, Tony Houghton wrote:
I've got a Celeron 1.2GHz (P3 class) on an i815 ....
Was it just me, or did everyone see the bottom of this message get garbled with headers from another from Christian Marrilat?
Tony Houghton h@realh.co.uk wrote:
Are you receiving HDTV, or just outputting PAL to a big monitor? How does your set-up deal with interlacing?
No, HDTV broadcasting hasn't really started yet over here (you can't buy DVB-S2 equipment yet), and everything is likely to be encrypted anyway. But some stations do send anamorphously encoded 16:9 material over PAL, which softdevice nicely transfers in 720p resolution over DVI. I'm transmitting 720p anyway all the time (setting is 16:9).
[1] BTW, even my current £5 sound card is an improvement on the onboard sound, which is too quiet!
This is why I use the SPDIF out :-)
In 20060128175710.AA44A133A6E@seneca.muc.de, Harald Milz wrote:
Tony Houghton h@realh.co.uk wrote:
Are you receiving HDTV, or just outputting PAL to a big monitor? How does your set-up deal with interlacing?
No, HDTV broadcasting hasn't really started yet over here (you can't buy DVB-S2 equipment yet), and everything is likely to be encrypted anyway. But some stations do send anamorphously encoded 16:9 material over PAL, which softdevice nicely transfers in 720p resolution over DVI. I'm transmitting 720p anyway all the time (setting is 16:9).
So I guess you have to use a deinterlacing filter for interlaced programs?
Tony Houghton h@realh.co.uk wrote:
DVI. I'm transmitting 720p anyway all the time (setting is 16:9).
So I guess you have to use a deinterlacing filter for interlaced programs?
None so far. I did check the available filters and could not see any difference but that may just be me...