[Solved] VLC could not decode the format "h264"

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

[Solved] VLC could not decode the format "h264"

Post by Wolf359 »

VLC and Media Player work fine and play any video on my LM 19.2 installation.

Recently VLC started to give this error message "VLC could not decode the format 'h264' " when trying to open any video file (h264 encode in this case). When I try to open the same or any other video file with Media Player it closes / crashes.

After restarting the computer it all works fine again.

Is there anything I could re-install or disable-enable to make it work without having to reboot every time?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: VLC could not decode the format "h264"

Post by catweazel »

Wolf359 wrote: Mon Oct 07, 2019 7:04 pm Is there anything I could re-install or disable-enable to make it work without having to reboot every time?
Not if the culprit is a corrupt video file.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: VLC could not decode the format "h264"

Post by Wolf359 »

I said "any video file" so it's not just a specific one.

My best guess is it has something to do with the codecs currently loaded and a reboot loads them properly.. ??

Edit: BTW I have sound when playing the file in VLC, but instead of video I get the error message from the title of this post in a popup dialog.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: VLC could not decode the format "h264"

Post by catweazel »

Wolf359 wrote: Mon Oct 07, 2019 7:18 pm I said "any video file" so it's not just a specific one.
I know what you wrote, but it would likely depend on the effects of the corruption and possibly the order of loading the files.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: VLC could not decode the format "h264"

Post by Wolf359 »

Yes, but again, the (vidoe) file is not corrupt at all. It plays totally fine after a reboot. Unless you mean another file or files ?

Also, I use LM for years now, and never had such a problem.

So.. it must be something else..!?
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: VLC could not decode the format "h264"

Post by Wolf359 »

I tried to start VLC and Media Player (Xplayer) from command line, but no further error detail is given :

Code: Select all

    $ vlc abc.mp4
    VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
    [0000559bbef44630] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    qt5ct: using qt5ct plugin
    qt5ct: D-Bus global menu: no
    qt5ct: D-Bus system tray: no
    [00007f0fed9600e0] main decoder error: Codec `h264' (H264 - MPEG-4 AVC (part 10)) is not supported.
    QObject::~QObject: Timers cannot be stopped from another thread
    $ xplayer abc.mp4 
    
    (xplayer:11402): Gtk-WARNING **: 03:38:03.835: GtkButton does not have a child property called expand
    
    (xplayer:11402): Gtk-WARNING **: 03:38:03.835: GtkButton does not have a child property called fill
    
    (xplayer:11402): Gtk-WARNING **: 03:38:03.835: GtkButton does not have a child property called position
    
    (xplayer:11402): Gtk-WARNING **: 03:38:03.836: GtkToggleButton does not have a child property called expand
    
    (xplayer:11402): Gtk-WARNING **: 03:38:03.836: GtkToggleButton does not have a child property called fill
    
    (xplayer:11402): Gtk-WARNING **: 03:38:03.836: GtkToggleButton does not have a child property called position
    
    ** (xplayer:11402): CRITICAL **: 03:38:03.854: bacon_video_widget_has_next_track: assertion 'BACON_IS_VIDEO_WIDGET (bvw)' failed
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.198: Could not find signal handler 'continue_button_clicked_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.198: Could not find signal handler 'load_button_clicked_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.198: Could not find signal handler 'save_button_clicked_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.198: Could not find signal handler 'goto_button_clicked_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.198: Could not find signal handler 'remove_button_clicked_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'add_button_clicked_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'tree_view_button_press_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'tree_view_key_press_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'tree_view_row_activated_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'tree_view_popup_menu_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'popup_goto_action_cb'.  Did you compile with -rdynamic?
    
    (xplayer:11402): Gtk-WARNING **: 03:38:04.199: Could not find signal handler 'popup_remove_action_cb'.  Did you compile with -rdynamic?
    Segmentation fault (core dumped)


Trying to open another file (with different encoding) gives the same error. Only a reboot solves the problem at this point.

I uninstalled-installed "Media Codecs" and VLC from Software Manger (without rebooting) but the result is still the same.
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: VLC could not decode the format "h264"

Post by all41 »

Try creating a temporary new user in Menu/Users and Groups
Log out and log back in as the new user.
Repeat playing the same videos--do you still have the issue?
New users get a fresh set of config files.
Everything in life was difficult before it became easy.
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: VLC could not decode the format "h264"

Post by Wolf359 »

I did that (without rebooting, only a log-off and log-on with new user) and I could play the file with the new user.

Then I logged off again and logged on with my user and could also play the file without error.

So I don't have to reboot after all, a log-off - log-on solves the problem it seems. But it's still annoying.

What should I do at this point ? Delete some (?) folders under /home/myuser maybe ? If yes, which ones ?
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1491
Joined: Tue Apr 26, 2016 3:28 pm

Re: VLC could not decode the format "h264"

Post by Arch_Enemy »

Have you updated VLC recently?

I'm having no issues with it, but since I have an nVidia card I loaded all the nVidia codecs as well.

You can get the latest VLC codecs from their website, but that wouldn't really explain the "Run Once" issue.
I have travelled 37629424162.9 miles in my lifetime

One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1491
Joined: Tue Apr 26, 2016 3:28 pm

Re: VLC could not decode the format "h264"

Post by Arch_Enemy »

BTW, next time you play it, do this:

Click on Tools, then click "Codec information".
I have travelled 37629424162.9 miles in my lifetime

One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: VLC could not decode the format "h264"

Post by Wolf359 »

I also have no issue with VLC. I uninstalled-installed "Media Codecs" and VLC from Software Manger an hour ago, but with no change. A log-off / log-on fixed it.. fow now.

It's not exactly a "run once" issue either, because I can play many files one after another. It's rather a random issue. Don't know what triggers it.

But after it occurs, after the VLC popup with error message complaining about the codec pops up, it never goes away, whatever I do. Only a reboot / re-logon solves it.

So I'm sure it's not a VLC issue, because Xplayer (media player) crashes as well (and I reinstalled VLC), but rather a codec issue.

Is there a cache or a folder under /home/myuser that I could delete savely ? Something that triggers LM to reload all codecs !?? :roll:
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: VLC could not decode the format "h264"

Post by Wolf359 »

Someone on Reddit wrote :
If any Chromium based app is open at the same time when you open VLC , it does that.

I personally observed that , with Opera and Discord app.

It is a general Linux problem happening with those and probably related how ffmpeg works.
So I had Vivaldi open whenever the error occured. Also, I switched to Vivaldi 1 or 2 months ago, and the error occured pretty much after that.

I simply closed Vivaldi the last time the error occured and voila, It worked!!!
I could play the file in VLC and XPlayer again without re-login or reboot.
User avatar
murray
Level 5
Level 5
Posts: 784
Joined: Tue Nov 27, 2018 4:22 pm
Location: Auckland, New Zealand

Re: [Solved] VLC could not decode the format "h264"

Post by murray »

For what it's worth I use Opera and VLC all the time, never had a problem like you describe.
Running Mint 19.3 Cinnamon on an Intel NUC8i5BEH with 16GB RAM and 500GB SSD
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: [Solved] VLC could not decode the format "h264"

Post by Wolf359 »

I don't encounter it always, but rather randomly. Maybe only when I have a Youtube vid playing in the background..?
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: VLC could not decode the format "h264"

Post by all41 »

Wolf359 wrote: Mon Oct 07, 2019 8:57 pm I did that (without rebooting, only a log-off and log-on with new user) and I could play the file with the new user.

Then I logged off again and logged on with my user and could also play the file without error.

So I don't have to reboot after all, a log-off - log-on solves the problem it seems. But it's still annoying.

What should I do at this point ? Delete some (?) folders under /home/myuser maybe ? If yes, which ones ?
There is something funky in your /home/.config/vlc directory. Find this in your /home hidden files and rename it to something such as vlc_renamed. Then vlc will recreate a fresh config file. Then you should be good to go.
If all good at that point just delete the renamed .config/vlc file
Everything in life was difficult before it became easy.
User avatar
murray
Level 5
Level 5
Posts: 784
Joined: Tue Nov 27, 2018 4:22 pm
Location: Auckland, New Zealand

Re: [Solved] VLC could not decode the format "h264"

Post by murray »

Wolf359 wrote: Mon Oct 07, 2019 10:46 pm I don't encounter it always, but rather randomly. Maybe only when I have a Youtube vid playing in the background..?
Ah, that could be it. I've never tried playing a video in the browser and another in VLC at the same time (I can only concentrate on one thing at a time!)
Running Mint 19.3 Cinnamon on an Intel NUC8i5BEH with 16GB RAM and 500GB SSD
Wolf359
Level 2
Level 2
Posts: 71
Joined: Thu Feb 09, 2012 4:28 pm

Re: [Solved] VLC could not decode the format "h264"

Post by Wolf359 »

Some extra info;

I tried to play a downloaded video from within qBittorrent and the error occured again.
I closed Vivaldi.

When trying to start the video by double clicking within qBittorrent, VLC started and the error continued to popup.
When trying to start the video from within Nemo, VLC (after Vivaldi was closed) first gave the error, but eventually after a few tries played the file.

After restarting qBittorrent and double clicking the file again (from within qBittorent UI) it started VLC and the vid played successfully.
So at one point, Nemo was successful but qBittorrent was not.

My conclusion; it depends on from where you start VLC and what programs are running.

At least I don't have to reboot the whole machine anymore :D
Locked

Return to “Beginner Questions”