[MPlayer-users] No sound for SVN 27055

Changjin Liu lcj.liu at gmail.com
Fri Jun 13 03:32:29 CEST 2008


I found if I add this line:

 

d_audio->id = sh_audio->aid;

 

after:

d_audio->sh = sh_audio; sh_audio->ds = d_audio;

 

in the rtpCodecInitialize_audio of  demux_rtp_codec.cpp, mplayer will play
sound well.

 

·¢¼þÈË: Changjin Liu [mailto:lcj.liu at gmail.com] 
·¢ËÍʱ¼ä: 2008Äê6ÔÂ13ÈÕ 8:31
ÊÕ¼þÈË: 'mplayer-users at mplayerhq.hu'
Ö÷Ìâ: No sound for SVN 27055

 

I checked out the lastest svn of MPlayer and compiled. I found that when
receiving stream from RTSP server(with command: mplayer rtsp://192.168.6.92
¨Cv), mplayer won¡¯t play out sound. Then I tried MPlayer1.0rc2(I downloaded
the source and compile it) , it is ok with sound.  The output of MPlayer SVN
and 1.0rc2 is at the last of the mail.

NOTE that both mplayer had found audio stream but svn version ouput ¡°Audio:
no sound¡± before open audio codec.

 

After some digging into svn code, I found that if I change
demuxer_switch_audio as the following in libmpdemux/demuxer.c, MPlayer svn
will playback sound.

The modified code is about the same as 1.0rc2.

 

int demuxer_switch_audio(demuxer_t *demuxer, int index){

    int res = demux_control(demuxer, DEMUXER_CTRL_SWITCH_AUDIO, &index);

    if (res == DEMUXER_CTRL_NOTIMPL)

      index = demuxer->audio->id;

   printf("demuxer->audio->id = %d,index=%d\n",demuxer->audio->id,index); //
output: demuxer->audio->id = -1,index=-1

#if 0

    if (demuxer->audio->id >= 0)

      demuxer->audio->sh = demuxer->a_streams[demuxer->audio->id];

    else

      demuxer->audio->sh = NULL;

#endif

    return index;

}

 

Could anyone help me? thanks

 

 

############################################################################
####

############### BEGIN: Output of MPlayer SVN
#######################################

############################################################################
####

¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­.

STREAM_RTSP, URL: rtsp://192.168.6.92

Filename for url is now rtsp://192.168.6.92

Filename for url is now rtsp://192.168.6.92

Connecting to server 192.168.6.92[192.168.6.92]: 554...

SDP:

v=0

o=- 1104537691104555 1 IN IP4 192.168.6.92

s=BesoVideo Media Server

i=h264Live

t=0 0

a=tool:Besovideo Media Server v2008.04.09

a=type:broadcast

a=control:*

a=range:npt=0-

a=x-qt-text-nam:BesoVideo Media Server

a=x-qt-text-inf:h264Live

m=video 0 RTP/AVP 96

c=IN IP4 0.0.0.0

a=rtpmap:96 H264/90000

a=x-framerate:25

a=fmtp:96
packetization-mode=1;profile-level-id=42801E;sprop-parameter-sets=Z0KA

HomVwsEtgQBA

a=control:track1

m=audio 0 RTP/AVP 97

c=IN IP4 0.0.0.0

a=rtpmap:97 L8/8000

a=control:track2

 

A single media stream only is supported atm.

rtsp_session: unsupported RTSP server. Server type is 'unknown'.

WINSOCK2 init: 0

Filename for url is now rtsp://192.168.6.92

Filename for url is now rtsp://192.168.6.92

STREAM_LIVE555, URL: rtsp://192.168.6.92

STREAM: [RTSP and SIP] rtsp://192.168.6.92

STREAM: Description: standard RTSP and SIP

STREAM: Author: Ross Finlayson

STREAM: Comment: Uses LIVE555 Streaming Media library.

Stream not seekable!

 file format detected.

Sending request: DESCRIBE rtsp://192.168.6.92 RTSP/1.0

CSeq: 1

Accept: application/sdp

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received DESCRIBE response: RTSP/1.0 200 OK

CSeq: 1

Date: Sat, Jan 01 2005 14:26:13 GMT

Content-Base: rtsp://192.168.6.92/h264Live/

Content-Type: application/sdp

Content-Length: 523

 

 

Need to read 523 extra bytes

Read 523 extra bytes: v=0

o=- 1104537691104555 1 IN IP4 192.168.6.92

s=BesoVideo Media Server

i=h264Live

t=0 0

a=tool:Besovideo Media Server v2008.04.09

a=type:broadcast

a=control:*

a=range:npt=0-

a=x-qt-text-nam:BesoVideo Media Server

a=x-qt-text-inf:h264Live

m=video 0 RTP/AVP 96

c=IN IP4 0.0.0.0

a=rtpmap:96 H264/90000

a=x-framerate:25

a=fmtp:96
packetization-mode=1;profile-level-id=42801E;sprop-parameter-sets=Z0KA

HomVwsEtgQBA

a=control:track1

m=audio 0 RTP/AVP 97

c=IN IP4 0.0.0.0

a=rtpmap:97 L8/8000

a=control:track2

 

Initiated "video/H264" RTP subsession on port 5822

Increased video socket receive buffer to 2000000 bytes

Sending request: SETUP rtsp://192.168.6.92/h264Live/track1 RTSP/1.0

CSeq: 2

Transport: RTP/AVP;unicast;client_port=5822-5823

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received SETUP response: RTSP/1.0 200 OK

CSeq: 2

Date: Sat, Jan 01 2005 14:26:13 GMT

Transport:
RTP/AVP;unicast;destination=192.168.6.88;source=192.168.6.92;client_p

ort=5822-5823;server_port=6970-6971

Session: 55

 

 

Initiated "audio/L8" RTP subsession on port 5824

Increased audio socket receive buffer to 100000 bytes

Sending request: SETUP rtsp://192.168.6.92/h264Live/track2 RTSP/1.0

CSeq: 3

Transport: RTP/AVP;unicast;client_port=5824-5825

Session: 55

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received SETUP response: RTSP/1.0 200 OK

CSeq: 3

Date: Sat, Jan 01 2005 14:26:13 GMT

Transport:
RTP/AVP;unicast;destination=192.168.6.88;source=192.168.6.92;client_p

ort=5824-5825;server_port=6972-6973

Session: 55

 

 

Sending request: PLAY rtsp://192.168.6.92/h264Live/ RTSP/1.0

CSeq: 4

Session: 55

Range: npt=0.000-

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received PLAY response: RTSP/1.0 200 OK

CSeq: 4

Date: Sat, Jan 01 2005 14:26:13 GMT

Range: npt=0.000-

Session: 55

RTP-Info:
url=rtsp://192.168.6.92/h264Live/track1;seq=11654;rtptime=1525156706,u

rl=rtsp://192.168.6.92/h264Live/track2;seq=20717;rtptime=1807203344

 

 

==> Found video stream: 0

==> Found audio stream: 0

VIDEO:  [H264]  0x0  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)

[V] filefmt:21  fourcc:0x34363248  size:0x0  fps:25.000  ftime:=0.0400

get_path('sub/') -> 'E:/Users/lcj/Work/Projects/Materials/h264/mplayer/sub/'

<vo_directx><INFO>checking primary surface

<vo_directx><FORMAT PRIMARY>14 BGR32 supported

<vo_directx><INFO>testing supported overlay pixelformats

<vo_directx><FORMAT OVERLAY>0 YV12  supported

<vo_directx><FORMAT OVERLAY>1 I420  not supported

<vo_directx><FORMAT OVERLAY>2 IYUV  not supported

<vo_directx><FORMAT OVERLAY>3 YVU9  supported

<vo_directx><FORMAT OVERLAY>4 YUY2  supported

<vo_directx><FORMAT OVERLAY>5 UYVY  supported

<vo_directx><FORMAT OVERLAY>6 BGR8  not supported

<vo_directx><FORMAT OVERLAY>7 RGB15 not supported

<vo_directx><FORMAT OVERLAY>8 BGR15 not supported

<vo_directx><FORMAT OVERLAY>9 RGB16 not supported

<vo_directx><FORMAT OVERLAY>10 BGR16 not supported

<vo_directx><FORMAT OVERLAY>11 RGB24 not supported

<vo_directx><FORMAT OVERLAY>12 BGR24 not supported

<vo_directx><FORMAT OVERLAY>13 RGB32 not supported

<vo_directx><FORMAT OVERLAY>14 BGR32 not supported

<vo_directx><INFO>Your card supports 4 of 15 overlayformats

<vo_directx><INFO>can mirror up down

<vo_directx><INFO>hardware supports overlay

==========================================================================

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family

INFO: libavcodec init OK!

Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)

==========================================================================

Audio: no sound

Freeing 0 unused audio chunks.

Starting playback...

 

############### END:  Output of MPlayer SVN
#####################################

 

 

############################################################################
####

############### BEGIN: Output of MPlayer 1.0rc2
#####################################

############################################################################
####

¡­¡­¡­

STREAM_RTSP, URL: rtsp://192.168.6.92

Filename for url is now rtsp://192.168.6.92

Filename for url is now rtsp://192.168.6.92

Connecting to server 192.168.6.92[192.168.6.92]: 554...

SDP:

v=0

o=- 1104537691104555 1 IN IP4 192.168.6.92

s=Live Media Server

i=h264Live

t=0 0

a=tool:Besovideo Media Server v2008.04.09

a=type:broadcast

a=control:*

a=range:npt=0-

a=x-qt-text-nam:BesoVideo Media Server

a=x-qt-text-inf:h264Live

m=video 0 RTP/AVP 96

c=IN IP4 0.0.0.0

a=rtpmap:96 H264/90000

a=x-framerate:25

a=fmtp:96
packetization-mode=1;profile-level-id=42801E;sprop-parameter-sets=Z0

HomVwsEtgQBA

a=control:track1

m=audio 0 RTP/AVP 97

c=IN IP4 0.0.0.0

a=rtpmap:97 L8/8000

a=control:track2

 

A single media stream only is supported atm.

rtsp_session: unsupported RTSP server. Server type is 'unknown'.

WINSOCK2 init: 0

Filename for url is now rtsp://192.168.6.92

Filename for url is now rtsp://192.168.6.92

STREAM_LIVE555, URL: rtsp://192.168.6.92

STREAM: [RTSP and SIP] rtsp://192.168.6.92

STREAM: Description: standard RTSP and SIP

STREAM: Author: Ross Finlayson

STREAM: Comment: Uses LIVE555 Streaming Media library.

Stream not seekable!

 file format detected.

Sending request: DESCRIBE rtsp://192.168.6.92 RTSP/1.0

CSeq: 1

Accept: application/sdp

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received DESCRIBE response: RTSP/1.0 200 OK

CSeq: 1

Date: Sat, Jan 01 2005 14:16:09 GMT

Content-Base: rtsp://192.168.6.92/h264Live/

Content-Type: application/sdp

Content-Length: 523

 

 

Need to read 523 extra bytes

Read 523 extra bytes: v=0

o=- 1104537691104555 1 IN IP4 192.168.6.92

s=BesoVideo Media Server

i=h264Live

t=0 0

a=tool:Besovideo Media Server v2008.04.09

a=type:broadcast

a=control:*

a=range:npt=0-

a=x-qt-text-nam:BesoVideo Media Server

a=x-qt-text-inf:h264Live

m=video 0 RTP/AVP 96

c=IN IP4 0.0.0.0

a=rtpmap:96 H264/90000

a=x-framerate:25

a=fmtp:96
packetization-mode=1;profile-level-id=42801E;sprop-parameter-sets=Z0

HomVwsEtgQBA

a=control:track1

m=audio 0 RTP/AVP 97

c=IN IP4 0.0.0.0

a=rtpmap:97 L8/8000

a=control:track2

 

Initiated "video/H264" RTP subsession on port 5798

Increased video socket receive buffer to 2000000 bytes

Sending request: SETUP rtsp://192.168.6.92/h264Live/track1 RTSP/1.0

CSeq: 2

Transport: RTP/AVP;unicast;client_port=5798-5799

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received SETUP response: RTSP/1.0 200 OK

CSeq: 2

Date: Sat, Jan 01 2005 14:16:09 GMT

Transport:
RTP/AVP;unicast;destination=192.168.6.88;source=192.168.6.92;client

ort=5798-5799;server_port=6970-6971

Session: 51

 

 

Initiated "audio/L8" RTP subsession on port 5800

Increased audio socket receive buffer to 100000 bytes

Sending request: SETUP rtsp://192.168.6.92/h264Live/track2 RTSP/1.0

CSeq: 3

Transport: RTP/AVP;unicast;client_port=5800-5801

Session: 51

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received SETUP response: RTSP/1.0 200 OK

CSeq: 3

Date: Sat, Jan 01 2005 14:16:09 GMT

Transport:
RTP/AVP;unicast;destination=192.168.6.88;source=192.168.6.92;client

ort=5800-5801;server_port=6972-6973

Session: 51

 

 

Sending request: PLAY rtsp://192.168.6.92/h264Live/ RTSP/1.0

CSeq: 4

Session: 51

Range: npt=0.000-

User-Agent: MPlayer (LIVE555 Streaming Media v2008.06.05)

 

 

Received PLAY response: RTSP/1.0 200 OK

CSeq: 4

Date: Sat, Jan 01 2005 14:16:09 GMT

Range: npt=0.000-

Session: 51

RTP-Info:
url=rtsp://192.168.6.92/h264Live/track1;seq=20094;rtptime=137136087,

l=rtsp://192.168.6.92/h264Live/track2;seq=7997;rtptime=920257446

 

 

==> Found video stream: 0

==> Found audio stream: 0

VIDEO:  [H264]  0x0  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)

[V] filefmt:21  fourcc:0x34363248  size:0x0  fps:25.00  ftime:=0.0400

get_path('sub/') -> 'E:/Users/lcj/Work/WinShare/mplayer/sub/'

<vo_directx><INFO>checking primary surface

<vo_directx><FORMAT PRIMARY>14 BGR32 supported

<vo_directx><INFO>testing supported overlay pixelformats

<vo_directx><FORMAT OVERLAY>0 YV12  supported

<vo_directx><FORMAT OVERLAY>1 I420  not supported

<vo_directx><FORMAT OVERLAY>2 IYUV  not supported

<vo_directx><FORMAT OVERLAY>3 YVU9  supported

<vo_directx><FORMAT OVERLAY>4 YUY2  supported

<vo_directx><FORMAT OVERLAY>5 UYVY  supported

<vo_directx><FORMAT OVERLAY>6 BGR8  not supported

<vo_directx><FORMAT OVERLAY>7 RGB15 not supported

<vo_directx><FORMAT OVERLAY>8 BGR15 not supported

<vo_directx><FORMAT OVERLAY>9 RGB16 not supported

<vo_directx><FORMAT OVERLAY>10 BGR16 not supported

<vo_directx><FORMAT OVERLAY>11 RGB24 not supported

<vo_directx><FORMAT OVERLAY>12 BGR24 not supported

<vo_directx><FORMAT OVERLAY>13 RGB32 not supported

<vo_directx><FORMAT OVERLAY>14 BGR32 not supported

<vo_directx><INFO>Your card supports 4 of 15 overlayformats

<vo_directx><INFO>can mirror up down

<vo_directx><INFO>hardware supports overlay

==========================================================================

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family

INFO: libavcodec init OK!

Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)

==========================================================================

==========================================================================

Opening audio decoder: [pcm] Uncompressed PCM audio decoder

dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.

AUDIO: 8000 Hz, 1 ch, u8, 0.0 kbit/0.00% (ratio: 0->8000)

Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)

==========================================================================

Building audio filter chain for 8000Hz/1ch/u8 -> 0Hz/0ch/??...

[libaf] Adding filter dummy

[dummy] Was reinitialized: 8000Hz/1ch/u8

[dummy] Was reinitialized: 8000Hz/1ch/u8

ao_dsound: Output Devices:

0 Ö÷ÉùÒôÇý¶¯³ÌÐò <--

1 Realtek HD Audio output

ao_dsound: DirectSound initialized

ao_dsound: format u8 not supported defaulting to Signed 16-bit Little-Endian

ao_dsound: Samplerate:8000Hz Channels:1 Format:s16le

ao_dsound: Buffersize:16000 bytes (1000 msec)

ao_dsound: primary buffer created

ao_dsound: secondary (stream)buffer created

AO: [dsound] 8000Hz 1ch s16le (2 bytes per sample)

AO: Description: Windows DirectSound audio output

AO: Author: Gabor Szecsi <deje at miki.hu>

Building audio filter chain for 8000Hz/1ch/u8 -> 8000Hz/1ch/s16le...

[dummy] Was reinitialized: 8000Hz/1ch/u8

[libaf] Adding filter format

[format] Changing sample format from little-endian 8-bit unsigned int to
littl

endian 16-bit signed int

[dummy] Was reinitialized: 8000Hz/1ch/u8

[format] Changing sample format from little-endian 8-bit unsigned int to
littl

endian 16-bit signed int

Starting playback...

 

############################################################################
####

############### END:  Output of MPlayer 1.0rc2
#####################################

############################################################################
####

 




More information about the MPlayer-users mailing list