Is it possible to stream retropie to twitch?
-
@lwszolek no progress here, but I have not tinkered with it much. My circumstances prevent me from overclocking my pi at present (heat management issues) and I'm thinking an external card is the way to go once I can afford it. It offloads recording to another device and lets the pi focus on far important matters like playing the game :)
I will toss an update on here if I ever manage to get it working. -
Hi,
I have my third and final part of the guide on recording (and using twitch) 90% complete; I'm sad to say it's been on hiatus due to a family tragedy. I aim to get back to it, if for no better reason than to take my mind somewhere else.
I dislike releasing unpolished guides, but may have to if I cannot motivate myself sufficiently - maybe rework it at some better time.
-
@lwszolek to be honest I'm not sure how the pi 2 will handle native capture - this entire project has been undertaken on a pi 3 @ 1350mhz; on less demanding emulators it's likely to be okay. Further tweaking the ffmpeg config to trade quality for speed is also an option.
-
@RetroResolution - I am sorry to hear you're going through a hard time right now. Online tutorials are not a priority next to RL. If you don't get around to finishing the guide, can I peek at the unfinished version? If you like, I can help edit it or something like that.
Good to know about the pi3. I do have one of those lying around also, so if I can't get the pi2 at least working with nes emulator (my goal), I'll try that one.
-
@lwszolek thanks for your support, it helps!
I did manage to complete another chunk of the guide - it's not been helping that the on-line editor keeps crashing under the strain (relatively complex layout for a WordPress page)
I will try and get this finished tonight - lost two days trying to install visual studio on Windows 7...
I'm happy to give you a copy to look at if I don't get it published today or tomorrow. -
@lwszolek said in Is it possible to stream retropie to twitch?:
@RetroResolution - I am sorry to hear you're going through a hard time right now.
I hate to hear this as well. Your guides are always a pleasure to view, right alongside Herb's and Floob's and I look forward to seeing more anytime you feel like producing them.
-
@mediamogul thanks for your support, I do appreciate it.
-
I've finally published the guide... I hope that you find it helpful - please feel free to ask me any questions (as I've not had time to polish it quite as much as I'd like)
Details are on the forum post here:
A direct link to the guide is here:
Recording Live Gameplay in RetroPie’s RetroArch Emulators Natively on the Raspberry Pi
-
Has anyone actually succeeded with streaming to twitch? I just get Retroarch crashing with a bus error when I attempt.
-
@zerojay I've not succeeded yet, as Twitch requires a specific x264 video and planar format; the trick to getting it working will be to use ffmpeg as a command-line tool to transcode some existing video file; this allows lots of tests with different configurations to be made without slow, tedious launching of Emulation Station, then dropping back to the terminal to make changes (this is how I worked out the settings for recording).
I have a link somewhere to a thread in which the Twitch codec requirements are discussed; it's on another machine, but I'll update this post to include it as soon as I can.
[Edit]
The link I was looking for is:
http://libretro.com/forums/showthread.php?t=115The example Twitch settings as found on the thread can be seen, below. The main issue is that the video codec is libx264 and the pix_fmt must be yuv420p. In the code I use to record to disk, the video codec is libx264rgb with pix_fmt set to bgr24
I spent an evening looking into this, but have not been able to directly ouput to yuv420p using any x264 codec. It may be necessary to recompile the ffmpeg library to include some alternative x264 codec library (one which directly supports output to yuv420p).
The ffmpeg documentation does mention (somewhere...) commands to interrogate a given code to see which pix_fmts can be used.
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
-
For anyone that's still following this, I've found some FFMPEG settings that work:
vcodec = libx264 acodec = libfdk_aac pix_fmt = yuv420p threads = 2 scale_factor = 1 format = flv video_preset = ultrafast video_profile = main video_tune = animation video_bufsize = 512k video_minrate = 512k video_maxrate = 512k video_r = 60 video_g = 120 video_keyint_min = 60 sample_rate = 44100 audio_preset = aac_he_v2 audio_global_quality = 1
You can read more about it in my post: How To Live Stream To Twitch from a RetroPie
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.