plugin to open videos

14 views
Skip to first unread message

Francois Chartier

unread,
Feb 25, 2012, 9:52:05 AM2/25/12
to jbr...@googlegroups.com
Hello to all,

I just wrote a plugin to open videos. If you have, like me, videos in you photo tree, associated with jpg thumbnails, this plugin will enable you to open them in a video player (totem, vlc, mplayer for now). If you select JPG pictures, it will try to find videos with the same name except the extension, and if you select a folder, it will look for videos in the folder.

Anyone care to try it ? there might be bugs, but it seems to work all right for me. Did not try it with windows, though.

Best regards,
François


__init__.py

Francois Chartier

unread,
Feb 25, 2012, 11:34:05 AM2/25/12
to jbr...@googlegroups.com
2nd version, without error when no video is found :)


2012/2/25 Francois Chartier <chartier...@gmail.com>
__init__.py

Gmail

unread,
Feb 29, 2012, 5:15:05 AM2/29/12
to jbr...@googlegroups.com
Hi,

Just some feed back.
I've had to read carefully your mail to figure out how it work.

I'm quiet a perfect beta-tester for you. I've got video in my photo tree
and I've indexed the directories in jBrout but they look "empty".

So I've wrote a little script to create thumbnail :

#!/bin/bash

VIDEO=$1
THUMB=`echo $1 | cut -d"." -f1 | sed s/$/.jpg/`

ffmpeg -itsoffset -4 -i $VIDEO -vcodec mjpeg -vframes 1 -an -f
rawvideo -s 320x240 $THUMB
jhead -mkexif $THUMB
jhead -rgt $THUMB
exiv2 -M "add Exif.Image.Make Ascii VideoThumbnail" $THUMB
jhead -dc $THUMB

Refresh my video directories, enabling your plugin and it works well !
Could you just add parole as a video player in your list ? or perhaps is
there a "default player" as for the default browser?

I'm under ArchLinux with Xfce as DE.

Le 25/02/2012 17:34, Francois Chartier a �crit :


> 2nd version, without error when no video is found :)
>
>
> 2012/2/25 Francois Chartier <chartier...@gmail.com

> <mailto:chartier...@gmail.com>>


>
> Hello to all,
>
> I just wrote a plugin to open videos. If you have, like me, videos
> in you photo tree, associated with jpg thumbnails, this plugin will
> enable you to open them in a video player (totem, vlc, mplayer for
> now). If you select JPG pictures, it will try to find videos with
> the same name except the extension, and if you select a folder, it
> will look for videos in the folder.
>
> Anyone care to try it ? there might be bugs, but it seems to work
> all right for me. Did not try it with windows, though.
>
> Best regards,

> Fran�ois

--
,,,
( �> enn...@laposte.net
( / ) Linux Registered User 328488
>||<

Gmail

unread,
Feb 29, 2012, 6:36:51 AM2/29/12
to jbr...@googlegroups.com
By the way, I've also got some sound taken with my camera.
You could handle them the same way than the video : a generic picture
(like the attached one)

I've modified your script to handle .wav too.
(well, .wav aren't video, that's not clean but it works)

Le 29/02/2012 11:15, Gmail a �crit :

audio.jpg

Francois Chartier

unread,
Mar 1, 2012, 3:54:45 PM3/1/12
to jbr...@googlegroups.com
Hi,

Thank you for your feedback. I'm glad to know that someone find it useful. But I guess the notion of "associated video" was only clear in my head :)
I should add some explanations in the doc.

As jbrout only manages photos so far, and pictures enable to include metadata, dates, comments, tags... I find it useful to manage videos through their thumbnails. Of course, it doesn't enable to move, rename, etc. videos from jbrout interface, since only the thumbnail would be moved (but I plan to try to do something about it when I have some time). 

I also have a script to create thumbnails using ffmpeg and exiv2 as you do. I can post it too if someone is interested, but some parts are a bit specific to my file tree.

I could add "parole" (never heard of it, though), but I guess you did it already. I have no idea about how to make it easy to choose the video player, or about a default player... if yo do...

I did not think about handling sound, but... why not :)

François
Reply all
Reply to author
Forward
0 new messages