Thanks HN, much love
Ask HN: FFmpeg real-time desktop streaming
1–10 of 17 posts
Re: Ask HN: FFmpeg real-time desktop streaming
#2Re: Ask HN: FFmpeg real-time desktop streaming
#3Re: Ask HN: FFmpeg real-time desktop streaming
#4I don't think it uses ffmpeg, but it may have the features you are looking for
Re: Ask HN: FFmpeg real-time desktop streaming
#5Re: Ask HN: FFmpeg real-time desktop streaming
#6Re: Ask HN: FFmpeg real-time desktop streaming
#7My experiment was streaming via a ipfs transport layer.
fauxstream is a very thin wrapper around ffmpeg, it proved invaluable in providing a reference command I could iterate off of to get my stream working.
https://github.com/rfht/fauxstream
edit: it is hard to tell what op wants but it could be as simple(hah, the ffmpeg command line terrifies me) as
stream caster: ffmpeg -video_size 1280x720 -f x11grab -i :0 -r 30 -c:v libx264 -vb 3500k -minrate 3500k -maxrate 3500k -bufsize 7000k -preset ultrafast -vf format=yuv420p -g 60 -keyint_min 30 -f flv - | nc -l 1234
stream viewer: nc stream_caster 1234 | ffplay -
Re: Ask HN: FFmpeg real-time desktop streaming
#8Another server is SRS [3], but IMO it is more difficult to use, lacks features and the delay is about 1-3s — it requires far less bandwidth though.
[1] https://github.com/AirenSoft/OvenMediaEngine [2] https://github.com/hashworks/simple-ome [3] https://github.com/ossrs/srs
Re: Ask HN: FFmpeg real-time desktop streaming
#9I looked into a similar ffmpeg solution a couple of months ago and broadcast an libx264 video only stream with ~1 second latency to an rtsp server: https://gist.github.com/andrewmackrodt/88c2233fb9cc4797ada93...
However, I found this solution to be too CPU intensive as I was unsure if/how to instruct x11grab to interact with the GPU directly. Perhaps if I used my nvidia card for encoding it would have been more performant. However, OBS makes this entire process much easier.
Re: Ask HN: FFmpeg real-time desktop streaming
#10https://github.com/tcarrio/ffmpeg-streamcast/blob/master/bas...
Also, seven years, and I eventually ended up moving to OBS instead of diving even further, but that was working at the time.
However, it won't give you any pointers for using AV1, and this is just the streaming source, you'll still need an RTSP server and clients to access them.