Main menu:

Sponsoring

Please consider a small donation:

 

Also appreciated: support me by clicking the ads (costs nothing) :-)

 

Or you can donate bitcoin:

 

Thanks to TekLinks in Birmingham, AL, for providing colocation and bandwidth.

Page Rank

Fame

FOSS Force Best Blog--2013 Award

Recent posts

Recent comments

About this blog

I am Eric Hameleers, and this is where I think out loud.
More about me.

Search

My Favourites

Slackware

Calendar

July 2014
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  

RSS Alien's Slackware packages

RSS Alien's unofficial KDE Slackware packages

RSS Alien's multilib packages

Meta

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

Comments

Comment from mlangdn
Posted: May 29, 2010 at 19:32

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?

Comment from mlangdn
Posted: May 29, 2010 at 19:34

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.

):

Comment from alienbob
Posted: May 30, 2010 at 15:49

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

Eric

Comment from Desiderius
Posted: June 7, 2010 at 13:49

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 !

Comment from alienbob
Posted: June 7, 2010 at 21:30

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

Comment from Desiderius
Posted: June 9, 2010 at 13:12

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

Comment from alienbob
Posted: June 9, 2010 at 15:07

@Desiderius:
You can post the strace to a pastebin such as http://vlc.pastebin.org/

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.

Eric

Comment from Desiderius
Posted: June 10, 2010 at 13:36

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 :

http://pastebin.com/RBSdMjVw

Comment from alienbob
Posted: June 10, 2010 at 20:21

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

Comment from Desiderius
Posted: June 11, 2010 at 08:31

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 ?

Comment from alienbob
Posted: June 11, 2010 at 11:07

@Desiderius:
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.

Eric

Comment from Desiderius
Posted: June 11, 2010 at 13:33

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

Comment from alienbob
Posted: June 12, 2010 at 13:21

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

Write a comment