Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


AAC over RTSP troubles

Discussions about problems encountered using ffserver.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

AAC over RTSP troubles

Postby NikolayMurga » Thu Feb 11, 2016 12:09 pm

Hello.

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

If I change
Code: Select all
 AudioCodec aac

to
Code: Select all
 AudioCodec libmp3lame


Mp3 streaming play well, but AAC streaming doesn't work, ceteris paribus.

TL;DR


Make pure ffmpeg AAC rtp stream

Code: Select all
ffmpeg -hide_banner -v verbose -re -i test.mp4 -acodec aac -strict -2 -f rtp rtp://127.0.0.1:1234 > stream.sdp
Routing option strict to both codec and muxer layer
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '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
[graph 0 input from stream 0:0 @ 0x7f9450f012a0] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
Output #0, rtp, to 'rtp://127.0.0.1:1234':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf56.40.101
    Stream #0:0(und): Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc56.60.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
size=     217kB time=00:00:13.39 bitrate= 132.5kbits/s


Next I tried to play it. Stream was played great.

Code: Select all
ffplay -hide_banner -v verbose ./stream.sdp                                                                                   
Input #0, sdp, from './stream.sdp':0KB vq=    0KB sq=    0B f=0/0
  Metadata:
    title           : No Name
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp
[ffplay_abuffer @ 0x7fb431d12480] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[ffplay_abuffersink @ 0x7fb431d24da0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[auto-inserted resampler 0 @ 0x7fb431d250a0] ch:2 chl:stereo fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
2016-02-11 13:32:58.178 ffplay[20427:16225541] 13:32:58.178 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
[ffplay_abuffer @ 0x7fb431c383c0] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[ffplay_abuffersink @ 0x7fb431c5a5c0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[auto-inserted resampler 0 @ 0x7fb431c5a8c0] ch:2 chl:stereo fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
   6.63 M-A:  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0


At next, I tried to stream it via ffserver.
Ffserver conficuration:

Code: Select all
# 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>


Then I sent a stream to ffserver feed.

Code: Select all
ffmpeg -hide_banner -re -i test.mp4 -acodec aac http://127.0.0.1:8001/ch1.ffm                                                                     
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '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
[tcp @ 0x7ffc7050bae0] Connection to tcp://localhost:8001 failed (Connection refused), trying next address
[tcp @ 0x7ffc7040b740] Connection to tcp://localhost:8001 failed (Connection refused), trying next address
Output #0, ffm, to 'http://localhost:8001/ch1.ffm':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    creation_time   : 2016-02-11 13:36:01
    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=     144kB time=00:00:08.38 bitrate= 140.7kbits/s


And try to play. But nothing happens.

Code: Select all
➜ ffplay -hide_banner -v verbose rtsp://127.0.0.1:8002/stream                                                                     
[rtsp @ 0x7fef12867e00] 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
nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0


ffmpeg info

Code: Select all
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


Thanks.
NikolayMurga
 
Posts: 3
Joined: Sun Feb 07, 2016 11:03 am

Re: AAC over RTSP troubles

Postby alexinthesky » Fri May 20, 2016 9:40 am

Hi,

could you find any solution to your problem?
I am having the same issue.
alexinthesky
 
Posts: 2
Joined: Fri May 20, 2016 9:02 am

Re: AAC over RTSP troubles

Postby NikolayMurga » Mon May 30, 2016 3:37 pm

Unfortunately I haven't found the solution.
The community does not respond. I had high hopes for ffmpeg.
As a result, we chose Wowza.
NikolayMurga
 
Posts: 3
Joined: Sun Feb 07, 2016 11:03 am

Re: AAC over RTSP troubles

Postby llogan » Mon May 30, 2016 5:36 pm

ffserver is basically unmaintained and I do not believe anyone who provides answers here uses it. ffserver has been mentioned by several developers as a candidate for removal if nobody volunteers to maintain and develop it.
Get an answer more quickly by providing your actual ffmpeg command and the complete console output. Use the code button to format your command and output or your question will be ignored.
llogan
 
Posts: 2332
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska


Return to ffserver

Who is online

Users browsing this forum: No registered users and 3 guests