FFmpeg audio encoding to Icecast - Raspberry Pi Forums


i'm trying feed line audio ffmpeg, encode mp3 , stream via icecast. unfortunately i'm getting "end of file" error.
according report log seems can't establish connection trough icecast protocol. can correct me?

code: select all

ffmpeg started on 2015-05-26 @ 20:10:14 report written "ffmpeg-20150526-201014.log" command line: ffmpeg -stats -report -f alsa -i hw:0 -c:a libmp3lame -b:a 128k -content_type audio/mpeg -f mp3 icecast://admin:hackme@localhost:8000/stream ffmpeg version n-72354-g894d8cf copyright (c) 2000-2015 ffmpeg developers   built gcc 4.6 (debian 4.6.3-14+rpi1)   configuration: --enable-gpl --prefix=/usr --enable-nonfree --enable-libmp3lame --enable-libfaac --enable-libx264 --enable-version3 --disable-mmx --extra-libs=-lasound   libavutil      54. 24.100 / 54. 24.100   libavcodec     56. 41.100 / 56. 41.100   libavformat    56. 33.101 / 56. 33.101   libavdevice    56.  4.100 / 56.  4.100   libavfilter     5. 16.101 /  5. 16.101   libswscale      3.  1.101 /  3.  1.101   libswresample   1.  1.100 /  1.  1.100   libpostproc    53.  3.100 / 53.  3.100 splitting commandline. reading option '-stats' ... matched option 'stats' (print progress report during encoding) argument '1'. reading option '-report' ... matched option 'report' (generate report) argument '1'. reading option '-f' ... matched option 'f' (force format) argument 'alsa'. reading option '-i' ... matched input file argument 'hw:0'. reading option '-c:a' ... matched option 'c' (codec name) argument 'libmp3lame'. reading option '-b:a' ... matched option 'b' (video bitrate (please use -b:v)) argument '128k'. reading option '-content_type' ... matched avoption 'content_type' argument 'audio/mpeg'. reading option '-f' ... matched option 'f' (force format) argument 'mp3'. reading option 'icecast://admin:hackme@localhost:8000/stream' ... matched output file. finished splitting commandline. parsing group of options: global . applying option stats (print progress report during encoding) argument 1. applying option report (generate report) argument 1. parsed group of options. parsing group of options: input file hw:0. applying option f (force format) argument alsa. parsed group of options. opening input file: hw:0. [alsa @ 0x17147d0] info found guessed channel layout  input stream #0.0 : stereo input #0, alsa, 'hw:0':   duration: n/a, start: 1432671015.013257, bitrate: 1536 kb/s     stream #0:0, 1, 1/1000000: audio: pcm_s16le, 48000 hz, 2 channels, s16, 1536 kb/s opened file. parsing group of options: output file icecast://admin:hackme@localhost:8000/stream. applying option c:a (codec name) argument libmp3lame. applying option b:a (video bitrate (please use -b:v)) argument 128k. applying option f (force format) argument mp3. parsed group of options. opening output file: icecast://admin:hackme@localhost:8000/stream. [http @ 0x1721520] request: put /stream http/1.1 user-agent: lavf/56.33.101 accept: */* expect: 100-continue connection: close host: localhost:8000 content-type: audio/mpeg icy-metadata: 1 ice-public: 0 authorization: basic ywrtaw46agfja21l     icecast://admin:hackme@localhost:8000/stream: end of file

turned out icecast2 repository version 2.3.2, requires -legacy_icecast 1 parameter option, such as

code: select all

ffmpeg -stats -report -f alsa -i hw:0 -c:a libmp3lame -b:a 320k -legacy_icecast 1 -content_type audio/mpeg -ice_name "demostream" -f mp3 icecast://source:hackme@localhost:8000/stream
still trying figure out how lower 98% cpu usage during encoding (stays same lower bitrate) , bring darkice-like levels.


raspberrypi



Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support