diff --git a/stage2/05-mjpgstreamer/files/start-mjpg b/stage2/05-mjpgstreamer/files/start-mjpg index 8ef22a3..0190c13 100644 --- a/stage2/05-mjpgstreamer/files/start-mjpg +++ b/stage2/05-mjpgstreamer/files/start-mjpg @@ -5,10 +5,10 @@ source /usr/local/etc/mjpg-server/config.sh # Test if camera can just give us MJPG frames so that we can save a bunch of CPU if ffmpeg -input_format mjpeg -video_size $VIDEO_SIZE -framerate $FRAMERATE -nostats -v quiet -i $VIDEO_DEVICE vframes 1 -f null - >/dev/null; then - /usr/local/bin/mjpeg-server -a 127.0.0.1:9000 -- ffmpeg -input_format mjpeg -video_size $VIDEO_SIZE -framerate $FRAMERATE -i $VIDEO_DEVICE -f mjpeg -c:v copy - + /usr/local/bin/mjpeg-server -a 127.0.0.1:9000 -- ffmpeg -input_format mjpeg -video_size $VIDEO_SIZE -framerate $FRAMERATE -i $VIDEO_DEVICE -f mpjpeg -c:v copy - # Oh, it can't :( Guess I'll just blast the CPU to maybe get 5FPS elif ffmpeg -video_size $VIDEO_SIZE -framerate $FRAMERATE -nostats -v quiet -i $VIDEO_DEVICE -vframes 1 -f null - >/dev/null; then - /usr/local/bin/mjpeg-server -a 127.0.0.1:9000 -- ffmpeg -video_size $VIDEO_SIZE -framerate $FRAMERATE -i /dev/video0 -f mjpeg - + /usr/local/bin/mjpeg-server -a 127.0.0.1:9000 -- ffmpeg -input_format rawvideo -video_size $VIDEO_SIZE -framerate $FRAMERATE -i /dev/video0 -f mpjpeg - else echo "FFmpeg could not start. Double check your configuration." exit 1