[Libav-user] mp3 live stream to stdout

pablo platt pablo.platt at gmail.com
Mon Jun 24 22:47:34 CEST 2013


I also tried with red5 with the oflaDemo.
I found other with the same issue but couldn't find a solution
http://ffmpeg.org/pipermail/ffmpeg-user/2013-May/015034.html
http://stackoverflow.com/questions/16113734/red5-receive-a-stream-and-have-it-available-for-just-one-client
https://groups.google.com/forum/#!topic/red5interest/U6EGDeDFDqg


./ffmpeg -loglevel debug -i rtmp://127.0.0.1/oflaDemo/test -f flv test.flv
ffmpeg version N-54023-g6fe419b Copyright (c) 2000-2013 the FFmpeg
developers
  built on Jun 14 2013 05:25:56 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/64bit
--extra-cflags='-I/root/ffmpeg-static/64bit/include -static'
--extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static'
--extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared
--disable-ffserver --disable-doc --enable-bzlib --enable-zlib
--enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl
--enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray
--enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3
--enable-libvpx
  libavutil      52. 35.101 / 52. 35.101
  libavcodec     55. 16.100 / 55. 16.100
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 77.101 /  3. 77.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'rtmp://
127.0.0.1/oflaDemo/test'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'flv'.
Reading option 'test.flv' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file rtmp://127.0.0.1/oflaDemo/test.
Successfully parsed a group of options.
Opening an input file: rtmp://127.0.0.1/oflaDemo/test.
[rtmp @ 0x29e5440] Handshaking...
[rtmp @ 0x29e5440] Type answer 3
[rtmp @ 0x29e5440] Server version 1.2.3.4
[rtmp @ 0x29e5440] Proto = rtmp, path = /oflaDemo/test, app = oflaDemo,
fname = test
[rtmp @ 0x29e5440] Creating stream...
[rtmp @ 0x29e5440] Sending play command for 'test'
[rtmp @ 0x29e5440] Server error:
rtmp://127.0.0.1/oflaDemo/test: Operation not permitted



On Mon, Jun 24, 2013 at 1:34 AM, pablo platt <pablo.platt at gmail.com> wrote:

> Sometimes when I'm stopping the media server I suddenly see many packets
> in the terminal.
> It seems that ffmpeg is buffering the output and doesn't stream it.
>
>
>
> On Mon, Jun 24, 2013 at 1:22 AM, pablo platt <pablo.platt at gmail.com>wrote:
>
>> When I'm trying to output to a file it gets stuck at
>> [rtmp @ 0xb481460] New incoming chunk size = 4096
>> and when I stop rtmplite I'm getting the rest.
>>
>> ./ffmpeg -loglevel debug -i rtmp://127.0.0.1/audio/test -f mp3 test.mp3
>>
>> ffmpeg version N-54023-g6fe419b Copyright (c) 2000-2013 the FFmpeg
>> developers
>>   built on Jun 14 2013 05:12:40 with gcc 4.6 (Debian 4.6.3-1)
>>   configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32
>> --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static'
>> --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static'
>> --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared
>> --disable-ffserver --disable-doc --enable-bzlib --enable-zlib
>> --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl
>> --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray
>> --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex
>> --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3
>> --enable-libvpx
>>   libavutil      52. 35.101 / 52. 35.101
>>   libavcodec     55. 16.100 / 55. 16.100
>>   libavformat    55.  8.102 / 55.  8.102
>>   libavdevice    55.  2.100 / 55.  2.100
>>   libavfilter     3. 77.101 /  3. 77.101
>>   libswscale      2.  3.100 /  2.  3.100
>>   libswresample   0. 17.102 /  0. 17.102
>>   libpostproc    52.  3.100 / 52.  3.100
>> Splitting the commandline.
>> Reading option '-loglevel' ... matched as option 'loglevel' (set logging
>> level) with argument 'debug'.
>> Reading option '-i' ... matched as input file with argument 'rtmp://
>> 127.0.0.1/audio/test'.
>> Reading option '-f' ... matched as option 'f' (force format) with
>> argument 'mp3'.
>>  Reading option 'test.mp3' ... matched as output file.
>>
>> Finished splitting the commandline.
>> Parsing a group of options: global .
>> Applying option loglevel (set logging level) with argument debug.
>> Successfully parsed a group of options.
>> Parsing a group of options: input file rtmp://127.0.0.1/audio/test.
>> Successfully parsed a group of options.
>> Opening an input file: rtmp://127.0.0.1/audio/test.
>>  [rtmp @ 0xb481460] Handshaking...
>> [rtmp @ 0xb481460] Type answer 3
>> [rtmp @ 0xb481460] Server version 1.2.3.4
>> [rtmp @ 0xb481460] Proto = rtmp, path = /audio/test, app = audio, fname =
>> test
>> [rtmp @ 0xb481460] Server bandwidth = 1073741824
>> [rtmp @ 0xb481460] Creating stream...
>> [rtmp @ 0xb481460] Sending play command for 'test'
>> [rtmp @ 0xb481460] New incoming chunk size = 4096
>> [flv @ 0xb480f40] Format flv probed with size=2048 and score=100
>> [flv @ 0xb480f40] File position before avformat_find_stream_info() is 13
>> [flv @ 0xb480f40] Could not find codec parameters for stream 0 (Video:
>> none): unspecified size
>> Consider increasing the value for the 'analyzeduration' and 'probesize'
>> options
>> [flv @ 0xb480f40] Could not find codec parameters for stream 1 (Audio:
>> none, 0 channels): unspecified sample format
>> Consider increasing the value for the 'analyzeduration' and 'probesize'
>> options
>> [flv @ 0xb480f40] File position after avformat_find_stream_info() is 13
>> rtmp://127.0.0.1/audio/test: could not find codec parameters
>> [AVIOContext @ 0xb481e00] Statistics: 13 bytes read, 0 seeks
>> [rtmp @ 0xb481460] Deleting stream...
>>
>>
>> On Mon, Jun 24, 2013 at 12:36 AM, pablo platt <pablo.platt at gmail.com>wrote:
>>
>>> Tested with ffmpeg.static.32bit.2013-06-14.tar.gz from http://ffmpeg.gusari.org/static/ under ubuntu 12.04 32bit.
>>>
>>> I'm using rtmplite with the test client.
>>>
>>> test:~/rtmplite$ python rtmp.py -d
>>>
>>> I'm Using the textClient that comes with rtmplite to create a video+audio stream:
>>> test:~/rtmplite/testClient/bin-debug$ python -m SimpleHTTPServer
>>>
>>> I open the testClient example with Firefox in
>>>
>>>
>>> http://localhost:8000/testClient.html
>>>
>>> Result:
>>>
>>> ./ffmpeg -loglevel debug -i rtmp://127.0.0.1/audio/test -f mp3 pipe:1
>>>
>>>
>>> ffmpeg version N-54023-g6fe419b Copyright (c) 2000-2013 the FFmpeg developers
>>>   built on Jun 14 2013 05:12:40 with gcc 4.6 (Debian 4.6.3-1)
>>>   configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
>>>
>>>
>>>
>>>   libavutil      52. 35.101 / 52. 35.101
>>>   libavcodec     55. 16.100 / 55. 16.100
>>>   libavformat    55.  8.102 / 55.  8.102
>>>   libavdevice    55.  2.100 / 55.  2.100
>>>
>>>
>>>   libavfilter     3. 77.101 /  3. 77.101
>>>   libswscale      2.  3.100 /  2.  3.100
>>>
>>>   libswresample   0. 17.102 /  0. 17.102
>>>   libpostproc    52.  3.100 / 52.  3.100
>>> Splitting the commandline.
>>> Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
>>>
>>>
>>>
>>> Reading option '-i' ... matched as input file with argument 'rtmp://127.0.0.1/audio/test'.
>>> Reading option '-f' ... matched as option 'f' (force format) with argument 'mp3'.
>>>
>>>
>>>
>>> Reading option 'pipe:1' ... matched as output file.
>>> Finished splitting the commandline.
>>> Parsing a group of options: global .
>>> Applying option loglevel (set logging level) with argument debug.
>>> Successfully parsed a group of options.
>>>
>>>
>>>
>>> Parsing a group of options: input file rtmp://127.0.0.1/audio/test.
>>> Successfully parsed a group of options.
>>> Opening an input file: rtmp://127.0.0.1/audio/test.
>>>
>>>
>>>
>>> [rtmp @ 0xa8a7460] Handshaking...
>>> [rtmp @ 0xa8a7460] Type answer 3
>>> [rtmp @ 0xa8a7460] Server version 1.2.3.4
>>> [rtmp @ 0xa8a7460] Proto = rtmp, path = /audio/test, app = audio, fname = test
>>> [rtmp @ 0xa8a7460] Server bandwidth = 1073741824
>>>
>>>
>>>
>>> [rtmp @ 0xa8a7460] Creating stream...
>>> [rtmp @ 0xa8a7460] Sending play command for 'test'
>>> [rtmp @ 0xa8a7460] New incoming chunk size = 4096
>>>
>>>
>>>
>>> On Sun, Jun 23, 2013 at 8:31 PM, Paul B Mahol <onemda at gmail.com> wrote:
>>>
>>>> On 6/23/13, pablo platt <pablo.platt at gmail.com> wrote:
>>>> > I'm using static builds from:
>>>> > http://ffmpeg.gusari.org/static/
>>>> >
>>>> > I've tried:
>>>> > ./ffmpeg -loglevel debug -i rtmp://127.0.0.1/audio/test -f mp3 -
>>>> > and
>>>> > ./ffmpeg -loglevel debug -i rtmp://127.0.0.1/audio/test -f mp3 pipe:1
>>>> >
>>>> > I don't see anything in the shell
>>>>
>>>> Really? Paste full uncut console output.
>>>>
>>>> >
>>>> >
>>>> > On Sun, Jun 23, 2013 at 3:57 AM, pablo platt <pablo.platt at gmail.com>
>>>> wrote:
>>>> >
>>>> >> Sorry but the mailing list is called libav.
>>>> >> How can I install ffmpeg on ubuntu 12.04 and above?
>>>> >>
>>>> >>
>>>> >> On Sun, Jun 23, 2013 at 3:42 AM, Paul B Mahol <onemda at gmail.com>
>>>> wrote:
>>>> >>
>>>> >>> On 6/23/13, pablo platt <pablo.platt at gmail.com> wrote:
>>>> >>> > Hi,
>>>> >>> >
>>>> >>> > I'm trying to transcode a live RTMP stream to mp3.
>>>> >>> > I can't make avconv write the output to stdout.
>>>> >>> >
>>>> >>> > I was trying:
>>>> >>> > avconv -i rtmp://127.0.0.1/audio/test -f mp3 -
>>>> >>> > and
>>>> >>> > avconv -i rtmp://127.0.0.1/audio/test -f mp3 pipe:1
>>>> >>> >
>>>> >>> > But all I'm getting is a message that the speex header is missing.
>>>> >>> > When I'm stopping the RTMP server I see some more message but not
>>>> >>> getting
>>>> >>> > mp3 packets.
>>>> >>> >
>>>> >>> > I'm using ubuntu 12.04 64bit with the libav-tools deb package.
>>>> >>> > For testing I'm using the python rtmp server
>>>> >>> > http://code.google.com/p/rtmplite/
>>>> >>> >
>>>> >>> > How can I make the output go to stdout?
>>>> >>>
>>>> >>> You are asking for help on ffmpeg mailing list for avconv
>>>> >>> which is from libav (ffmpeg fork).
>>>> >>>
>>>> >>> If you want help for avconv don't ask here as this is
>>>> >>> mailing list for ffmpeg only (real ffmpeg not fake one).
>>>> >>> _______________________________________________
>>>> >>> Libav-user mailing list
>>>> >>> Libav-user at ffmpeg.org
>>>> >>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>> >>>
>>>> >>
>>>> >>
>>>> >
>>>> _______________________________________________
>>>> Libav-user mailing list
>>>> Libav-user at ffmpeg.org
>>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130624/1eafee3f/attachment.html>


More information about the Libav-user mailing list