1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-28 09:41:20 +00:00
dockerfiles/ffmpeg/README.md

39 lines
977 B
Markdown
Raw Normal View History

2016-07-03 14:01:27 +00:00
ffmpeg
======
![](https://badge.imagelayers.io/vimagick/ffmpeg:latest.svg)
2016-07-07 10:17:27 +00:00
[FFmpeg][1] is a complete, cross-platform solution to record, convert and stream audio and video.
2016-07-03 14:01:27 +00:00
## Tutorial
2016-07-07 10:17:27 +00:00
```bash
# Create an alias
2016-07-03 14:01:27 +00:00
$ alias ffmpeg='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data vimagick/ffmpeg'
2016-07-07 10:17:27 +00:00
# Do video transcoding
2016-07-03 14:01:27 +00:00
$ ffmpeg -i video.mov video.mp4
```
2016-07-07 10:17:27 +00:00
2017-07-31 23:17:03 +00:00
## 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
```
2016-07-07 10:17:27 +00:00
## Todo List
- [ ] Re-compile with fontconfig/freetype enabled to support [timestamp][2] overlay.
2016-07-07 10:17:27 +00:00
[1]: http://ffmpeg.org/
[2]: https://einar.slaskete.net/2011/09/05/adding-time-stamp-overlay-to-video-stream-using-ffmpeg/