Mplayer - getting sound with TV.


Results 1 to 3 of 3

Thread: Mplayer - getting sound with TV.

  1. #1
    Join Date
    Mar 2003
    Location
    UK
    Posts
    621

    Mplayer - getting sound with TV.

    ALSA AND ALSA OSS EMULATION SOUND WITH MPLAYER WITH TELEVISION

    It is a bugger getting Mplayer to give sound with a television capture card.

    Doing this may be usefull if you can't or don't want to wire the card to the soundcard - because, otherwise, there are latency problems with the sound lagging the picture so that the lip-sync is out; this is especially true with ALSA.

    This is an saa7134 capture card. The box has the ALSA-saa7143 module and the ALSA-OSS-saa7143 module in the kernel. It uses Debian Lenny 500.

    HERE'S HOW:

    Code:
    mplayer -tv adevice=/dev/dsp1:immediatemode=0:audiorate=32000 tv://
    You're supposed to put the tv:// at the start, but I havn't checked if that makes any difference - it is unbelievably temperamental. Mplayer by default has immediatemode=1 this means ignore the sound and assume it is going along a wire from the tv card to the soundcard. I get the impression the setting of the audio rate to 32000 may be necessary with all saa7143 cards, (?even if this is not their rate). Presumably the ALSA-OSS module creates the /dev/dsp1 sound device.

    The ~/.mplayer/config file contains:
    Code:
    tv=driver=v4l2:pal-I:input=0:amode=1:outfmt=yuy2:width=1408:height=904:
    chanlist=europe-west:channels=27-BBC1,S32-BBC2,29-ITV1,21-CH4,24-CH5,S27-NEWS24
    edit: Sorry there is a syntax error in the config file, this explains the bug (below). It should be :norm=PAL-I:
    A BIZARRE BUG:


    There appears to be a strange bug. If you put chanlist=europe-wes.... into the command line there is no sound. A related ?bug is that hitting the h or k keys does not change between the above specified channels, as it should. It is therefore neccessary to change channels using TvTime or something. edit: No it isn't.

    OTHER WAYS OF GETTING SOUND:
    Code:
    $ mplayer -tv adevice=/dev/dsp1:immediatemode=0:audiorate=32000:outfmt=i420 -vc rawi420 -vo xv tv://
    and a pure ALSA way of doing it:
    Code:
    $ mplayer -tv alsa:adevice=hw.1:immediatemode=0:audiorate=32000:volume=1:amode=1 -mixer /dev/mixer1
    IT IS VERY TEMPERAMENTAL:

    Sometimes sound will not happen. If so, start tvtime stop it again and that should fix it. Why's this happen??

    ISN'T SOUND A BUGGER:

    There is, of course, all sorts of stuff that may interfere. If using KDE switch off arts in the controll center to be on the safe side; or put artsdsp in front of mplayer in the command line perhaps. Etc..

    There is distortion sometimes with me. It is usually not too bad. (A tip with distortion sometimes is to make sure the alsamixer controls are not in the red.)

    Isn't life grand.
    Last edited by lugoteehalt; 07-16-2009 at 08:20 AM.
    MI6, Offensive Information, Hackers, Encryption, UFO, AOL, Infowar, Bubba, benelux, Ufologico Nazionale, domestic disruption, 15kg, DUVDEVAN, debugging, Bluebird, Ionosphere, Keyhole, NABS, Kilderkin, Artichoke, Badger, spookwords, EuroFed, SP4, Crypto AG a few, alleged, Echelon keywords. Please add some to your email signature. Full list: http://www.serendipity.li/cia/bz1.html
    http://www.nosoftwarepatents.com/

  2. #2
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,947
    Quote Originally Posted by lugoteehalt View Post
    It is a bugger getting Mplayer to give sound with a television capture card.
    Your /dev/video0 device doesn't just provide a stream with audio and video together? (Maybe that requires a card that does compression -- which I think is a waste of effort BTW -- so that might explain why that doesn't work for you. My ivtv card works fine just pointing mplayer at /dev/video0 (or whatever appropriate video device file).)

    because, otherwise, there are latency problems with the sound lagging the picture so that the lip-sync is out; this is especially true with ALSA.
    Hmm... not with the card hardware generating the audio stream's synchronization.

    (Does xawtv or similar work, rather than mplayer? Maybe you need mplayer for some other reason though.)

  3. #3
    Join Date
    Mar 2003
    Location
    UK
    Posts
    621
    I have found it a bugger in the past and the, sort of, definitive wiki about setting up saa7143 tv cards asked someone to put in how to get mplayer to work, so, presumably I'm not the only one with the problem.

    (Incidentally - in an act of insanity - the wiki has pulled the article and replaced it with vastly inferior ones. I am thinking I should post the origional here, if you have no objection, with suitable acknolegments, using my copy.)

    I get no sound, except with mythtv and now mplayer, unless it is taken out with something like sox or along a wire to the sound card. With sox it lags the picture, less so with alsa-oss emulation.

    Any road, there is a mistake in the first post - there's a syntax error in the ~/.mplayer/config file. This was what was causing the temperament and the 'bugs'. So I'll edit the post.
    MI6, Offensive Information, Hackers, Encryption, UFO, AOL, Infowar, Bubba, benelux, Ufologico Nazionale, domestic disruption, 15kg, DUVDEVAN, debugging, Bluebird, Ionosphere, Keyhole, NABS, Kilderkin, Artichoke, Badger, spookwords, EuroFed, SP4, Crypto AG a few, alleged, Echelon keywords. Please add some to your email signature. Full list: http://www.serendipity.li/cia/bz1.html
    http://www.nosoftwarepatents.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •