Skip to content

Instantly share code, notes, and snippets.

@toniher
Created March 28, 2016 23:17
Show Gist options
  • Select an option

  • Save toniher/749b350eea3b4105acf4 to your computer and use it in GitHub Desktop.

Select an option

Save toniher/749b350eea3b4105acf4 to your computer and use it in GitHub Desktop.
Bash script for starting hls with ffmpeg in a raspberry pi
#!/bin/bash
base=/var/hls
mkdir -p $base
cd $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 10 -hls_flags delete_segments -hls_list_size 10 -f hls live.m3u8 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment