I've been lurking for a while now and I finally created an account because I'm stuck on this particular problem. I've got a raspberry pi 3 with a camera attached to it. I'm able to capture video as an input but I don't know how to include audio. Here is the script that I'm running to capture video:
#!/bin/bash base="/tmp/capture" rm -rf $base mkdir -p $base raspivid -n -w 720 -h 405 -fps 25 -vf -t 86400000 -b 1800000 -ih -o - \ | ffmpeg -y \ -i - \ -c:v copy \ -map 0:0 \ -hls_wrap 100 -hls_time 1 -hls_flags delete_segments -hls_list_size 10 -f hls "$base/live.m3u8" &
I've spent hours on ffmpeg's website going through the documentation and tried adding alsa audio as an input but ffmpeg outputs an error saying that the parameters or the order of the parameters were wrong.
Any clue on how I should fix this?