Opened 3 years ago

Closed 9 months ago

#5237 closed defect (invalid)

AAC stream over RTSP does not play

Reported by: NikolayMurga Owned by:
Priority: normal Component: ffserver
Version: git-master Keywords: aac, rtsp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello.

I try to make AAC streaming over RTSP using ffserver.
At first it tried to make AAC streaming over rtp using pure ffmpeg. Stream played well.
At next, I tried to stream it via ffserver, and nothing happens.

If I change

AudioCodec aac

to

AudioCodec libmp3lame

Mp3 streaming play well, but AAC streaming doesn't work, ceteris paribus.
I tried another versions of ffserver/ffmpeg but nothing changed.

ffserver.conf

HTTPPort 8001
HTTPBindAddress 127.0.0.1
RTSPBindAddress 127.0.0.1
RTSPPort 8002
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -

<Feed ch1.ffm>
File tmp/ch1.ffm
FileMaxSize 120k
</Feed>

<Stream stream>
Feed ch1.ffm
Format rtp
Metadata title "My new stream"
Strict -2
AudioCodec aac
AudioBitRate 128
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
NoVideo
</Stream>

ffserver log

ffserver -report -f config/ffserver.conf                                                                                                          nikolay@MBP-nikolay
ffserver started on 2016-02-14 at 17:02:41
Report written to "ffserver-20160214-170241.log"
ffserver version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.6 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-ffplay --enable-libfdk-aac --enable-nonfree --enable-vda
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Sun Feb 14 17:02:41 2016 FFserver started.
Sun Feb 14 17:02:44 2016 127.0.0.1 - - [GET] "/ch1.ffm HTTP/1.1" 200 4175
Sun Feb 14 17:02:51 2016 127.0.0.1:7620 - - "PLAY stream/streamid=0 RTP/UDP"
Sun Feb 14 17:03:03 2016 127.0.0.1 - - [PLAY] "rtsp://127.0.0.1:8002/stream/ RTSP/1.0" 200 804
Sun Feb 14 17:03:04 2016 127.0.0.1 - - [POST] "/ch1.ffm HTTP/1.1" 200 331776

ffmpeg log:

ffmpeg -report -re -i resources/test.mp4 -acodec aac http://127.0.0.1:8001/ch1.ffm                                                                nikolay@MBP-nikolay
ffmpeg started on 2016-02-14 at 17:02:44
Report written to "ffmpeg-20160214-170244.log"
ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.6 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-ffplay --enable-libfdk-aac --enable-nonfree --enable-vda
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'resources/test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf56.40.101
  Duration: 00:09:08.73, start: 0.000998, bitrate: 135 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 133 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Output #0, ffm, to 'http://127.0.0.1:8001/ch1.ffm':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    creation_time   : 2016-02-14 17:02:44
    encoder         : Lavf56.40.101
    Stream #0:0(und): Audio: aac (libfaac), 44100 Hz, stereo, s16, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc56.60.100 libfaac
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> aac (libfaac))
Press [q] to stop, [?] for help
size=     324kB time=00:00:19.50 bitrate= 136.1kbits/s
video:0kB audio:305kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.221005%
Exiting normally, received signal 2.

FFplay log:

ffplay -report -v verbose rtsp://127.0.0.1:8002/stream                                                                                              nikolay@MBP-nikolay
ffplay started on 2016-02-14 at 17:02:51
Report written to "ffplay-20160214-170251.log"
ffplay version 2.8.6 Copyright (c) 2003-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.6 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-ffplay --enable-libfdk-aac --enable-nonfree --enable-vda
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[rtsp @ 0x7fd1a1859a00] SDP:aq=    0KB vq=    0KB sq=    0B f=0/0
v=0
o=- 0 0 IN IP4 127.0.0.1
s=My new stream
c=IN IP4 0.0.0.0
t=0 0
a=tool:libavformat 56.40.101
m=audio 0 RTP/AVP 96
b=AS:128
a=rtpmap:96 MPEG4-GENERIC/44100/2
a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1210
a=control:streamid=0

^C%

Thanks.

Attachments (7)

ffserver-20160214-170241.log (1.1 KB) - added by NikolayMurga 3 years ago.
ffplay-20160214-170251.log (26.9 KB) - added by NikolayMurga 3 years ago.
ffmpeg-20160214-170244.log (8.8 KB) - added by NikolayMurga 3 years ago.
ffserver-snapshot.log (8.4 KB) - added by NikolayMurga 3 years ago.
FFserver output
ffmpeg-snapshot.log (7.3 KB) - added by NikolayMurga 3 years ago.
Ffmpeg output
ffmpeg-snapshot.2.log (7.3 KB) - added by NikolayMurga 3 years ago.
Ffmpeg output
ffplay-snapshot.log (40.9 KB) - added by NikolayMurga 3 years ago.
Ffplay console output

Download all attachments as: .zip

Change History (18)

Changed 3 years ago by NikolayMurga

Changed 3 years ago by NikolayMurga

Changed 3 years ago by NikolayMurga

comment:1 Changed 3 years ago by cehoyos

Is this issue reproducible with current FFmpeg?

comment:2 follow-up: Changed 3 years ago by NikolayMurga

A few minutes ago, I tried to use the latest version (commit 593bb50e062fae474880f5ab353fec9f751dc06e)
I tried ffplay, mplayer and vlc, for play but nothing.
Also I tried last revision from 2.7 branch and 2.6 and different input files - I have the same result.

build/ffmpeg/master/bin/ffplay -report -v verbose rtsp://127.0.0.1:8002/stream                                                                   
ffplay started on 2016-02-14 at 17:29:38
Report written to "ffplay-20160214-172938.log"
ffplay version 2.8.git Copyright (c) 2003-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/Users/nikolay/Projects/icecast/build/ffmpeg/master --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-ffplay --enable-nonfree --enable-vda --enable-libvpx --enable-libfaac --enable-libfdk-aac
  libavutil      55. 17.102 / 55. 17.102
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[rtsp @ 0x7f86aa095e00] SDP:aq=    0KB vq=    0KB sq=    0B f=0/0
v=0
o=- 0 0 IN IP4 127.0.0.1
s=My new stream
c=IN IP4 0.0.0.0
t=0 0
a=tool:libavformat 57.25.100
m=audio 0 RTP/AVP 96
b=AS:128
a=rtpmap:96 MPEG4-GENERIC/44100/2
a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=121056E500
a=control:streamid=0

[NULL @ 0x7f86aa068c00] setting jitter buffer size to 500
[rtsp @ 0x7f86aa095e00] UDP timeout, retrying with TCP   0B f=0/0
[aac @ 0x7f86aa068c00] setting jitter buffer size to 0
^C%                                                                                                                                                                              

A similar stream from wowza played well.

comment:3 in reply to: ↑ 2 Changed 3 years ago by cehoyos

Replying to NikolayMurga:

ffplay version 2.8.git Copyright (c) 2003-2016 the FFmpeg developers

I know this is unrelated but can you explain how you produced this version string ("2.8.git")?

comment:4 follow-up: Changed 3 years ago by NikolayMurga

I built ffmpeg from github mirror (https://github.com/FFmpeg/FFmpeg/archive/master.tar.gz).

This is my commands for build:

./configure --prefix=/usr/local --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb  --enable-ffplay  --enable-nonfree --enable-vda --enable-libvpx --enable-libfaac --enable-libfdk-aac
make -j4
make install

comment:5 in reply to: ↑ 4 Changed 3 years ago by cehoyos

Replying to NikolayMurga:

I built ffmpeg from github mirror (https://github.com/FFmpeg/FFmpeg/archive/master.tar.gz).

Consider using http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 mentioned on http://ffmpeg.org/download.html
(As said, this is unrelated to this ticket, I just wanted to know how get the useless version number; I sadly cannot comment on ffserver issues.)

Last edited 3 years ago by cehoyos (previous) (diff)

comment:6 follow-up: Changed 3 years ago by NikolayMurga

I tried ffmpeg from http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2, but I have the same result.

comment:7 in reply to: ↑ 6 Changed 3 years ago by cehoyos

Replying to NikolayMurga:

I tried ffmpeg from http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2, but I have the same result.

Please show your console output.

Changed 3 years ago by NikolayMurga

FFserver output

Changed 3 years ago by NikolayMurga

Ffmpeg output

Changed 3 years ago by NikolayMurga

Ffmpeg output

Changed 3 years ago by NikolayMurga

Ffplay console output

comment:8 Changed 3 years ago by cehoyos

ffmpeg version N-78356-g43a6965 Copyright (c) 2000-2016 the FFmpeg developers

This looks much better than version 2.8.git, don't you agree?

comment:9 follow-up: Changed 3 years ago by NikolayMurga

Perhaps, but I believe that it has nothing to do with the issue :)
P.S. I accidentally added ffmpeg-snapshot.log twice. Please remove it, if you can.​

comment:10 in reply to: ↑ 9 Changed 3 years ago by cehoyos

Replying to NikolayMurga:

Perhaps, but I believe that it has nothing to do with the issue :)

Yes, as I have written twice, didn't i?

comment:11 Changed 9 months ago by atomnuker

  • Resolution set to invalid
  • Status changed from new to closed

ffserver was removed from git master, closing bug as invalid

Note: See TracTickets for help on using tickets.