Re: [FFmpeg-user] Add delay to stream on twitch/youtube/restream.io, add chat and alerts
After some researching i got working code: ## record screen and use delay filters ffmpeg -y -f x11grab -video_size 1920x1008 -framerate 30 -i :0.0+0,36 -f pulse -ac 2 -i default \ -vf 'tpad=start_duration=10:color=0xFF,scale=1280x720' -c:v libx264 -g 60 -preset ultrafast \ -b:v 3M -maxrate 3M -pix_fmt yuv420p -af 'adelay=1|1' -c:a aac -b:a 128k -ar 44100 \ -f flv 1.flv or ##record screen with overlay and delay filters ffmpeg -y -f x11grab -video_size 1920x1080 -framerate 30 -i :0.0+0,0 \ -f pulse -ac 2 -i default -i logo.png -i screenlogo.png -filter_complex \ "[0:v]tpad=start_duration=10:color=0xFF,scale=1280:-1,setpts=PTS-STARTPTS[bg]; \ [1:a]adelay=1|1[a]; \ [2:v]scale=162:-1,setpts=PTS-STARTPTS[bg2]; \ [3:v]scale=120:-1,setpts=PTS-STARTPTS[bg3]; \ [bg][bg2]overlay=0:H-h[bg4]; \ [bg4][bg3]overlay=W-w:0[v]" \ -map "[v]" -map "[a]" -c:v libx264 -g 60 -preset ultrafast \ -b:v 3M -maxrate 3M -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 \ -f flv 1.flv But if i use this code for streaming there were no delay video and audio, video and audio start play immediately without 10 sec delay for audio and video. About "alerts" and "chat". You can use browser source in obs for playing chat from twitch/youtube/restream.io and alerts(donations, etc) . How i can do it with ffmpeg? пн, 15 июн. 2020 г. в 22:18, Carl Zwanzig : > On 6/15/2020 10:17 AM, Rob Hallam wrote: > > Is this still true? In OBS, Settings → Advanced there is a "Stream Delay" > > section (mentioned onhttps://obsproject.com/wiki/OBS-Studio-Overview). > > > > The default setting of 20s estimates mem usage of 11MB; I set the option > > to 120s which increased the memory usage estimate to 69MB. Even five > > minutes 'only' uses 174MB. > > I'd assume that obs is delaying encoded stream packets, not something that > an ffmpeg filter can do (they work on uncompressed frames between decode > and > encode). > > Best thing is for the OP to try it and see if that's what they need. > > z! > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Add delay to stream on twitch/youtube/restream.io, add chat and alerts
On 6/15/2020 10:17 AM, Rob Hallam wrote: Is this still true? In OBS, Settings → Advanced there is a "Stream Delay" section (mentioned onhttps://obsproject.com/wiki/OBS-Studio-Overview). The default setting of 20s estimates mem usage of 11MB; I set the option to 120s which increased the memory usage estimate to 69MB. Even five minutes 'only' uses 174MB. I'd assume that obs is delaying encoded stream packets, not something that an ffmpeg filter can do (they work on uncompressed frames between decode and encode). Best thing is for the OP to try it and see if that's what they need. z! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Add delay to stream on twitch/youtube/restream.io, add chat and alerts
On Mon, 15 Jun 2020 at 17:26, Carl Zwanzig wrote: > Add delay- how long? (delay is memory- or disk-intensive*) OBS can insert a > short delay, but longer ones usually mean writing data into a file and > playing it back later (which could be only 5 seconds). There are many > "gotchas" around that with file format and record/play timing. Please start > a separate email thread for that. Is this still true? In OBS, Settings → Advanced there is a "Stream Delay" section (mentioned on https://obsproject.com/wiki/OBS-Studio-Overview). The default setting of 20s estimates mem usage of 11MB; I set the option to 120s which increased the memory usage estimate to 69MB. Even five minutes 'only' uses 174MB. Cheers, Rob ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Add delay to stream on twitch/youtube/restream.io, add chat and alerts
(please do not top-post on this list) On 15/06/2020, KoreanFanOfficial wrote: Hello. I want to add delay, chat and alerts to my stream with ffmpeg. How i can do it? On 6/15/2020 3:48 AM, Tom Sparks wrote: Have you looked at OBS[1]? OBS filters can only add a short delay. Add delay- how long? (delay is memory- or disk-intensive*) OBS can insert a short delay, but longer ones usually mean writing data into a file and playing it back later (which could be only 5 seconds). There are many "gotchas" around that with file format and record/play timing. Please start a separate email thread for that. *(back-of-the-envelope calculation) if you assume uncompressed 8-bit RGB HD, that's over 6MB/frame, a 30 second buffer at 30fps will need to be something like 6GB (spinning disks aren't fast enough for this, needs to be SSD or in-memory) Add "chat"- that's not a function of the stream. Add "alerts"- what does that mean in this case? z! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Add delay to stream on twitch/youtube/restream.io, add chat and alerts
Have you looked at OBS[1]? [2]: https://obsproject.com/ On 15/06/2020, KoreanFanOfficial wrote: > Hello. I want to add delay, chat and alerts to my stream with ffmpeg. How i > can do it? > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Add delay to stream on twitch/youtube/restream.io, add chat and alerts
Hello. I want to add delay, chat and alerts to my stream with ffmpeg. How i can do it? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".