Command not recognised

New user running Fedora on Lenovo Thinkpad Yoga 7 16".
I ran quite a few commands in terminal when I first installed Fedora, just to get RPM fusion and some other bits installed.
Yesterday I tried to open a video file but it wouldn’t play the video, only audio, in the Fedora default video player. I installed VLC as always had good luck with that, but it reported missing codecs (h264 i think).
I googled for solutions and found a good guide which gave a list of commands to enter. None of them work for me.

An example command:

“sudo dnf install gstreamer1-plugins-{bad-,good-,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel”

It failed with:

“bash: $: command not found…”

Am I right in thinking that command should run without a hitch?!

Try the command again and leave off the $.

Because the default prompt is $ it is common to see guides that include the prompt.
They assume the reader knows not to type the prompt. It catches out people all the time.
Here we try to avoid adding the prompt when helping people because it is misleading.

For example to list files use ls is fine, but you might see $ ls that is misleading.

1 Like

Additionally, you may consider using Flakpak VLC instead.

I would not consider using the flatpak personally.

Instead you can install either ffmpeg or libavcodec-freeworld both of which will come from the rpmfusion-free repo and will bring in the missing codecs. Make sure you use a command such as sudo dnf install libavcodec-freeworld --allowerasing since that will allow the system to remove conflicting packages during the install.

While vlc has recently been moved from rpmfusion to fedora repos it was also stripped of the restricted codecs that fedora cannot distribute. The 2 packages I noted will bring in the additional codecs for playing almost all multimedia.

I think the site you quoted from is a bit out of date since that change just happened the last couple months.

Apparently I am missing some repos as my Fedora 39 does not recognize the locations for the codecs you listed. Sorry I am not good on terminal yet. Or is that supposed to be “libra” instead of “liba vcodec” in the command? Thanks for any help.
[bigjohnson@bigjohnson-linuxhost ~]$ sudo dnf install libavcodec-freeworld --allowerasing
[sudo] password for bigjohnson:
Fedora 39 - x86_64 - Updates 42 kB/s | 23 kB 00:00
Fedora 39 - x86_64 - Updates 1.0 MB/s | 2.2 MB 00:02
Last metadata expiration check: 0:00:08 ago on Wed 31 Jan 2024 04:05:34 PM CST.
No match for argument: libavcodec-freeworld
Error: Unable to find a match: libavcodec-freeworld
[bigjohnson@bigjohnson-linuxhost ~]$ sudo dnf install ffmpeg
Last metadata expiration check: 0:01:02 ago on Wed 31 Jan 2024 04:05:34 PM CST.
No match for argument: ffmpeg
Error: Unable to find a match: ffmpeg
[bigjohnson@bigjohnson-linuxhost ~]$

See Configuration - RPM Fusion to setup rpmfusion repos.

Thank You, it installed. I thought I had already installed or enabled RPM Fusion from the graphical Gnome Software Installer. I have so much to learn, always…

You can enable some rpmfusion repos from the gnome software app but the main ones must be installed as shown in that linked site.