[FFmpeg-user] Issue with streaming mp3 to RTMP issue
Suman Poluri
sumanpoluri.dev at gmail.com
Mon Nov 25 06:11:51 CET 2013
Hi All,
I am facing an issue when trying to stream an mp3 audio file to an RTMP
server.
In one terminal window, I am using this command:
$ ffmpeg -re -i input_file.mp3 -c copy -f mp3
rtmp://xxx.xxx.x.xxx/live/mystream
This is the output:
ffmpeg version git-2013-11-22-ffe31c6 Copyright (c) 2000-2013 the FFmpeg
developers
built on Nov 22 2013 23:20:36 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu8)
configuration: --prefix=/home/subuntu/ffmpeg/ffmpeg_build
--extra-cflags=-I/home/subuntu/ffmpeg/ffmpeg_build/include
--extra-ldflags=-L/home/subuntu/ffmpeg/ffmpeg_build/lib
--bindir=/home/subuntu/bin --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
--enable-x11grab
libavutil 52. 54.100 / 52. 54.100
libavcodec 55. 44.100 / 55. 44.100
libavformat 55. 21.101 / 55. 21.101
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mp3, from 'Downloads/Tor - Aperture.mp3':
Metadata:
title : Aperture
artist : Tor
album : Drum Therapy
track : 5
Duration: 00:04:03.67, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Output #0, mp3, to 'rtmp://xxx.xxx.x.xxx/live/mystream':
Metadata:
TIT2 : Aperture
TPE1 : Tor
TALB : Drum Therapy
TRCK : 5
TSSE : Lavf55.21.101
Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
In another terminal window, I try to play the RTMP stream using ffplay:
$ ffplay -i rtmp://ec2-54-196-52-189.compute-1.amazonaws.com/live/mystream
This is the output:
ffplay version git-2013-11-22-ffe31c6 Copyright (c) 2003-2013 the FFmpeg
developers
built on Nov 22 2013 23:20:36 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu8)
configuration: --prefix=/home/subuntu/ffmpeg/ffmpeg_build
--extra-cflags=-I/home/subuntu/ffmpeg/ffmpeg_build/include
--extra-ldflags=-L/home/subuntu/ffmpeg/ffmpeg_build/lib
--bindir=/home/subuntu/bin --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
--enable-x11grab
libavutil 52. 54.100 / 52. 54.100
libavcodec 55. 44.100 / 55. 44.100
libavformat 55. 21.101 / 55. 21.101
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
[rtmp @ 0xb0e00bc0] Server error: Failed to play mystream; stream not found.
rtmp://ec2-54-196-52-189.compute-1.amazonaws.com/live/mystream: Operation
not permitted
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
I am unable to fathom why I am getting the errors "stream not found" and
"Operation not permitted".
Just to compare, I replaced my ffmpeg command in the first terminal to
output an 'flv' stream like this:
$ ffmpeg -re -i input_file.mp3 -c copy -f flv
rtmp://xxx.xxx.x.xxx/live/mystream
This works beautifully when I play it using the ffplay command in the other
terminal. Can someone tell me why the mp3 stream is causing the "stream not
found" and "Operation not permitted" errors?
Thanks,
SP
More information about the ffmpeg-user
mailing list