My thoughts on Slackware, life and everything

VLC and creating WebM video

The VLC packages which I created to accompany the release of Slackware 13.1 support the playback of WebM video, the Google-sponsored new free video format.

What the VLC graphical interface can not yet do, is allow you to encode WebM video. Lucky for us, VLC has a command-line interface as well, with a humongous amount of options whose learning curve is even steeper than that of vi 😉

The VLC command-line allows to encode/transcode WebM video! Want to try it out?

Assume you have an existing video file, let’s say “my_first_video.avi” in an arbitrary video/audio encoding format. We are going to transcode that file to WebM format, the resulting file will be called “my_first_video.webm”, containing VP8 video and vorbis audio streams. This is the command do achieve it:

cvlc my_first_video.avi  –sout “#transcode{vcodec=VP80,vb=800,scale=1,acodec=vorbis,ab=128,channels=2}:std{access=file,mux=”ffmpeg{mux=webm}”,dst=my_first_video.webm}”

(note: the commandline is not completely visible in this blog post, but you can select the lines with your mouse and that will select the full commandline)

When the command prompt returns, your transcoded WebM video is ready! If you use “vlc” rather than “cvlc” then you will see a VLC window appear but instead of playing the video, it will just show the slider moving forward which is actually a good indicator of how far the transcoding has progressed.



  1. mlangdn

    Well – I gave it a try with an mp4 video. It complained about :
    vlc: unknown option or missing mandatory argument ‘-s’.

    This is the exact command I used:

    vlc /home/michael/Videos/lifeinanortherntown -sout “#transcode{vcodec=VP80,vb=800,scale=1,acodec=vorbis,ab=128,channels=2}:std{access=file,mux=”ffmpeg{mux=webm}”,dst=lifeinanortherntown.webm}”

    Maybe it does not work for mp4 files?

  2. mlangdn

    Sorry about the double – it said wrong security code and to try again. I also didn’t mean for that to run all over the page.


  3. alienbob

    No problem 🙂 It’s not your fault but the wordpress software’s. I’ll delete the double post.


  4. Desiderius

    The rc2 version of VLC you posted on June 3 does not work :
    it crashes with”Segmentation fault”

    Although the rc1 did work perfectly on the same computer !

  5. alienbob

    Yes I have seen crashes too, and they were all related to VAAPI (GPU hardware acceleration). If you have my vdpau-video package installed (for Nvidia GPUs), please check what happens after you remove that. The same advice for the libva package in case you did not have vdpau-video installed.


  6. Desiderius

    I have uninstalled your libva package ( no vdpau-video package installed ) and reinstalled vlv 1.1.0 rc2 again.

    Same result : immediate crash with Segmentation fault !

    I have tried yesterday to send you the strace but it has surely owerflooded the blog

  7. alienbob

    You can post the strace to a pastebin such as

    In the meantime, I am rebuilding vlc-1.1.0-rc2 with debugging enabled, so that I can generate a meaningful backtrace in the debugger.


  8. Desiderius

    Alien Bob : If it can help you, you can see the strace output
    of the vlc 1.1.0 rc 2 crash on my computer here :

  9. alienbob

    I rebuilt the vlc-1.1.0-rc2 package and added “–enable-debug” to VLCs configure command, also commenting out the stripping of binaries.
    The resulting gdb backtrace of a vlc session is here:

    I hope someone can make heads or tails of this. I am not a VLC developer nor a programmer, so I can not determine why the segfault occurs. The file where the segfault occurs, is identical to the one in vlc-1.1.0-rc1 and the libva package I have installed did not change either.

    When I remove the libva package and start VLC again, I do not get a segfault and the video plays normally (but without hardware-supported decoding of course).


  10. Desiderius

    So could you put back the 1.10 rc 1 packages of vlc beside the rc.2 ones ( in pkg64) in order I can reload them and have a vlc working on my computer ?

  11. alienbob

    I am building RC3 packages at the moment and when I upload those, I will also add back the RC1 packages… just to be sure.


  12. Desiderius

    @alienbob : Thanks ! I will test the RC3 packages as soon as you will upload them and let you know how they work.
    But it is safer to have the rc1 packages in case of …

  13. alienbob

    The RC3 packages have the same crash bug… I am going to upload them together with the old RC1 packages.

    However, you can prevent the crash (and still enjoy VAAPI GPU hardware video decoding for all supported video formats) if you start your vlc witth the following commandline parameters:

    $ vlc –no-sse2 –no-sse41

    The crash occurs in a bit of assembly code in the “COPY64” routine in modules/codec/avcodec/copy.c. If you add “–no-sse2 –no-sse41” then effectively this routine will not be used (but since SSE support gets disabled this way, playback of non-vaapi supported video formats will be somewhat slower).

    By the way, if you want to see what video formats are accelerated through VAAPI, run the command “vainfo” which will list the supported formats.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑