[MPlayer-matrox] Any way to run mplayer continuously for analog rebroadcasting?

Brian Thompson brian at eng.wayne.edu
Wed May 10 02:29:36 CEST 2006


Forgot to mention that I also had to add "-af resample=44100:0:0"
to the CVS version command line, where that wasn't necessary with
the on mplayer-1.0pre7try2 version command line.

-Brian

Brian Thompson wrote:

>
> Ok, audio is working again although the solution is ugly.
> I copied ./libao2/ao_alsa.c from the mplayer-1.0pre7try2 source
> tree to the CVS source tree and then recompiled the CVS version.
> The output I'm now getting is the following and the audio works.
>
> Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
> [libaf] Adding filter resample
> [resample] Changing sample rate to 44100Hz
> [resample] Using linear interpolation.
> [resample] Using linear interpolation.
> alsa-init: requested format: 44100 Hz, 2 channels, 9
> alsa-init: compiled for ALSA-1.0.8
> alsa-init: setup for 1/2 channel(s)
> alsa-init: 1 soundcard found, using: default
> alsa-init: pcm opend in block-mode
> alsa-init: format s16le are not supported by hardware, trying default
> alsa-init: unable to set format: Invalid argument
> alsa-init: chunksize set to 1024
> alsa-init: fragcount=16
> alsa-init: got buffersize=65536
> alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit 
> Little Endian
> AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
> AO: Description: ALSA-0.9.x-1.x audio output
> AO: Author: Alex Beregszaszi, Zsolt Barat <joy at streamminister.de>
> AO: Comment: under developement
> Building audio filter chain for 48000Hz/2ch/s16le -> 44100Hz/2ch/s16le...
> [resample] Using linear interpolation.
> [resample] Using linear interpolation.
> Starting playback...
> alsa-space: free space = 65536, prepared --
> [libaf] Reallocating memory in module resample, old len = 0, new len = 
> 60212
>
> -Brian
>
>
> Brian Thompson wrote:
>
>>
>> Attila, thanks for the info. I'm trying to go in this direction but 
>> it looks
>> like the -fixed-vo and -idle flags are only available in the CVS version
>> of mplayer and I've run into a new problem trying to use the CVS
>> version of mplayer instead of mplayer-1.0pre7try2. I can't seem to get
>> any audio from the CVS version. I've tried quite a few of the additional
>> audio filter flags over the past several hours but nothing seems to 
>> help.
>>
>> I admit neither of the following outputs look perfect, but the first one
>> (mplayer-1.0pre7try2) does work. I'm using "-ao alsa" with no additional
>> audio parameters in both of the following cases. The sound card is a
>> USB Edirol UA-25. Anyone have any idea what I might be doing wrong?
>> Thanks in advance for any suggestions.
>>
>> With mplayer-1.0pre7try2 I get the following and audio works fine:
>>
>> Checking audio filter chain for 48000Hz/2ch/s16le -> 
>> 48000Hz/2ch/s16le...
>> [libaf] Adding filter dummy
>> [dummy] Was reinitialized: 48000Hz/2ch/s16le
>> AF_pre: 48000Hz/2ch/s16le
>> alsa-init: requested format: 48000 Hz, 2 channels, 9
>> alsa-init: compiled for ALSA-1.0.8
>> alsa-init: setup for 1/2 channel(s)
>> alsa-init: 1 soundcard found, using: default
>> alsa-init: pcm opend in block-mode
>> alsa-init: format s16le are not supported by hardware, trying default
>> alsa-init: unable to set format: Invalid argument
>> alsa-init: chunksize set to 1024
>> alsa-init: fragcount=16
>> alsa-init: got buffersize=65536
>> alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit 
>> Little Endian
>> AO: [alsa] 44100Hz 2ch s16le (2 bps)
>> AO: Description: ALSA-0.9.x-1.x audio output
>> AO: Author: Alex Beregszaszi, Zsolt Barat <joy at streamminister.de>
>> AO: Comment: under developement
>> Building audio filter chain for 48000Hz/2ch/s16le -> 
>> 44100Hz/2ch/s16le...
>> [dummy] Was reinitialized: 48000Hz/2ch/s16le
>> [libaf] Adding filter resample
>> [resample] Changing sample rate to 44100Hz
>> [resample] Changing sample rate to 44100Hz
>> [resample] Using linear interpolation.
>> [dummy] Was reinitialized: 48000Hz/2ch/s16le
>> [resample] Using linear interpolation.
>> Starting playback...
>> alsa-space: free space = 65536, prepared --
>> [libaf] Reallocating memory in module resample, old len = 0, new len 
>> = 60212
>>
>>
>> With the latest CVS version of mplayer I get the following and no audio:
>>
>> Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
>> [libaf] Adding filter dummy
>> [dummy] Was reinitialized: 48000Hz/2ch/s16le
>> [dummy] Was reinitialized: 48000Hz/2ch/s16le
>> alsa-init: requested format: 48000 Hz, 2 channels, 9
>> alsa-init: using ALSA 1.0.8
>> alsa-init: setup for 1/2 channel(s)
>> alsa-init: using device default
>> alsa-init: pcm opend in blocking mode
>> alsa-init: format s16le are not supported by hardware, trying default
>> alsa-init: unable to set format: Invalid argument
>> Could not open/initialize audio device -> no sound.
>> Uninit audio filters...
>> [libaf] Removing filter dummy
>> Uninit audio: dmo
>> Audio: no sound
>> Freeing 0 unused audio chunks.
>> Starting playback...
>>
>> -Brian
>>
>>
>> Attila Kinali wrote:
>>
>>> On Tue, 09 May 2006 15:41:06 -0400
>>> Brian Thompson <brian at eng.wayne.edu> wrote:
>>>
>>>  
>>>
>>>> It would be ideal if there was a way to keep mplayer from
>>>> quiting at the end of an event and try to reopen the same
>>>> stream,
>>>>   
>>>
>>>
>>>
>>> This can be done if you use -idle in combination with -fixed-vo
>>> (I'm not sure whether -fixed-vo works correctly with (x)mga
>>> as i cannot test it currently, if it doesn't let me know)
>>>
>>>  
>>>
>>>> preferably while the remaining buffer is still playing
>>>> in order to avoid the loss of the first few seconds of the next
>>>> event.   
>>>
>>>
>>>
>>> This can be solved using -slave interface. See the documentation
>>> of the loadfile command in DOCS/tech/slave.txt.
>>> Though i'm not sure whether MPlayer starts to buffer a stream
>>> while another is still running.
>>>
>>>  
>>>
>>>> If no content is available or while it's trying to reopen
>>>> the URL and refill it's cache, the matrox card would output
>>>> a blank/black tv-out image with proper sync.
>>>>   
>>>
>>>
>>>
>>> Hmm.. this is a bit more tricky. You'd have to manualy
>>> insert a black image. Maybe using loadfile and a black
>>> gif/jpeg could do the trick. Otherwise when using -fixed-vo
>>> the last shown frame stays on, which is probably not what you want.
>>>
>>>  
>>>
>>>> Does such a "continuous mode" exist and I'm just not able
>>>> to find it in the command line options, or is this something that
>>>> can be requested for a future release?
>>>>   
>>>
>>>
>>>
>>> I think you can hack something together with the above suggestions.
>>> If it doesn't help or you encounter other problems, please let me know.
>>>
>>>                 Attila Kinali
>>>
>>>  
>>>
>>
>> _______________________________________________
>> MPlayer-matrox mailing list
>> MPlayer-matrox at mplayerhq.hu
>> http://mplayerhq.hu/mailman/listinfo/mplayer-matrox
>
>
>
> _______________________________________________
> MPlayer-matrox mailing list
> MPlayer-matrox at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-matrox





More information about the MPlayer-matrox mailing list