From f6823f72daf5cb75ae8d638112155537829544a0 Mon Sep 17 00:00:00 2001 From: markwkidd Date: Tue, 12 Sep 2017 01:37:18 -0400 Subject: [PATCH] Updated FFmpeg recording and live streaming (markdown => mediawiki) --- FFmpeg-recording-and-live-streaming.md | 63 ------------------- FFmpeg-recording-and-live-streaming.mediawiki | 1 + 2 files changed, 1 insertion(+), 63 deletions(-) delete mode 100644 FFmpeg-recording-and-live-streaming.md create mode 100644 FFmpeg-recording-and-live-streaming.mediawiki diff --git a/FFmpeg-recording-and-live-streaming.md b/FFmpeg-recording-and-live-streaming.md deleted file mode 100644 index 3b283a7..0000000 --- a/FFmpeg-recording-and-live-streaming.md +++ /dev/null @@ -1,63 +0,0 @@ -RetroArch has the capability to record gaming footage in real-time using libavcodec (FFmpeg). -Both lossless and lossy coding is supported. It is possible to configure most encoding options -for libavcodec using a separate config file. - -## FFmpeg version -RetroArch requires a very recent version of FFmpeg to work correctly. -If you are on Linux or OSX, your distros FFmpeg build is likely out of date, and you should build FFmpeg from Git. A recommended command line is: - - ./configure --prefix=/opt/ffmpeg --enable-libx264 --enable-gpl --enable-libmp3lame - make - sudo make install - -This assumes you will install a custom FFmpeg build into `/opt/ffmpeg`. -For Windows users, the redist includes recent enough libav* binaries. - -Now you can configure RetroArch with: - - PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig ./configure - -and the configure script should pick up the FFmpeg libraries in `/opt/ffmpeg/lib`. Check config.mk -to make sure. After successfully compiling, make sure that the RetroArch binary picks up the correct FFmpeg libs by adding `/opt/ffmpeg/lib` to LD_LIBRARY_PATH (or the equivalent on OSX). - -## Lossless coding -By default (not providing an encoding config), lossless coding is used. This means libx264/RGB, with -qp 0 (lossless). The audio codec used is FLAC. libx264/RGB ensures very nice bitrates even when lossless and very fast encoding. - -## Lossy and flexible coding config -By adding the `--recordconfig ` parameter, you have more control over encoding. -The recognized config options are: - - vcodec = # Same as -vcodec - acodec = # Same as -acodec - format = # Muxer format to use. E.g. mkv, flv or mp4. This is normally inferred, but must be set when using extensionless formats like RTMP (streaming). - threads = # Threads to use when encoding video. Should be set to (# of CPU threads - 1). - frame_drop_ratio = # Only encodes every frames. - pix_fmt = # Same as -pix_fmt, no default is assumed, must be set! - scale_factor = # Scales input by . Useful when encoding in chroma subsampled formats like yuv420p. - sample_rate = # Audio output sampling rate. - audio_global_quality = # Global quality for audio (VBR). Maps to codec->global_quality in API. Play around with it. Higher = better. 75 seems to be a fair value. - audio_bit_rate = # Audio bit rate (CBR). This is in bit/s, so use e.g. 192000 for 192 kb/s. - - video_{option} = # Sets generic video option {option} to . This is codec specific. Mostly useful for libx264. - audio_{option} = # Sets generic audio option {option} to . This is codec specific. - -## Live streaming - -RetroArch can live stream to RTMP services like [twitch](http://www.twitch.tv/). -To live stream there, create a config that is tailored for twitch. Example: - - vcodec = libx264 - acodec = libmp3lame - pix_fmt = yuv420p - scale_factor = 2 - threads = 3 - video_crf = 25 - video_preset = superfast - video_tune = animation - audio_global_quality = 75 - sample_rate = 44100 - format = flv - -Now you can stream to twitch with a command like: - - retroarch --record rtmp://live.twitch.tv/app/$YOUR_TWITCH_ID --recordconfig twitch.cfg \ No newline at end of file diff --git a/FFmpeg-recording-and-live-streaming.mediawiki b/FFmpeg-recording-and-live-streaming.mediawiki new file mode 100644 index 0000000..e94c21c --- /dev/null +++ b/FFmpeg-recording-and-live-streaming.mediawiki @@ -0,0 +1 @@ +This doc is now part of [https://github.com/libretro/docs libretro-docs] and can be viewed here: https://github.com/libretro/docs \ No newline at end of file