ffmpeg - One liner to create HLS stream -


iiuc hls or dash, can create manifest , serve segments straight httpd, e.g. python -m http.server.

i have uvc video feed coming in on /dev/video1 , i'm battling create simple m3u8 in either gstreamer or ffmpeg.

i got far as:

gst-launch-1.0 -e v4l2src device=/dev/video1 ! videoconvert ! x264enc ! mpegtsmux ! hlssink max-files=5 

any ideas?

  1. video

to list video1 device capabilities:

ffmpeg -f v4l2 -list_formats -i /dev/video1

  1. audio (alsa example)

to list alsa devices:

arecord -l

  1. hls

use 2 inputs:

 ffmpeg -f alsa -i <alsa_device> -f v4l2 -i /dev/video1 [...] /path/to/docroot/playlist.m3u8 

you can find various hls parameters in ffmpeg documentation.

further reading:

ffmpeg h.264 encoding guide

ffmpeg webcam capture


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -