Results tagged “video”

27C3: recommended watching

It's that time of year again: 27C3 was a blast, and here is a quick list of interesting lectures I managed to watch so far.

This is about a limit of video material I can watch in 4 days. I will probably update this post will more recommendations, as I go through rest of material.

One hint: in pre-release video material, so manual aspect ratio is required:

mplayer -aspect 16:9 http://27c3.hightech-lowlife.net/...

Update: links are now to official mirror in webm

Last weekend we had Nothing will happen event and I did small presentation about HTML5TV which is:

  • video annotation interface based on mplayer with slide overview html5tv-editing.png
  • web interface using HTML5 <video> tag and some JavaScript html5tv-web.png
I have collected some of presentations at http://html5tv.rot13.org/, so hop over there and have a look. If you have more interesting presentations, you can easily fork HTML5TV at github, annotate presentation and submit it for inclusion (or make your own archive if you prefer that). Have fun and let me know what you think about it.

As you might know, I despise flash as a way to deliver video, but just have to use it if you want to publish videos for poor M$ excuse for web browser. I don't like DVD either, mostly because it's encrypted, but let's finish with rants here.

So, I have DVD in my hand and need high quality flv file from it with readable slides if at all possible. You really don't want to encode video file more than once since it's already in mpeg format, and event two times re-encode could make your slides unreadable.

First step is to make local copy of whole disk (which will take 4+ Gb) so I can re-try encoding without listening to spinning DVD all the time and mount it:

$ dd if=/dev/cdrom of=dvd.iso
$ mkdir mnt
$ sudo mount dvd.iso mnt -o loop
$ ls -al mnt/
total 10
dr-xr-xr-x 4 4294967295 4294967295  136 2009-09-30 20:45 .
drwxr-xr-x 5 dpavlin    dpavlin    4096 2009-10-15 22:01 ..
dr-xr-xr-x 2 4294967295 4294967295   40 2009-09-30 17:25 AUDIO_TS
dr-xr-xr-x 2 4294967295 4294967295  560 2009-09-30 18:45 VIDEO_TS
Looks good so far. However, to add insult in injury, video is in multiple files (it's 60 minute lecture):
dpavlin@klin:/rest/iso/Zimbardo$ ls -al mnt/VIDEO_TS/
total 4093324
dr-xr-xr-x 2 4294967295 4294967295        560 2009-09-30 18:45 .
dr-xr-xr-x 4 4294967295 4294967295        136 2009-09-30 20:45 ..
-r--r--r-- 1 4294967295 4294967295      14336 2009-09-30 18:45 VIDEO_TS.BUP
-r--r--r-- 1 4294967295 4294967295      14336 2009-09-30 18:45 VIDEO_TS.IFO
-r--r--r-- 1 4294967295 4294967295     157696 2009-09-30 18:41 VIDEO_TS.VOB
-r--r--r-- 1 4294967295 4294967295      73728 2009-09-30 18:45 VTS_01_0.BUP
-r--r--r-- 1 4294967295 4294967295      73728 2009-09-30 18:45 VTS_01_0.IFO
-r--r--r-- 1 4294967295 4294967295      12288 2009-09-30 18:41 VTS_01_0.VOB
-r--r--r-- 1 4294967295 4294967295 1073565696 2009-09-30 18:42 VTS_01_1.VOB
-r--r--r-- 1 4294967295 4294967295 1073565696 2009-09-30 18:43 VTS_01_2.VOB
-r--r--r-- 1 4294967295 4294967295 1073565696 2009-09-30 18:45 VTS_01_3.VOB
-r--r--r-- 1 4294967295 4294967295  970516480 2009-09-30 18:45 VTS_01_4.VOB
So, I created following script to help me with it:
#!/bin/sh -x

input="`ls mnt/VIDEO_TS/VTS_01_[1234].VOB | sed 's/^/-i /'`"

out_flv="lecture.flv"

format="-ab 48k -ar 44100 -vcodec flv -b 400k -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4 -trellis 1 -deinterlace"

ffmpeg $input $limit -pass 1 $format -y $out_flv || exit
ffmpeg $input $limit -pass 2 $format -y $out_flv || exit
It does two pass encoding, preserving most of audio fidelity while creating stream which takes about 50Kb/s to stream smoothly. You will notice that I didn't encode VTS_01_0.VOB which isn't really a just a subtitle stub:
$ ffplay mnt/VIDEO_TS/VTS_01_0.VOB
Input #0, mpeg, from 'mnt/VIDEO_TS/VTS_01_0.VOB':
  Duration: N/A, start: 0.360000, bitrate: N/A
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 7000 kb/s, 25 
    Stream #0.1[0x20]: Subtitle: dvdsub

If you are recoding and editing video which will later be on Internet, please don't use fancy transitions. There is no hope for those to look good after re-encoding. This video had 3D box rotating effect (although simple fade would be enough) which turned into ugly blur, but other than that, it's perfectly readable.

I have been watching videos from linux.conf.au 2009 and stumbled upon Conrad Parker's Ogg Chopping: techniques for programming correctness and efficiency which is great lecture if you want to know something about current state of video on the web, Ogg or Haskell.

I have been thinking about poor state of Linux video for quite some time (bear in mind that I do have real-life experience with U-matic type equipment) but it seems that things are moving in right direction. Here is a quick comilation of useful links from this presentation:

This is very cool! Only problem for me right now is that server side is written in python with which I haven't have good experience (it's just my bias). But, than again Pad.ma JavaScript API seems easy enough to roll out own server implementation if I find time to play with it.

Update: Are we there yet?

After a bit more of watching, I also stumbled upon Collaborative Video for Wikipedia by Michael Dale which introduces following tools related to video editing:

  • Mv_Embed allows support of browsers without <video> tag with annotation editor
  • MetaVidWiki offers another interface, but I couldn't find any good demo to link from here

I'm preparing walk-through screencasts for workshop about virtualization so I needed easy way to produce console screencasts.

First, I found TTYShare which displays ttyrec files using flash, but I really wanted to copy/paste parts of commands and disliked flash plugin requirement.

It seems that I wasn't only one who wanted JavaScript client for ttyrec. jsttplay can produce screencasts like this one about OpenVZ using plain copy/paste friendly JavaScript within browser.

But, for some parts (like Debian installation under VirtualBox) I really needed movie capture. x11grab option from ffmpeg seemed easy enough to use:

ffmpeg -f x11grab -s 640x480 -r 10 -i :0.0 /tmp/screencast.avi
but getting right window size isn't something I want to do by hand. So, I wrote small perl script record-screencast.pl which extract window position and size using xwininfo and pass it to ffmpeg so I don't have to.

Video editing under Linux

I wanted to edit some video for my local LUG. However, this doesn't seem to be simple task under Linux.

I have some background since I worked on local TV station from 1991-1995 among other things in video editing. So I do know semi-professional and professional video equipment from those days (hack, I was earning good buck with it!) and my judgment is somewhat biased towards ease of use and practical problems which I encountered during editing of professionally shot video material (I don't nearly have so steady hand, it seems).

I have video materials recorded with JVC Everio GZ-MG575E (There doesn't seem to be any good official JVC page about it. Go figure that!) Reposted by lsusb as:

Bus 005 Device 004: ID 04f1:0008 Victor Company of Japan, Ltd GZ-MG30AA/MC500E Digital Video Camera

Files from internal read-only vfat 40Gb disk are available when camera is mounted as USB device on Linux as sd_video/prg001/mov*.mod. File on one of files report MPEG sequence, v2, program multiplex.

Let's look at available options:

  1. Kino - Safe choice, right? Debian package, version 1.1.1.
    It can't import avi in original format. When I tried to convert it some other .avi format using ffmpeg it segfaulted on loading of that avi.
    It has somewhat home video look which I don't like.
  2. cinelera - GUI hurtes my eyes and distracts too much from video footage. I tried. I really tried. It didn't work for me.
  3. The Open Movie Editor can't be compiled from upstream repository. Looked somewhat promising up to that point...
  4. Avidemux - to be honest, I found this one while Googling for video editing on FreeBSD software section video. Good catch, I had Debian package version 2.3.0 available from www.debian-multimedia.org.
    Very nice tool, it fits my brain rather well. Well, I would have to remap keys because it's just half-usable on notebook keyboard (no numeric keymap, allthough I might buy USB one just for this application :-)
  5. pitivi able to import avi, but blocked after a few clicks and stopped refreshing screen. It's interesting to note that clips which where loaded into avidemux had little picture from movie, while the ones which weren't loaded didn't.
  6. LiVES - last time I tried to find video editing software, LiVES turned out as only software which worked at all. Still, strange intraface, in part Gtk based, and in part just ugly doesn't sit well with me.
  7. Kdenlive is another project which is well worth a look. Clean QT interface, all the options I would like, want or need.
    Just two problems: I don't hear any audio. I do get blink sound from KDE, but not from video sound. Another problem is related to by attempts to solve previous one: upstream Subversion repository source code doesn't pass configure on my machine. Yikes.
    Update: My problems with audio are solved after I insalled sdl-alsa variant (instead of old alsa-oss, my fault). It's quite capable software, my only remaining gripe is that every action has a click or two indirection until you can have it done. Other than that I have problems with audio-video sync when producing any format other than mpeg (which is same as my source format), but I don't care much about that, because I intend to do recoding as final step into multiple formats anyway...