Ubuntu – Vlc cannot play mkv and mp4 formats

16.04codecsvideovlc

Installed vlc (VLC version 2.2.2 Weatherwax) from the 16.04 LTS official repo. I have the ubuntu-restricted-extras. Videos play with totem (3.18.1) but if I try to run vlc -vvv file_name it crashes with Segmentation fault (core dumped). avi files play fine with both players.

Below a screenshot of the settings I used to use with my previous version of vlc and Ubuntu 14.04 LTS. Then it was working fine. I tried to change the output type but it doesn't help.

enter image description here.

Best Answer

I ran into this issue because VLC was attempting to use VDAPU for video decoding, and it was causing a segmentation fault. Presumably this is actually a bug in the open source Radeon drivers, but I was able to work around this by simply disabling hardware video decoding. The setting is kind of buried, just open VLC then go to Tools->Preferences->Input/Codecs and set Hardware-accelerated decoding to Disable.

In case this didn't solve your particular problem, I was able to figure out that it was a problem with VDAPU by executing the following steps:

  1. ulimit -c unlimited to get Ubuntu to actually create a core dump
  2. vlc from the same terminal
  3. Wait for segfault
  4. gdb `which vlc`
  5. core core Load the core file which is actually called core
  6. bt This gave me the following ouput:

    #0  0x00007fe128b4118e in llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::ScheduleDAGInstrs* (*)(llvm::MachineSchedContext*)>::OptionInfo, false>::grow(unsigned long) () from /usr/lib/x86_64-linux-gnu/libLLVM-4.0.so.1
    #1  0x00007fe128b4125e in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-4.0.so.1
    #2  0x00007fe1067fab0a in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1
    #3  0x00007fe16555b4ea in call_init (l=<optimized out>, argc=argc@entry=2, 
        argv=argv@entry=0x7ffecd92f6b8, env=env@entry=0x7fe138050690)
        at dl-init.c:72
    #4  0x00007fe16555b5fb in call_init (env=0x7fe138050690, argv=0x7ffecd92f6b8, 
        argc=2, l=<optimized out>) at dl-init.c:30
    #5  _dl_init (main_map=main_map@entry=0x7fe10c0172c0, argc=2, 
        argv=0x7ffecd92f6b8, env=0x7fe138050690) at dl-init.c:120
    #6  0x00007fe165560712 in dl_open_worker (a=a@entry=0x7fe121f082c0)
        at dl-open.c:575
    #7  0x00007fe16555b394 in _dl_catch_error (
        objname=objname@entry=0x7fe121f082b0, 
        errstring=errstring@entry=0x7fe121f082b8, 
        mallocedp=mallocedp@entry=0x7fe121f082af, 
        operate=operate@entry=0x7fe165560300 <dl_open_worker>, 
        args=args@entry=0x7fe121f082c0) at dl-error.c:187
    #8  0x00007fe16555fbd9 in _dl_open (
        file=0x7fe121f08540 "${ORIGIN}/vdpau/libvdpau_radeonsi.so.1", 
        mode=-2147483390, caller_dlopen=0x7fe1095a46cc, nsid=-2, 
    ---Type <return> to continue, or q <return> to quit---
    

The entry at #8 showed me that the problem was in the Radeon drivers.

Related Question