! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Video thumbnail support
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Tumbler
Component:
General

Comments

Description Lionel Le Folgoc 2010-03-05 23:38:36 CET
Created attachment 2874 
proposed patch

Hi,

I implemented a video thumbnailer for tumbler using libffmpegthumbnailer (<http://code.google.com/p/ffmpegthumbnailer/>). Ffmpegthumbnailer binary is used by thunar-thumbnailers, so I thought it might be a good idea to use its lib for tumbler.

The patch is against git master, and I tested it with tumbler 0.1.1, and it worked fine here (root & removable drives).

It can surely still be improved:
 * it's the first time I use gobjects/gio, so I probably over complicated myself, or made basic mistakes ;)
 * supported mimetypes are hardcoded (taken from thunar-thumbnailers). I couldn't figure out an easy way to get them manually, except testing "video/*" with g_content_type_is_a () on all types returned by g_content_types_get_registered (), which seems to be overkill;
 * libffmpegthumbnailer doesn't support uris (with special characters encoded), so I had to convert them to a path with g_file_get_path (), so I don't know if it works on network/special filesystems (but I'm not sure either it's an issue);
 * probably other problems I missed...

Thanks!
Comment 1 Lionel Le Folgoc 2010-03-05 23:42:13 CET
Ah, and the namespace chosen can probably be improved... (I wanted to use video_thumbnailer instead of ffmpeg_thumbnailer, but libffmpegthumbnailer API defines video_thumbnailer_create () and video_thumbnailer_destroy (), which would have created name conflicts otherwise...)
Comment 2 Jannis Pohlmann editbugs 2010-07-16 10:18:20 CEST
Great work! I'll be testing the patch in a few minutes. One thing I wonder is: can we somehow detect supported video types/formats at runtime instead of hardcoding them?
Comment 3 Jannis Pohlmann editbugs 2010-07-16 10:33:29 CEST
I just committed the patch:

commit 2621ee8d1db623ef28f8b4aabd7fb246f9e8991e
Author: Lionel Le Folgoc <mrpouit@ubuntu.com>
Date:   Sat Mar 6 00:21:47 2010 +0100

    Add a video thumbnailer (using libffmpegthumbnailer).
    
    Signed-off-by: Jannis Pohlmann <jannis@xfce.org>

Bug #6284

Reported by:
Lionel Le Folgoc
Reported on: 2010-03-05
Last modified on: 2010-07-16

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
unspecified

Attachments

proposed patch (28.49 KB, patch)
2010-03-05 23:38 CET , Lionel Le Folgoc
no flags

Additional information