12

I'm using VLC - 2.2.2 on Ubuntu 16.04. VLC is able to play the videos but I'm unable to take the snapshots using it. I tried disabling "Use Hardware Acceleration" by going in Preferences->Video and changing the output to OpenGL (GLX), OpenGL 2 and XVideo,one by one, the later resulted in a black screen.

When I try to capture a snapshot I get this error:

[00007f9440d10248] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  361.42  Tue Mar 22 17:29:16 PDT 2016 for hardware decoding.
[00007f946c509148] vdpau_chroma filter error: corrupt VDPAU video surface 0x7f94208e4950
[00007f94300fca08] core video output error: Failed to convert image for snapshot

Is there a way to tell VLC not to use Hardware Acceleration? My intention is to remain with Hardware Acceleration disabled for now.

  • 2
    VLC bug report: https://trac.videolan.org/vlc/ticket/14456 – cweiske Jan 07 '17 at 13:25
  • 2
    Forum thread from 2015: https://forum.videolan.org/viewtopic.php?t=129067 – cweiske Jan 07 '17 at 13:26
  • 1
    another workaround: http://matt.coneybeare.me/how-to-generate-png-screenshots-using-ffmpeg/ – TiloBunt Nov 27 '20 at 06:23
  • 1
    I used: ffmpeg -i input.mp4 -ss 00:00:32 -vframes 1 output.jpg – TiloBunt Nov 27 '20 at 06:30
  • @TiloBunt Yes, ffmpeg can do it. But I had, very ocassionally, problems with how VLC and ffmpeg seek to a given position. Sometimes, the frame saved to file is not the one I expect. This may happen by a variety of reasons. Maybe VLC gui only show position to seconds precision, but you are at 00:00:15.345, but you don't have a way to know it. Then you tell ffmpeg to seek to 00:00:15, and you get the wrong frame. – Hatoru Hansou Nov 27 '20 at 14:18
  • agree not ideal. But VLC didn't work for me. Btw in the cmd you can go down to mil sec -ss 00:00:32.300 but still hard to get the exact one. – TiloBunt Nov 27 '20 at 22:17

1 Answers1

17

Answering myself.

The option at Preferences->Video->Use Hardware Acceleration controls how graphics are drawn on screen, not how videos are decoded. The option to disable VDPAU is at Preferences->Input & Codecs. Then look for "Hardware accelerated decoding" and change VDPAU for any of the other options, I'm using X11 VA-API.

And problem solved. I can take snapshots again. I will remain with Hardware decoding disabled until the problem is fixed, probably at the side of the VDPAU driver library (just guessing). No perceptible lag while playing videos so far.