Skip to content

Commit

Permalink
Elevate priority before running, to optimize framerate.
Browse files Browse the repository at this point in the history
  • Loading branch information
sakaki- committed Aug 16, 2019
1 parent e20d3ee commit 53a1b34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pi-ffcam
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ if pgrep --full 'ff(mpeg|play).*(/dev/video|v4l2m2m)' &>/dev/null; then
exit 1
fi
# looks good to go, stream live view!
# (attempt to run at high priority to optimize framerate)
sudo renice -n -10 $$ &>/dev/null || true
ffmpeg -f video4linux2 -input_format h264 \
-video_size 640x480 \
-framerate 30 -r 30 -re -i /dev/video0 \
Expand Down

0 comments on commit 53a1b34

Please sign in to comment.