Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MythTV slow motion video and audio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Tbonius
n00b
n00b


Joined: 05 Oct 2003
Posts: 28
Location: Olympia, Wa

PostPosted: Sat Jul 10, 2004 3:40 am    Post subject: MythTV slow motion video and audio Reply with quote

:?:
I have been using the Gentoo distribution of GNU/Linux for about two years now and have been very pleased with the results of every project I have tackled using this distribution.

I recently ran into a bit of trouble after deciding to turn one of my machines into a PVR. After doing a little research, it seemed that MythTV was exactly the software package I was seeking and decided to give it a try.

The problem I seem to be experiencing is the Watch TV (Live TV) option runs video and audio slightly lagged. The video and audio do not seem to stutter or skip, it just appears to move and sound as if it were slow motion.

I will attempt to give my hardware and software configuration in a short, concise, and detailed manner.


Intel Pentium 4 1.8 Ghz processor
1 gig RAMBUS memory
Nvidia Geforce 4 TI 4200 128 Mb RAM
Hauppauge WinTV Radio 401
Western Digital 200 Gb harddrive with 8 Mb cache
Creative Sound Blaster Live audio card


I am currently running the 2.6.5-R1 kernel with the following options compiled for the kernel

Code:

Device Drivers --->
          o Multi-device support (RAID and LVM)
                + <*> Device mapper support
                      # <*> ioctl interface version 4
          o Character Devices
                + Linux InfraRed Controller --->
                      #  Linux InfraRed Controller
                      #  I2C Driver
                + <*> Enhanced Real Time Clock Support
          o I2C support --->
                +  <*> I2C support
                +  <*> I2C device interface
                      # <*> I2c bit-banging interfaces
          o Multimedia devices --->
                +  <M> Video For Linux
                + Video For Linux --->
                      #  <M> BT848 Video For Linux
          o Graphics support --->
                + <*> Support for frame buffer devices
          o Sound --->
                + <*> Sound card support
                + Advanced Linux Sound Architecture --->
                      # <*> Advanced Linux Sound Architecture
                      # <M> Sequencer Support
                      # <M> OSS API emulation
                      # <M> OSS Mixer API
                      # <M> OSS PCM (digital audio) API
                      # <M> RTC Timer support
                      # PCI devices --->
                            + <M> Bt87x Audio Capture
                            + <M> EMU10K1 (SB Live! & Audigy)


After compiling the kernel, inserting the appropriate modules, and performing a modules-update, I have the following modules listed:

Code:

nvidia               1701676  10
btaudio                15760  0
snd_mpu10k1           29992  0
snd_ac97_codec         59972  1 snd_mpu10k1
snd_seq_oss            32832  0
snd_seq_midi_event      6272  1 snd_seq_oss
snd_seq                53072  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          6792  3 snd_seq_oss,snd_seq
snd_pcm_oss            49828  0
snd_pcm                88420  2 snd_mpu10k1,snd_pcm_oss
snd_page_alloc          9476  2 snd_mpu10k1,snd_pcm
snd_timer              22468  2 snd_seq,snd_pcm
snd_mixer_oss          17920  1 snd_pcm_oss
snd                    49060  12 snd_mpu10k1,snd_ac97_codec,snd_seq_oss,snd_seq_midi_event,snd_seq,snd_seq_device,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
lirc_i2c                6408  1
lirc_dev               11400  2 lirc_i2c
tuner                  17100  0
tvaudio                20428  0
msp3400                22164  0
bttv                  142636  0
video_buf              16964  1 bttv
v4l2_common             4928  1 bttv
btcx_risc               3848  1 bttv
videodev                7744  1 bttv


I made sure the appopriate devices were created for video and sound:

Code:

ls -al /dev/sound/

drwxr-xr-x  1 root      root       0 Dec 31  1969 .
drwxr-xr-x  1 root      root       0 Dec 31  1969 ..
crw-rw----  1 root audio 14, 12 Dec 31  1969 adsp
crw-rw----  1 root audio 14,  4 Dec 31  1969 audio
crw-rw----  1 root audio 14,  3 Dec 31  1969 dsp
crw-rw----  1 root audio 14, 19 Dec 31  1969 dsp1
crw-rw----  1 root audio 14, 35 Dec 31  1969 dsp2
crw-rw----  1 root audio 14,  0 Dec 31  1969 mixer
crw-rw----  1 root audio 14, 16 Dec 31  1969 mixer1
crw-rw----  1 root audio 14,  1 Dec 31  1969 sequencer
crw-rw----  1 root audio 14,  8 Dec 31  1969 sequencer2

ls -al /dev/v4l

drwxr-xr-x  1 root      root        0 Dec 31  1969 .
drwxr-xr-x  1 root      root        0 Dec 31  1969 ..
crw-rw----  1 root video 81,  64 Dec 31  1969 radio0
crw-rw----  1 root video 81, 224 Dec 31  1969 vbi0
crw-rw----  1 root video 81,   0 Dec 31  1969 video0


I also added root (for now) to the video and audio groups.

Afterwards, I successfully emerged MythTV, and its dependencies (using the correct "USE" flags as described in the Gentoo Myth How-To article)

http://wopr.yi.org/mythtv.html
BTW.. many props and good karma to DrunkenTiger

After emerging MythTV and all related dependencies, I ran MythSeup and configured the audio input for the V4L device to be /dev/dsp1, and the output of the MythFrontend to be /dev/dsp. I also configure the sampling rate to be 32000 hz.

As stated before, when using the Watch TV (LiveTV) option, the video and audio is in slow motion.. sounding as if the resampling rate for the audio is way too slow.

I have played with other sample rates, changed the input sound device (which allowed the video to play in full motion, but there appeared to be no sound), tried other sound cards even.. but to no avail. Of course the sound card works correctly with any other apps, and I do not have ArtsD enabled.

Any insight on what potentially might be the issue would be greatly appreciated. Thank you

Tbonius
http://www.section6.net
Back to top
View user's profile Send private message
Toph
n00b
n00b


Joined: 02 Jun 2003
Posts: 24

PostPosted: Sat Jul 10, 2004 3:51 pm    Post subject: Reply with quote

I guess the myth-user list at www.mythtv.org would be a better place to ask for help in your situation.

Anyway, your problem definitly seems to be related to audio. Have you tried to chose a different sampling rate?
Another thing you should try is to configure MythTV to use an alternative AV-sync method. IIRC you can find some sync-related settings in Mythfrontend->settings->TV (esp. "Experimental AV-sync" , "Video as Timebase").

If that doesn't help, please post your version of MythTV (compiled for alsa or oss?) and especially the console-output of mythbackend and mythfrontend. And you should definitly look for more help at www.mythtv.org, maybe you'll even find help in their well sorted mailing-list-archive.
Back to top
View user's profile Send private message
Tbonius
n00b
n00b


Joined: 05 Oct 2003
Posts: 28
Location: Olympia, Wa

PostPosted: Sat Jul 10, 2004 11:25 pm    Post subject: Reply with quote

I actually have posted to the MythTV mailing list. Still no reply yet. I was hoping anyone here might have some insight to the issue.

As I stated before, I have tried different sample rates, and I did compile MythTV for Alsa. I will try the Experimental AV-Sync options and see what results it yields.

BTW, I am running mythtv-0.15.1-r1

I will post my mythbackend and frontend console messages if I continue to run into this issue. Thanks

Tbonius
http://www.section6.net
Back to top
View user's profile Send private message
Tbonius
n00b
n00b


Joined: 05 Oct 2003
Posts: 28
Location: Olympia, Wa

PostPosted: Sun Jul 11, 2004 1:15 am    Post subject: Reply with quote

This is the output of Mythbackend:

Code:

host root # mythbackend
Starting up as the master server.
2004-07-10 20:18:57 mythbackend: MythBackend started as master server
2004-07-10 20:18:57 mythbackend version: 0.15.20040525-1 www.mythtv.org
2004-07-10 20:18:57 Enabled verbose msgs : important general
2004-07-10 20:18:59 Found changes in the todo list.
2004-07-10 20:18:59 Scheduled 0 items in 0.002805 seconds.
2004-07-10 20:18:59 Seem to be woken up by USER
2004-07-10 20:19:07 mythbackend: Running housekeeping thread
2004-07-10 20:19:08 MainServer::HandleAnnounce Playback
2004-07-10 20:19:08 adding: obiwan as a client (events: 0)
2004-07-10 20:19:08 Getting next free recorder : -1
2004-07-10 20:19:08 MainServer::HandleAnnounce Playback
2004-07-10 20:19:08 adding: obiwan as a client (events: 1)
2004-07-10 20:19:08 MainServer::HandleAnnounce Playback
2004-07-10 20:19:08 adding: obiwan as a client (events: 0)
2004-07-10 20:19:08 MainServer::HandleAnnounce Playback
2004-07-10 20:19:08 adding: obiwan as a client (events: 0)
2004-07-10 20:19:08 adding: obiwan as a remote ringbuffer
2004-07-10 20:19:08 Changing from None to WatchingLiveTV
strange error flushing buffer ...
2004-07-10 20:19:15 Changing from WatchingLiveTV to None


And here is the output of Mythfrontend:

Code:

host root # mythfrontend
2004-07-10 20:19:05 mythfrontend version: 0.15.20040525-1 www.mythtv.org
2004-07-10 20:19:05 Enabled verbose msgs : important general
2004-07-10 20:19:05 Registering Internal as a media playback plugin.
2004-07-10 20:19:08 Connecting to backend server: 127.0.0.1:6543 (try 1 of 5)
2004-07-10 20:19:08 Using protocol version 8
2004-07-10 20:19:08 Using protocol version 8
2004-07-10 20:19:08 Using protocol version 8
2004-07-10 20:19:08 Opening OSS audio device '/dev/dsp'.
2004-07-10 20:19:08 Audio fragment size: 4096
2004-07-10 20:19:08 Using XV port 148
2004-07-10 20:19:09 Changing from None to WatchingLiveTV
vblank nvidia retrace timeout
A/V diverged by 21.844 frames, extending frame to keep audio in sync
A/V diverged by 24.49 frames, extending frame to keep audio in sync
A/V diverged by 21.3571 frames, extending frame to keep audio in sync
A/V diverged by 20.2112 frames, extending frame to keep audio in sync
A/V diverged by 20.5381 frames, extending frame to keep audio in sync
A/V diverged by 20.6934 frames, extending frame to keep audio in sync
A/V diverged by 20.7199 frames, extending frame to keep audio in sync
A/V diverged by 20.6424 frames, extending frame to keep audio in sync
A/V diverged by 20.5019 frames, extending frame to keep audio in sync
A/V diverged by 20.2991 frames, extending frame to keep audio in sync
A/V diverged by 20.0795 frames, extending frame to keep audio in sync
A/V diverged by 20.1541 frames, extending frame to keep audio in sync
A/V diverged by 20.4578 frames, extending frame to keep audio in sync
A/V diverged by 20.4908 frames, extending frame to keep audio in sync
A/V diverged by 20.2983 frames, extending frame to keep audio in sync
A/V diverged by 20.0789 frames, extending frame to keep audio in sync
A/V diverged by 20.0839 frames, extending frame to keep audio in sync
A/V diverged by 20.3228 frames, extending frame to keep audio in sync
A/V diverged by 20.412 frames, extending frame to keep audio in sync
A/V diverged by 20.2691 frames, extending frame to keep audio in sync
A/V diverged by 20.0871 frames, extending frame to keep audio in sync
A/V diverged by 20.2284 frames, extending frame to keep audio in sync
A/V diverged by 20.3337 frames, extending frame to keep audio in sync
A/V diverged by 20.3528 frames, extending frame to keep audio in sync
A/V diverged by 20.2922 frames, extending frame to keep audio in sync
A/V diverged by 20.1643 frames, extending frame to keep audio in sync
A/V diverged by 20.0223 frames, extending frame to keep audio in sync
A/V diverged by 20.1792 frames, extending frame to keep audio in sync
A/V diverged by 20.2219 frames, extending frame to keep audio in sync
A/V diverged by 20.1715 frames, extending frame to keep audio in sync
A/V diverged by 20.0513 frames, extending frame to keep audio in sync
A/V diverged by 20.1775 frames, extending frame to keep audio in sync
A/V diverged by 20.4304 frames, extending frame to keep audio in sync
A/V diverged by 20.5302 frames, extending frame to keep audio in sync
A/V diverged by 20.5076 frames, extending frame to keep audio in sync
A/V diverged by 20.2659 frames, extending frame to keep audio in sync
A/V diverged by 20.0022 frames, extending frame to keep audio in sync
A/V diverged by 20.1408 frames, extending frame to keep audio in sync
A/V diverged by 20.3654 frames, extending frame to keep audio in sync
A/V diverged by 20.459 frames, extending frame to keep audio in sync
A/V diverged by 20.4392 frames, extending frame to keep audio in sync
A/V diverged by 20.327 frames, extending frame to keep audio in sync
A/V diverged by 20.0106 frames, extending frame to keep audio in sync
A/V diverged by 20.2442 frames, extending frame to keep audio in sync
A/V diverged by 20.3756 frames, extending frame to keep audio in sync
A/V diverged by 20.3917 frames, extending frame to keep audio in sync
A/V diverged by 20.3138 frames, extending frame to keep audio in sync
A/V diverged by 20.1655 frames, extending frame to keep audio in sync
2004-07-10 20:19:16 Changing from WatchingLiveTV to None
2004-07-10 20:19:16 Changing from None to None
Not removing top-most widget


Tbonius
http://www.section6.net
Back to top
View user's profile Send private message
Toph
n00b
n00b


Joined: 02 Jun 2003
Posts: 24

PostPosted: Sun Jul 11, 2004 11:41 am    Post subject: Reply with quote

Okay, did you already try the "Video as timebase" option?

Other timing-based things you should check are:
- is /dev/rtc readable by you/the uid myth is running on?
- do you have permissions to access /dev/nvidia? That would be useful for vblank
- in mythsetup -> capture settings check what the max. sampling rate is set to.

BTW: Myth is still using OSS-emulation in your case.
Quote:
2004-07-10 20:19:08 Opening OSS audio device '/dev/dsp'.

I personally haven't used alsa with myth so far, but I guess instead of "/dev/dsp" you could use something like "alsa:default". I don't know how this is is supposed to work for sure, though.

And please check your dmesg for some OSS/Alsa related output when running myth.
Back to top
View user's profile Send private message
Tbonius
n00b
n00b


Joined: 05 Oct 2003
Posts: 28
Location: Olympia, Wa

PostPosted: Sun Jul 11, 2004 6:35 pm    Post subject: Reply with quote

I already tried ideo as Timebase"option.. and it appears to have no effect on the speed.

The prmissionss for RTC are:
Code:

lr-xr-xr-x    1 root     root            8 Jul 10 20:25 /dev/rtc -> misc/rtc

and root it running MythTV for now.
Code:

crw-rw-rw-    1 root     root     195,   0 Dec 31  1969 nvidia0
crw-rw-rw-    1 root     root     195, 255 Dec 31  1969 nvidiactl

Those are the permissions on the Nvidia devices.

The sample rates for capture are set to 32khz, and I have tried moving them in between 44.1 and 48khz, but this still has no effect.

Myth is using OSS emulation, yes. I did not realize I could pass ASLA device options to the output. I am not sure if I can do that bt I wil give it a try.

A snippit of /var/log/messages.. the only information pertaining to MythTV:

Code:

Jul 10 20:13:22 obiwan kernel: bttv0: OCERR @ 35e02000,bits: HSYNC OFLOW OCERR*
Jul 10 20:17:09 obiwan kernel: bttv0: skipped frame. no signal? high irq latency
? [main=35e02000,o_vbi=35e02018,o_field=2b028000,rc=2b02801c]
Jul 10 20:17:45 obiwan kernel: bttv0: skipped frame. no signal? high irq latency
? [main=35e02000,o_vbi=35e02018,o_field=2883e000,rc=2883e01c]
Jul 10 20:17:54 obiwan kernel: bttv0: skipped frame. no signal? high irq latency
? [main=35e02000,o_vbi=35e02018,o_field=2b048000,rc=2b04801c]
Jul 10 20:18:31 obiwan last message repeated 2 times
Jul 10 20:18:42 obiwan kernel: bttv0: skipped frame. no signal? high irq latency
? [main=35e02000,o_vbi=35e02018,o_field=2883e000,rc=2883e01c]



Thanks for the input again :)

Tbonius
http://www.section6.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum