[HowTo] Livestreaming your desktop using ffmpeg

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium


[HowTo] Livestreaming your desktop using ffmpeg

Postby Dimi » Tue May 17, 2016 7:22 am

Please, get acknowledged with this: http://ossnext.trueinstruments.com/wiki ... xed_output

Then make a script file which uses piping of ossrecord output. For twitch livestreaming I am using this script:

Code: Select all

ossrecord -s48000 -b16 -c2 -d/dev/oss/oss_cmi878x0/loop0 - | ffmpeg -loglevel error -f s16le -ac 2 -i pipe: -s 1920x1080 -r 25 -f x11grab -draw_mouse 0 -i :0.0 -c:v libx264 -b:v 16000k -minrate 8000k -maxrate 16000k -bufsize 16000k -preset ultrafast -pix_fmt yuv420p -s 1280x720 -strict -2 -c:a aac -b:a 192k -threads 0 -f flv "rtmp://xxxxxxxx.twitch.tv/app/live_xxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Info about ffmpeg arguments can be found here:
ffmpeg -h
man ffmpeg

Known problem:
Loop device working nice just once after OSS started. So if you stopped your recording, then you should "soundoff && soundon" to make loop device working again.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 3 guests