How to force simplescreenrecorder uses openh264 codec

I had to install from RPM Fusion the codec x264 to use with simplescreenrecorder, before install the codec SRR doesn’t recognize the openh264 installed by default.

❯ dnf list --installed \*264\*
Installed Packages
gstreamer1-plugin-openh264.x86_64               1.24.7-1.fc40                                    @updates              
mozilla-openh264.x86_64                         2.4.1-2.fc40                                     @fedora-cisco-openh264
openh264.x86_64                                 2.4.1-2.fc40                                     @fedora-cisco-openh264
x264.x86_64                                     0.164-13.20231001git31e19f92.fc40                @rpmfusion-free       
x264-libs.x86_64                                0.164-13.20231001git31e19f92.fc40                @rpmfusion-free       
~                                                                                                                     
❯ 
                                     

System

❯ neofetch
             .',;::::;,'.                chris@fedora 
         .';:cccccccccccc:;,.            ------------ 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 40 (Workstation Edition) x86_64 
    .:cccccccccccccccccccccccccc:.       Kernel: 6.10.9-200.fc40.x86_64 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Uptime: 33 mins 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Packages: 2126 (rpm), 8 (flatpak) 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Shell: zsh 5.9 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Resolution: 1920x1080 
:cccccccccccccc;MMM.;cccccccccccccccc:   DE: GNOME 46.5 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   WM: Mutter 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM Theme: Adwaita 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   Theme: Adwaita [GTK2/3] 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Icons: Adwaita [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Terminal: gnome-terminal 
cccccc;dNMWXXXWM0::cccccccccccccc:,      CPU: Intel i5-4430 (4) @ 3.200GHz 
cccccccc;.:odl:.;cccccccccccccc:,.       GPU: NVIDIA GeForce GT 610 
:cccccccccccccccccccccccccccc:'.         Memory: 3161MiB / 15777MiB 
.:cccccccccccccccccccccc:;,..
  '::cccccccccccccc::;,.                                         

Added openh264 and removed flatpak, intel, nvidia

It would be nice if you were to use dnf instead of rpm for most of your queries since that shows the package, the version, and the repo it was installed from.

# dnf list installed \*264\*
Installed Packages
gstreamer1-plugin-openh264.x86_64                      1.24.7-1.fc40                                          @updates              
mozilla-openh264.x86_64                                2.4.1-2.fc40                                           @fedora-cisco-openh264
openh264.x86_64                                        2.4.1-2.fc40                                           @fedora-cisco-openh264
x264-libs.x86_64                                       0.164-13.20231001git31e19f92.fc40                      @rpmfusion-free       

The issue really is that fedora does not provide all the codecs needed for many different multimedia apps.

I think that firefox use the package openh264.x86_64 to play some YouTube videos, SSR doesn’t recognize that, have to install x264 to create mp4 videos in SSR.

❯ dnf info openh264
Last metadata expiration check: 0:05:29 ago on Wed 18 Sep 2024 09:23:17 PM -05.
Installed Packages
Name         : openh264
Version      : 2.4.1
Release      : 2.fc40
Architecture : x86_64
Size         : 1.1 M
Source       : openh264-2.4.1-2.fc40.src.rpm
Repository   : @System
From repo    : fedora-cisco-openh264
Summary      : H.264 codec library
URL          : https://www.openh264.org/
License      : BSD-2-Clause
Description  : OpenH264 is a codec library which supports H.264 encoding and decoding. It is
             : suitable for use in real time applications such as WebRTC.

~              

Maybe any other package can works, because when you install x264 you must use --allowerasing.

sudo dnf install x264 --allowerasing 

And it remove or replace ffmpeg-free and some more packages.

❯ dnf list \*264\*
Last metadata expiration check: 0:08:23 ago on Wed 18 Sep 2024 09:23:17 PM -05.
Installed Packages
gstreamer1-plugin-openh264.x86_64               1.24.7-1.fc40                                    @updates              
mozilla-openh264.x86_64                         2.4.1-2.fc40                                     @fedora-cisco-openh264
openh264.x86_64                                 2.4.1-2.fc40                                     @fedora-cisco-openh264
x264.x86_64                                     0.164-13.20231001git31e19f92.fc40                @rpmfusion-free       
x264-libs.x86_64                                0.164-13.20231001git31e19f92.fc40                @rpmfusion-free       
Available Packages
gstreamer1-plugin-openh264.i686                 1.24.7-1.fc40                                    updates               
h264enc.noarch                                  1:10.4.7-16.fc40                                 rpmfusion-free        
mod_h264_streaming.x86_64                       2.2.7-19.fc40                                    rpmfusion-nonfree     
noopenh264.i686                                 0.1.0~openh264_2.4.0-1.fc40                      fedora                
noopenh264.x86_64                               0.1.0~openh264_2.4.0-1.fc40                      fedora                
noopenh264-devel.i686                           0.1.0~openh264_2.4.0-1.fc40                      fedora                
noopenh264-devel.x86_64                         0.1.0~openh264_2.4.0-1.fc40                      fedora                
obs-studio-plugin-x264.x86_64                   30.2.2-1.fc40                                    rpmfusion-free-updates
openh264-devel.x86_64                           2.4.1-2.fc40                                     fedora-cisco-openh264 
x264-devel.i686                                 0.164-13.20231001git31e19f92.fc40                rpmfusion-free        
x264-devel.x86_64                               0.164-13.20231001git31e19f92.fc40                rpmfusion-free        
x264-libs.i686                                  0.164-13.20231001git31e19f92.fc40                rpmfusion-free        
~                                                                                                                     
❯ 
1 Like

A related problems is that after install the new x264 and other packages are replaces, Firefox begin playing YouTube with problems, video stuttering in full screen. Firefox works very nice, e.g. Notion, ChatGPT web, WhatsApp Web, YouTube with the codecs installed by default. That’s the reason want to uninstall x264 for the default codecs, but SRR doesn’t work with that default codecs, in that case say MP4(not installed) or something like that.