ffmpeg streaming to rtmp and extracting image periodically I'm using this command to receive a input stream and transcode it to a different resolution and stream it to ustream. 

ffmpeg -hide_banner -loglevel info -progress /tmp/ffmpeg.log -i udp://10.0.0.150:8181?listen \
-framerate 30 -video_size 1080x720 -vcodec libx264 -b:v 768k -crf 23 -preset medium -maxrate 800k -bufsize 800k \
-vf "scale=640:-1,format=yuv420p" -g 60 -c:a aac -strict -3 -ar 44100 -ab 32k -f flv rtmp://&lt;ustream url&gt;/&lt;ustream key&gt;


I also want to extract a full quality snapshot every 1 minute. I read here how I can extract a thumbnail from a video periodically and I read this explaining how to send one input stream to different output streams with different video filters.

When I combined the two commands I ended up with this:

ffmpeg -hide_banner -loglevel info -progress /tmp/ffmpeg.log -i udp://10.0.0.150:8181?listen -filter_complex '[0]split=2[in1][in2];[in1]scale=640:-1,format=yuv420p[out1];[in2]fps=1/60[out2]' \
-map '[out1]' -framerate 30 -video_size 1080x720 -vcodec libx264 -b:v 768k -crf 23 -preset medium -maxrate 800k -bufsize 800k -g 60 -c:a aac -strict -3 -ar 44100 -ab 32k -f flv rtmp://&lt;ustream url&gt;/&lt;ustream key&gt; \
-map '[out2]' img%03d.jpg


The command almost works, but the audio is missing on the livestream. The images are created correctly and the video is fine but there is no audio. How can I also get audio in my livestream?
Try 

ffmpeg -hide_banner -loglevel info -progress /tmp/ffmpeg.log -i udp://10.0.0.150:8181?listen -filter_complex '[0:v]split=2[in1][in2];[in1]scale=640:-1,format=yuv420p[out1];[in2]fps=1/60[out2]' \
-map '[out1]' -map 0:a -framerate 30 -video_size 1080x720 -vcodec libx264 -b:v 768k -crf 23 -preset medium -maxrate 800k -bufsize 800k -g 60 -c:a aac -strict -3 -ar 44100 -ab 32k -f flv rtmp://&lt;ustream url&gt;/&lt;ustream key&gt; \
-map '[out2]' img%03d.jpg