« Return to Thread: xine a/v sync issues

xine a/v sync issues

by Costa Tsaousis :: Rate this Message:

Reply to Author | View in Thread

For anyone interested, this is how I got "almost perfect" a/v sync with
xine.

By the end you will find a bash script. It creates a custom xine config
(will not overwrite yours) and start fbxine with the movie you supplied
in the command line.
Also, it can drive any number dxr3 cards (just change the card= line to
the card ID to use), and it can support alsa and oss for audio.

The key config options that made enough difference for me are:

audio.synchronization.av_sync_method:resample
audio.synchronization.force_rate:48000
audio.synchronization.resample_mode:on

The above enable resampling of audio. Resampling seems to make xine a
lot more accurate.

dxr3.encoding.alt_play_mode:0
dxr3.sync_every_frame:1

The above seem to allow xine to maintain a/v sync.

I still have some a/v issues, but:

1. they are at most 200 ms
2. they mostly appear at the beginning of a few movies
3. they disappear after 15-30 mins of playback

There is still one major issue with xine and dxr3. Subtitles (tested
.srt and .sub files) are displayed with wrong timing.

Here it is:

---

#!/bin/bash

card=1          # select the card: 1, 2, 3, etc
audio=oss      # select audio: alsa oss

cat >$HOME/.xine/config.card$card <<EOF

video.driver:dxr3
audio.driver:$audio

# If you use alsa
# you have to set alsa_id=EM8300-$card to em8300 kernel module options
audio.device.alsa_default_device:default:EM8300-$card
audio.device.alsa_front_device:default:EM8300-$card

# if you use oss
audio.device.oss_device_name:/dev/dsp
audio.device.oss_device_number:$card
audio.device.oss_mixer_number:$card
audio.oss_sync_method:getodelay

audio.synchronization.av_sync_method:resample
audio.synchronization.force_rate:48000
audio.synchronization.resample_mode:on

dxr3.device_number:$[card - 1]
dxr3.encoding.add_bars:0
dxr3.encoding.alt_play_mode:0
dxr3.sync_every_frame:1
dxr3.correct_durations:0
dxr3.preferred_tvmode:pal
dxr3.videoout_mode:widescreen tv

EOF

export LC_ALL=en_US
export XINERC="$HOME/.xine/config.card$card"
fbxine -A $audio -V dxr3 "${@}"

---



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

 « Return to Thread: xine a/v sync issues