Hallo,
über die Anleitung vom dem Thread hab ich es geschafft von der Raspberry Pi Cam Module v2 auf ein rtmp server zu streamen. Jetzt will ich von einem USB Mikrofon noch den Sound mit übertragen. Wie mach ich das?
Das ist mein USB Mikrofon:
Code
pi@container:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Ich habe versucht die Atribute
mit einzufügen, dann bekam ich aber den Fehler:
Code
H=480
FPS=20
G=250
B=2000000
raspivid -n -mm matrix -w 640 -h 480 -fps 25 -g 100 -t 0 -b 2000000 -o - \
| ffmpeg -loglevel quiet -nostats -y \
-f h264 \
-i - \
-c:v copy \
-map 0:0 \
-ac -f alsa -i hw:1,1 \
-f flv \
-rtmp_buffer 100 \
-rtmp_live live \
rtmp://$SERVER_IP/$1 &
wait
Alles anzeigen
Edit:
Wenn ich die Position der Atribute für den Mic weiter am Anfang setzte, kommt dieser fehler:
Code
Applying option loglevel (set logging level) with argument quiet.
Applying option nostats (print progress report during encoding) with argument 0.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url hw:1,0.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Successfully parsed a group of options.
Opening an input file: hw:1,0.
Unknown input format: 'alsa
Code
raspivid -n -mm matrix -w 640 -h 480 -fps 25 -g 100 -t 0 -b 2000000 -o - \
| ffmpeg -loglevel quiet -nostats -y \
-f alsa -ac 2 -i hw:1,0 \
-f h264 \
-i - \
-c:v copy \
-map 0:0 \
-f flv \
-rtmp_buffer 100 \
-rtmp_live live \
rtmp://$SERVER_IP/$1 &
Alles anzeigen
Edit 2:
Man muss wohl die Bibliothek libpulse bei ./configure von ffmpeg enablen
Edit 3:
Das hat das problem leider nicht behoben