[FFmpeg-user] FFMpeg stream audio problem
barsnick at gmx.net
Sun Dec 8 21:41:54 EET 2019
On Sat, Dec 07, 2019 at 07:43:19 +0100, Csaba wrote:
> ffmpeg -f alsa -i plughw:1 -acodec libmp3lame -ar 11025 -f rtp rtp://192.168.1.20:8000
This is incorrect.
> ffmpeg -f alsa -i plughw:1,0 -acodec libmp3lame -ab 96k -ac 1 -re -f http http://192.168.1.20:8080
As is this.
It is so incorrect that ffmpeg should trip over the two usage errors
and report them to you in a very obvious fashion.
Do you happen to be suppressing your output?
My ffmpeg says:
$ ffmpeg -f alsa -i plughw:1,0 -acodec libmp3lame -ab 96k -ac 1 -re -f http http://192.168.1.20:8080
Option re (read input at native frame rate) cannot be applied to output url http://192.168.1.20:8080 -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for output file http://192.168.1.20:8080.
Error opening output files: Invalid argument
"-re" is an input option, and shall *not* be used for hardware devices and live feeds - only on files to
*simulate* real-time feeds.
If you remove the "-re" option, ffmpeg will complain about "-f http",
as that is not a format, it's a protocol. You need to supplement the
protocol (which ffmpeg can already recognize from the output URI) with
an actual format.
> The scripts do not produce any error but stops after start immediately.
> Do you have any ideas? What is the problem?
I assume something is swallowing your error messages. Or perhaps ffmpeg
indeed gets stuck on the input devices. Have you tried replacing them
with input files (where you may and should add "-re" as an input
Have you tried just reading the input, and not feeding it to the net?:
$ ffmpeg -f alsa -i plughw:1,0 -f null -
If that still gets stuck without any usefull messages, please add
"-loglevel verbose" or even "-loglevel debug".
More information about the ffmpeg-user