ffmpeg: youtube live streaming

This commit is contained in:
kev 2017-08-01 07:17:03 +08:00
parent 2191312e8c
commit b8181d5d2c
2 changed files with 25 additions and 0 deletions

View File

@ -15,6 +15,21 @@ $ alias ffmpeg='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data vimagick/ffmp
$ ffmpeg -i video.mov video.mp4
```
## YouTube Live Streaming
```yaml
ffmpeg:
image: vimagick/ffmpeg
entrypoint: sh
command:
- -c
- ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i $$RTMP_DEV -tune zerolatency -vcodec mpeg4 -pix_fmt + -c:v copy -an -f flv $$RTMP_URI
environment:
- RTMP_DEV=rtsp://10.50.254.197/live
- RTMP_URI=rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx
restart: always
```
## Todo List
- [ ] Re-compile with fontconfig/freetype enabled to support [timestamp][2] overlay.

10
ffmpeg/docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
ffmpeg:
image: vimagick/ffmpeg
entrypoint: sh
command:
- -c
- ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i $$RTMP_DEV -tune zerolatency -vcodec mpeg4 -pix_fmt + -c:v copy -an -f flv $$RTMP_URI
environment:
- RTMP_DEV=rtsp://10.50.254.197/live
- RTMP_URI=rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx
restart: always