Mplayerはコンソールで次の情報を提供してくれました。
torkvemada@inquisitia-nout ~ $ mplayer 85.21.79.5:8185/listen.pls
MPlayer 1.0rc2-4.3.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (Family: 6, Model: 28, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
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 85.21.79.5:8185/listen.pls.
Resolving 85.21.79.5 for AF_INET6...
Couldn't resolve name for AF_INET6: 85.21.79.5
Connecting to server 85.21.79.5[85.21.79.5]: 8185...
Cache size set to 320 KBytes
Playing 85.21.79.5:8185/.
Resolving 85.21.79.5 for AF_INET6...
Couldn't resolve name for AF_INET6: 85.21.79.5
Connecting to server 85.21.79.5[85.21.79.5]: 8185...
Name : 101.ru: Aquarium BG
Genre : N/A
Website: www.101.ru
Public : yes
Bitrate: 0kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
ICY Info: StreamTitle='ÀÊÂÀÐÈÓÌ - Íàóêè Þíîøåé - 0:00';StreamUrl='';
Cache fill: 15.00% (49152 bytes)
Audio file file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 27.8 (27.8) of -0.0 (unknown) 3.7% 45%
ICY Info: StreamTitle='ÀÊÂÀÐÈÓÌ - Âåëèêèé Äâîðíèê - 0:00';StreamUrl='';
A: 212.2 (03:32.2) of -0.0 (unknown) 3.7% 45%
ICY Info: StreamTitle='ADVBEGIN - ADVBEGIN - 0:00';StreamUrl='';
A: 213.5 (03:33.5) of -0.0 (unknown) 3.7% 45%
ICY Info: StreamTitle='ADV_0001 - 0:00';StreamUrl='';
A: 243.6 (04:03.5) of -0.0 (unknown) 3.7% 45%
ICY Info: StreamTitle='ADVENG - ADVENG - 0:00';StreamUrl='';
A: 247.7 (04:07.6) of -0.0 (unknown) 3.7% 45%
ICY Info: StreamTitle='ÀÊÂÀÐÈÓÌ - Áëþç Ïðîñòîãî ×åëîâåêà - 0:00';StreamUrl='';
A: 348.7 (05:48.7) of -0.0 (unknown) 3.6% 45%
Exiting... (Quit)
ご覧のとおり、すべての情報は取得されていますが、cp1251 mplayerエンコードは認識できませんでした。 他のすべてのプレイヤーと同様。 ちなみに、Windowsでは同様の状況が繰り返される可能性が高く、UTF-8のストリームを見つけるだけで十分です。 しかし、幸いなことに、状況を修正する機会があります。 mplayerのソースと2、3の再コンパイルを掘り下げて1時間(コンパイル速度の点で私のアトムは多くのことを望んでいます)、コマンドラインパラメーターがストリームのエンコードを取得し、正しいエンコードで情報を表示できるようにする小さなパッチをスケッチしました。 このパッチはiconvを使用しているため、必要に応じて絶対に任意のプレーヤーに適用し、Linuxシステムでid3タグとストリーム情報の両方を表示できます。
マニュアルの残りの部分はすべてAPTシステム(Ubuntu、Debian、場合によってはAltLinuxなど)に言及していますが、任意のシステムで簡単に繰り返すことができます。
` apt-get source mplayer`を実行してmplayerソースを取得します。
結果のディレクトリ( mplayer-1.0〜rc2があります)に移動して、ファイルを編集します。
- cfg-common.h:
90行目のどこかに追加します
- #ifdef USE_ICONV
- { "tagcp" 、 & tag_cp 、 CONF_TYPE_STRING 、 0、0、0 、 NULL } 、
- #endif
- libass / ass_mp.c:
36行目に追加します。
- #ifdef USE_ICONV
- extern char * tag_cp ;
- #else
- static char * tag_cp = 0 ;
- #endif
- stream / stream.h:
302行目に追加します。
- extern char * tag_cp ;
- ストリーム/http.c:
30行目に追加します。
- #ifdef USE_ICONV
- #include <iconv.h>
- char * tag_cp = 0 ;
- #endif
そして121行目( " info [len] = 0; "行の後):
- #ifdef USE_ICONV
- iconv_t iconv_converter = ( iconv_t ) ( - 1 ) ;
- char * outcp = "UTF-8" ;
- char * incp = tag_cp ;
- if ( tag_cp && ( iconv_converter == ( iconv_t ) ( - 1 ) ) ))
- {
- if ( ( iconv_converter = iconv_open ( outcp 、 incp ) ) == ( iconv_t ) ( - 1 ) )
- {
- mp_msg ( MSGT_DEMUXER 、 MSGL_ERR 、 "ICY:iconvを開けません。 ) ;
- }
- }
- if ( iconv_converter != ( iconv_t ) ( - 1 ) )
- {
- size_t tmp_conv_len = nlen * 4 ;
- size_t conv_len = tmp_conv_len ;
- size_t tmp_len = nlen ;
- char * tmp_info = info ;
- char * Converted_info = ( char * ) malloc ( conv_len + 1 ) ;
- if ( ! Converted_info )
- mp_msg ( MSGT_DEMUXER 、 MSGL_ERR 、 "ICY:メモリを割り当てることができません。 ) ;
- char * tmp_conv_info = Converted_info ;
- if ( ( conv_len = iconv ( iconv_converter 、 & tmp_info 、 & tmp_len 、 & tmp_conv_info 、 & tmp_conv_len ) ) == ( size_t ) ( - 1 ) )
- {
- mp_msg ( MSGT_DEMUXER 、 MSGL_WARN 、 「ICY:情報のアイコン化中にエラーが発生しました。」 ) ;
- free ( converted_info ) ;
- ( 無効 ) iconv_close ( iconv_converter ) ;
- }
- 他に
- {
- * tmp_conv_info = '\ 0' ;
- 無料(情報) ;
- info = Converted_info ;
- ( 無効 ) iconv_close ( iconv_converter ) ;
- iconv_converter = ( iconv_t ) ( - 1 ) ;
- }
- }
- #endif / * USE_ICONV * /
これで、組み立ててインストールすることができます。 ` debuild`と入力し、見つからないパッケージを悪用する(それらをインストールしてからdebuildを再度実行する)か、しばらくしてdebパッケージを収集します。 ` sudo dpkg -i ../ mplayer_1.0〜rc2-0ubuntu19 + medibuntu1_i386.deb`をインストールし、パッケージマネージャーがパッケージをリポジトリから再インストールすることを決定しないように修正します:` sudo aptitude hold mplayer` 。
Lazyはダウンロードできます:
ここで、 `tagcp`パラメータを指定してお楽しみください:
torkvemada@inquisitia-nout ~ $ mplayer -tagcp cp1251 85.21.79.5:8185/listen.pls
MPlayer 1.0rc2-4.3.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (Family: 6, Model: 28, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
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 85.21.79.5:8185/listen.pls.
Resolving 85.21.79.5 for AF_INET6...
Couldn't resolve name for AF_INET6: 85.21.79.5
Connecting to server 85.21.79.5[85.21.79.5]: 8185...
Cache size set to 320 KBytes
Playing 85.21.79.5:8185/.
Resolving 85.21.79.5 for AF_INET6...
Couldn't resolve name for AF_INET6: 85.21.79.5
Connecting to server 85.21.79.5[85.21.79.5]: 8185...
Name : 101.ru: Aquarium BG
Genre : N/A
Website: www.101.ru
Public : yes
Bitrate: 0kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
ICY Info: StreamTitle=' - - 0:00';StreamUrl='';
Cache fill: 15.00% (49152 bytes)
Audio file file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 14.9 (14.8) of -0.0 (unknown) 6.6% 45%
ICY Info: StreamTitle=' - №2 - 0:00';StreamUrl='';
A: 19.8 (19.8) of -0.0 (unknown) 6.5% 46%
Exiting... (Quit)