[FFmpeg-user] adapt h264/aac mpegts to rtmp streaming services

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat Feb 10 02:14:12 EET 2018

2018-02-09 20:13 GMT+01:00 Federico Allegretti <allegfede at gmail.com>:

> To stream to the servers i use this:
> ffmpeg -y -re -f mpegts -i /dev/video0  -c:v copy -c:a copy -bsf:a
> aac_adtstoasc -g 52 -f flv "rtmp ......

Complete, uncut console output missing.
What is "-g 52" supposed to do?

> but seems the server do not like my stream ...

Any error messages?

> with a precompressed h264 file i made from a webM in this way:
> ffmpeg -i univac.webm -g 52 -strict experimental -acodec aac -ab 56k
> -vcodec libx264 -vb 452k -profile:v high -level 40 -r 16 -f mov univac.mp4
> and feeding the server in this way:
> ffmpeg -re -i univac.mp4 -c:v copy -c:a copy -f flv "rtmp ........
> everything is ok .....

What happens if you record the original mpegts stream with cat
and try to send the saved stream?

Carl Eugen

More information about the ffmpeg-user mailing list