Streaming a Live Broadcast from your Webcam to your iPhone
Published: Thursday, Apr 30, 2015 Last modified: Thursday, Nov 14, 2024
ffmpeg -f v4l2 -i /dev/video0 -f alsa -i pulse -acodec aac -strict experimental -pix_fmt yuv420p playlist.m3u8
For tweaking resolution of the feed, you can run a command like ffmpeg -f v4l2 -list_formats all -i /dev/video1
to find out the resolution output of your
input. Then you can configure that value as the switch -video_size
which must
be set between -f v4l2
& -i /dev/video1
otherwise you will get weird and
wonderful errors. For example:
ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -i /dev/video1 -f alsa -i pulse -acodec aac -strict experimental -pix_fmt yuv420p -profile:v high -level 4.2 -movflags +faststart playlist.m3u8
I like HLS since it just requires the HTTP transport. Not odd protocols like
RTMP and such and so forth. Then launch a httpd, like python -m http.server
and share the URL, e.g. http://192.168.6.44:8000/playlist.m3u8
Back story: