Page 1 of 1

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

Posted: Mon Oct 07, 2019 7:04 pm
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?

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 7:16 pm
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.

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 7:18 pm
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.

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 8:03 pm
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.

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 8:07 pm
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..!?

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 8:46 pm
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.

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 8:49 pm
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.

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 8:57 pm
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 ?

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 9:19 pm
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.

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 9:21 pm
by Arch_Enemy
BTW, next time you play it, do this:

Click on Tools, then click "Codec information".

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 9:27 pm
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:

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 10:18 pm
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.

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

Posted: Mon Oct 07, 2019 10:32 pm
by murray
For what it's worth I use Opera and VLC all the time, never had a problem like you describe.

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

Posted: Mon Oct 07, 2019 10:46 pm
by Wolf359
I don't encounter it always, but rather randomly. Maybe only when I have a Youtube vid playing in the background..?

Re: VLC could not decode the format "h264"

Posted: Mon Oct 07, 2019 11:25 pm
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

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

Posted: Tue Oct 08, 2019 4:23 pm
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!)

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

Posted: Tue Oct 08, 2019 4:32 pm
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