Sundtek Support Forum

English => Sundtek MediaTV Pro (Europe) => Thema gestartet von: fuzz am September 10, 2009, 12:20:00 Vormittag

Titel: Audio in Myth (analog)
Beitrag von: fuzz am September 10, 2009, 12:20:00 Vormittag
Hi,

When I watch TV (analog) in MythTV the audio is a few seconds ahead of the video.

I hypothesize that maybe this is because Myth keeps a small buffer for skipping commercials and such stuff, while the MediaPro does some magic with the audio, so that it is out of Myth's control, so it cannot compensate for the delay caused by the buffer. Even if it can be disabled in Myth, I still have a problem with no audio on recordings which I suppose has to do with the internal audio magic too.

I tried "mediaclient -m ATV -d /dev/video0 -c external" to disable the internal audio processing, but then I just get no sound. How is this supposed to work? Is there a corresponding /dev/dspX device or something when using external audio processing? Or should Myth be able to somehow get the audio from /dev/video0 (not likely?) or something?

Or is this possibly why Myth is not recommended for analog tv? :-) If so, can you recommend another app that can do scheduled recordings with the MediaPro in analog mode?

Titel: Re:Audio in Myth (analog)
Beitrag von: Sundtek am September 10, 2009, 12:37:08 Vormittag
We currently try to emulate the oldest TV tuners by forwarding the audio stream directly to the soundcard.
The first Linux TV devices were internally wired with the soundcards, this is required for a few applications in order to support audio out of the box (eg. tvtime, radio (from the xawtv package) and other radio tools).

We are about to add an OSS interface soon. Until this is done the only way to capture audio with mythtv is to install an audio loopback from line-out to line-in on your soundcard (just like in old days with the first linux TV tuner devices). The OSS interface has a ticket in our software tracker and should be available within 1-2 weeks.

Right now we support capturing the audio samples digitally through /dev/video[n] read() (for example cat /dev/video[n] | aplay or lame - test.mp3), video frames are only returned by using memory mapped transfers.

There is one project going on adding an mpg encoder directly to the driver in order to directly encode synchronous mpeg video from analog sources of MediaTV devices.
Titel: Re:Audio in Myth (analog)
Beitrag von: Sundtek am September 24, 2009, 04:22:41 Vormittag
There's a prerelease available which supports OSS Audio which can be used with MythTV

http://www.sundtek.de/support/empia_installer_090924_prerelease.sh

the official release is planned for 25. September

by default the driver tries to play back audio internally, in order to switch the driver to oss support only following command has to be used:

$ /opt/bin/mediaclient -c external -d /dev/video1 -m ATV

to switch the driver back to internal mode "-c internal" has to be used, please note /dev/video1 might differ on your system you might have to adjust it accordingly to what "/opt/bin/mediaclient -e" shows up.
Titel: Re:Audio in Myth (analog)
Beitrag von: fuzz am September 29, 2009, 12:35:11 Vormittag
There's a prerelease available which supports OSS Audio which can be used with MythTV

Cool.

But I can't get it to work :) I tried both 090924-prerelease and 090926. Installation works. But if I try to start mplayer tv=driver=v4l2:device=/dev/video0 it just hangs after this:

Zitat
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)

MythTV also hangs if I try to configure a capture card. Even "ls /dev/video0" hangs.

Reinstalling the 090917 driver releases the ls command and then it says "cannot access /dev/video0: Connection refused".

Tried switching back and forth between 090917, 090924 and 090926 several times and the results are always the same - 090917 works fine, the other two causes a hang.

Any ideas?
Titel: Re:Audio in Myth (analog)
Beitrag von: Sundtek am September 29, 2009, 01:15:21 Vormittag
What Distribution/Version are you using?
Titel: Re:Audio in Myth (analog)
Beitrag von: fuzz am Oktober 03, 2009, 01:20:09 Vormittag
What Distribution/Version are you using?

Ubuntu 9.04
Titel: Re:Audio in Myth (analog)
Beitrag von: Sundtek am Oktober 03, 2009, 02:14:02 Vormittag
You might try the latest driver from 3rd October on (so far we got a positive feedback in the german forum since the first official mythtv audio update got published):

http://support.sundtek.de/index.php/board,9.0.html