I’ve been working on adding lossy encoding possibilities for RetroArch. To do this, I had to make the encoder more flexible, which means a config file specifically for the recorder.
Now, FFmpeg supports outputting to RTMP, which means, we can now record directly and have it streamed to live services like Twitch. Example config:
# twitch.cfg
vcodec = libx264
pix_fmt = yuv420p # twitch only supports yuv420p
scale_factor = 2 # Upscales with 2x to preserve chroma
acodec = libmp3lame
audio_global_quality = 75
sample_rate = 44100
format = flv # Flash muxer
video_crf = 25 # -crf
video_tune = animation # -tune
video_preset = superfast # -preset
threads = 3 # x264 threads
Example RetroArch invocation:
retroarch --record rtmp://live.twitch.tv/app/live_37868136_jKiYTKHcOEJTBSCO4nabcdefgdrwqi --recordconfig twitch.cfg # Use your twitch streaming address, this one is obviously fake ;)
You’ll need a fairly recent FFmpeg build. I’ve updated redist for Windows users. For now, you’ll have to build yourself to get this functionality.