[vlc-devel] Project: Video Barcodes for VLC
Sebastian Morr
sebastian at morr.cc
Wed Feb 6 16:03:12 CET 2013
Hi, developers of my favourite media player!
Have you seen video barcodes? http://moviebarcode.tumblr.com/
I'd like to build a navigation method for VLC that uses those barcodes
as a seek slider. The first prototype is promising:
http://files.morr.cc/prototype.png
Currently, it displays an externally-generated image (see shell script
below). Next step is to generate it inside VLC - I stumbled around in
the source for a few days now, but I got lost. I kindly ask for a few
pointers:
- Where to put the functionality of barcode-generation? Where does it
belong, logically? Is it a filter module or something else? I'm
starting with the Qt GUI, as it's the one I use daily, but others
could follow.
- Can you recommend an (image-holding) data structure that allows easy
conversion to the different GUIs?
- I need to access the currently open video at arbitrary positions (I'm
thinking of building the barcode non-sequentially like an interlaced
GIF). Which modules would I need to do this and how are they related?
Is there any documentation on the data flow through VLC?
Please Cc me in responses, as I'm not subscribed to the mailing list. Yet.
Thanks,
Sebastian
Here's the script I'm currently using to generate the barcodes (does the
list allow attachments?) - it requires ffmpeg and graphicsmagick and is
codenamed "foocode" ;)
#!/bin/sh
WIDTH=1280
HEIGHT=480
INFILE=$1
OUTFILE=$(basename "$INFILE").png
TMPDIR=/tmp/foocode
rm -rf "$TMPDIR"
mkdir -p "$TMPDIR"
SECONDS=$(ffprobe -show_format "$INFILE" 2>&1 | grep duration | cut -f2 -d= | cut -f1 -d.)
SECONDS_PER_FRAME=$(echo "$SECONDS/$WIDTH" | bc -l)
ffmpeg -threads auto -i "$INFILE" -an -vf "fps=fps=1/$SECONDS_PER_FRAME, scale=20:ih" "$TMPDIR"/frame%8d.jpg
gm mogrify -resize "1x$HEIGHT!" "$TMPDIR"/*
gm convert "$TMPDIR"/* +append "$OUTFILE"
gm mogrify -resize "$WIDTH!x$HEIGHT!" "$OUTFILE"
More information about the vlc-devel
mailing list