Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AlekseyArh/f4fb37b3c4781daeea8b90fb213b628c to your computer and use it in GitHub Desktop.
Save AlekseyArh/f4fb37b3c4781daeea8b90fb213b628c to your computer and use it in GitHub Desktop.
live stream (eternal broadcast)
#!/bin/bash
ffmpeg -re -i video.flv -c copy -f flv rtmp://%STREAM_URL%
ffmpeg -re -i video2.flv -c copy -f flv rtmp://%STREAM_URL%
bash stream.sh > /dev/null 2>&1 < /dev/null &
@AlekseyArh
Copy link
Author

Если ошибки:

Failed to update header with correct duration.
Failed to update header with correct filesize.

То добавить флаг -flvflags no_duration_filesize
ffmpeg -re -i video.flv -c copy -f flv -flvflags no_duration_filesize rtmp://%STREAM_URL%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment