OVH Cloud OVH Cloud

mplayer et streaming

13 réponses
Avatar
olive
Bonsoir,

Après une lecture du man de mplayer, je n'ai pas trouvé la réponse à ma
question. J'imagine qu'elle y figure, mais ce man est très dense.

Voici donc cette question : j'écoute la radio (France Culture, ou France
Infos) en streaming pour m'endormir, avec mplayer sur l'adresse directe
du flux disponible sur le site de Radio France. J'aimerais donc trouver
la commande qui indique à mplayer de stopper sa lecture au bout d'une
heure, ou une autre durée, pour que ça ne tourne pas toute la nuit.

Si quelqu'un pouvait m'indiquer l'option adéquate pour dire à mplayer de
diffuser le flux pour un temps t, je lui en serais reconnaissant.


--
Olivier -- "On est comme tous les artistes, on croit à notre produit."
-+-groupe Début de Soirée-+-

3 réponses

1 2
Avatar
olive
olive ecrivait :

(...)

Par curiosité, j'ai fait le même test avec ma machine de bureau sous
Ubuntu 11.04, pas à jour donc, mais un peu plus fraîche que mon netbook.
Même résultat :


:~$ mplayer
http://www.tv-radio.com/station/france_info/france_info.m3u -endpos 12
MPlayer 1.0rc4-4.5.2 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing http://www.tv-radio.com/station/france_info/france_info.m3u.
Resolving www.tv-radio.com for AF_INET6...
Couldn't resolve name for AF_INET6: www.tv-radio.com
Resolving www.tv-radio.com for AF_INET...
Connecting to server www.tv-radio.com[91.197.165.1]: 80...
Resolving gisv3.tv-radio.com for AF_INET6...
Couldn't resolve name for AF_INET6: gisv3.tv-radio.com
Resolving gisv3.tv-radio.com for AF_INET...
Connecting to server gisv3.tv-radio.com[91.197.164.1]: 80...
Cache size set to 320 KBytes


Playing http://mp3.live.tv-radio.com/franceinfo/all/franceinfo.mp3.
Resolving mp3.live.tv-radio.com for AF_INET6...
Couldn't resolve name for AF_INET6: mp3.live.tv-radio.com
Resolving mp3.live.tv-radio.com for AF_INET...
Connecting to server mp3.live.tv-radio.com[95.81.165.3]: 80...
Resolving 95.81.147.3 for AF_INET6...
Couldn't resolve name for AF_INET6: 95.81.147.3
Connecting to server 95.81.147.3[95.81.147.3]: 80...
Name : France Info - 64 - mp3
Website: http://www.france-info.fr
Public : no
Bitrate: 128kbit/s
Cache size set to 320 KBytes
Cache fill: 7.50% (24576 bytes)
ICY Info: StreamTitle='';StreamUrl='';

Audio only file format detected.
========================================================================= Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
mpg123: Can't rewind stream by 1010 bits!
AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
========================================================================= AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
mpg123: Can't rewind stream by 3 bits!
A: 12.0 (12.0) of -0.0 (unknown) 0.3% 16%

Playing http://mp3.live.tv-radio.com/franceinfo/all/franceinfo.mp3.
Resolving mp3.live.tv-radio.com for AF_INET6...
Couldn't resolve name for AF_INET6: mp3.live.tv-radio.com
Resolving mp3.live.tv-radio.com for AF_INET...
Connecting to server mp3.live.tv-radio.com[95.81.165.3]: 80...
Resolving 95.81.147.3 for AF_INET6...
Couldn't resolve name for AF_INET6: 95.81.147.3
Connecting to server 95.81.147.3[95.81.147.3]: 80...
Name : France Info - 64 - mp3
Website: http://www.france-info.fr
Public : no
Bitrate: 128kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
ICY Info: StreamTitle='';StreamUrl='';

Audio only file format detected.
========================================================================= Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
========================================================================= AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 12.1 (12.1) of -0.0 (unknown) 0.3% 16%

Exiting... (End of file)
:~$

Espérant aider.

--
Olivier -- "On est comme tous les artistes, on croit à notre produit."
-+-groupe Début de Soirée-+-
Avatar
Stéphane Goujet
Le Mon, 14 Nov 2011 15:33:17 +0100,
olive a écrit :

Oui bien sûr (sauf erreur, pas facile de copier/coller une aussi
longue sortie avec le trackpad d'un eeepc 701).
:~$ mplayer
http://www.tv-radio.com/station/france_info/france_info.m3u -endpos 12


[...]

Le fichier .m3u contient deux fois le lien .mp3 . Vous pouvez
enregister sur votre disque le fichier .m3u, éliminer une des deux
lignes et faire :

mplayer -playlist france_info.m3u -endpos 12

Ou alors vous pouvez utiliser directement ce lien, par exemple :

mplayer http://mp3.live.tv-radio.com/franceinfo/all/franceinfo.mp3
-endpos 12
Avatar
olive
Stéphane Goujet écrivait :

Le fichier .m3u contient deux fois le lien .mp3 .



Ah voilà donc l'explication. C'est vraiment idiot, mais j'ai pas pensé à
éditer le .m3u.

mplayer http://mp3.live.tv-radio.com/franceinfo/all/franceinfo.mp3
-endpos 12



Nickel. Désolé pour le bruit.

--
Olivier -- "On est comme tous les artistes, on croit à notre produit."
-+-groupe Début de Soirée-+-
1 2