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.

Eric

13 thoughts on “VLC and creating WebM video

  1. 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. 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. 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 !


  4. 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.

    Eric


  5. 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




  6. 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:
    http://vlc.pastebin.com/JcXnNUFt

    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).

    Eric


  7. 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 ?



  8. @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 …


  9. 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.

    Eric


Leave a Reply

Your email address will not be published.

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