After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 134366 - Launch Videos with External Viewer
Launch Videos with External Viewer
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.9.x
Other Linux
: Normal enhancement
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
: 326057 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-14 08:19 UTC by Ryan Hayle
Modified: 2007-02-21 18:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Ryan Hayle 2004-02-14 08:19:46 UTC
It would be nice to see videos in the thumbnail view.  Nautilus can make
thumbnails of these files--not sure how difficult adding it would be--but
merely displaying an icon would be fine.  I wouldn't expect gThumb to
actually play them, but launching them to the default gnome viewer would be
great.

When I take short movies with my camera, I'd like it all to remain one
distinct collection (pics, movies, sound), especially when I burn to CD or
make a web photo album.

Thank you!
Comment 1 lsof 2004-03-03 19:13:33 UTC
This would be great. Even if it just showed the first frame for now,
it'd help a lot.

I'd vote for this if I could!
Comment 2 Kehan Harman 2004-06-02 15:42:00 UTC
I was just thinking of the same thing, although also worry about the kitchen 
sink mentality.
Comment 3 Ryan Hayle 2004-06-02 18:37:56 UTC
I don't believe this would be a case of bloat at all.  Simply launching an
external viewer ads very little code.  Grabbing the thumbnails is likely more
involved, but since it's already a function of Nautilus might not be that bad. 
As I said, the program doesn't need to play them internally (though even this
needn't add much with bonobo/totem or something).
Comment 4 Frederic Parrenin 2007-01-22 11:26:24 UTC
I also vote for this one.
With recent cameras, photos and videos are all mixed in one collection.
Being able to see a thumbnail of the videos, or (better) being able to play them would be really neat.
Comment 5 Michael Chudobiak 2007-01-22 12:41:34 UTC
Patches welcome!

I want to look at this some day, but I'm working on other bugs right now (VFS support, RAW support, etc).

It "shouldn't be too hard" to add this feature. I'd be happy to look at any patches that are submitted...

- Mike
Comment 6 Bastien Nocera 2007-01-22 13:39:25 UTC
There's code to open with the default movie player in totem/browser-plugin/totem-plugin-viewer.c, that can just be cut'n'pasted.
Comment 7 Michael Chudobiak 2007-01-22 14:12:50 UTC
Thanks, Bastien, I'll look at that.

What actually stopped me last time I looked at this was figuring out what prevented AVI files from being shown in the file listings in gthumb. 

Paolo, any hints on that? What is performing the file-type-filtering?

- Mike
Comment 8 Paolo Bacchilega 2007-01-22 19:15:12 UTC
the filter is performed by load_new_list in libgthumb/gth-file-list.c 
Comment 9 Michael Chudobiak 2007-01-22 20:27:19 UTC
Thanks, I'll look at adding this to the vfs-testing branch.

Is there a gnomish way to generate a thumbnail (i.e. the first frame) of a video? I'm sure something can be done with mencoder or other tools...

- Mike
Comment 10 Michael Chudobiak 2007-01-22 20:39:11 UTC
Never mind. I just found totem-video-thumbnailer.

- Mike
Comment 11 Bastien Nocera 2007-01-22 21:51:08 UTC
Use GnomeThumbnail and the GnomeThumbnailFactory.
See http://developer.gnome.org/doc/API/2.0/libgnomeui/libgnomeui-GnomeThumbnail.html
Comment 12 Bastien Nocera 2007-01-22 21:53:55 UTC
(In reply to comment #10)
> Never mind. I just found totem-video-thumbnailer.

You shouldn't use it directly. GnomeThumbnail will take care of figuring out which items need to be thumbnailed, depending on mime-type.
Comment 13 Michael Chudobiak 2007-01-23 03:12:20 UTC
Paolo,

I've committed a new revision to vfs-testing that adds video thumbnailing and playback. It's pretty rough, but it does work (even over VFS!).

The thumbnailing works, although my mime-checking routines are inefficient (file_is_image, file_is_video) - I can fix that.

The tricky part for me is launching the external video viewer. I've written it so that if there are any video files in the listed of selected thumbnails, the list of video files is dumped to totem (to play sequentially). I don't know if you'll like that. The list of files could contain a variety of video mimetypes (in theory), so dumping the list to totem and letting totem figure everything out is appealing. I don't know if there is a better (less hard-coded) way of calling a default video viewer to show a variety of videos (of different types) in sequence. It's probably beyond my coding ability.

Anyway... change whatever you like...

- Mike
Comment 14 Michael Chudobiak 2007-01-23 03:15:37 UTC
I just noticed that clicking in a browser view works to launch the video(s), but using prev/next in the image view mode doesn't. I'll have to look at that... like I said, it's still pretty rough.

- Mike
Comment 15 Michael Chudobiak 2007-01-23 14:00:36 UTC
I've tweaked the code to show a video thumbnail in both the browser and viewer modes. Pressing "enter" will launch totem in either mode. (You can only get to the viewer mode thumbnail by launching viewer mode with an image, then using next/prev to get to the video).

I'm having one problem: in the viewer mode, I try to load an existing video thumbnail using gnome_thumbnail_factory_lookup (at line 625 of image-loader.c in the vfs-testing branch), but this is always returning NULL, forcing a re-creation of the thumbnail (which is slow). What am I doing wrong? There is an existing thumbnail in .thumbnails.

- Mike


Comment 16 Michael Chudobiak 2007-01-23 15:43:57 UTC
I figured out my thumbnailing problem - different thumbnail sizing.

- Mike
Comment 17 Michael Chudobiak 2007-02-08 00:41:59 UTC
Initial support for viewing videos (using totem) is present in svn trunk now.

- Mike
Comment 18 Frederic Parrenin 2007-02-08 10:20:35 UTC
Wonderful, thank you very much! :-)
Comment 19 Michael Chudobiak 2007-02-16 16:09:39 UTC
*** Bug 326057 has been marked as a duplicate of this bug. ***
Comment 20 Michael Chudobiak 2007-02-21 14:49:39 UTC
Paolo,

You've modified the player launch code to use default players, which is good, but we've lost the ability to play more than one video file in sequence. That's a feature I like (well, my kids like it...)

Do you think it would be a good idea to check the application that the "current" video needs, and play all selected items that need the same application? I can code that in if you don't oppose it.

- Mike
Comment 21 Michael Chudobiak 2007-02-21 18:10:34 UTC
Well, I've gone ahead and added that. Works nicely.

- Mike