Bug#448072: Video thumbnailing should not rely on a particular media player

2008-09-22 Thread Josselin Mouette
Le dimanche 21 septembre 2008 à 19:09 +0200, Reinhard Tartler a écrit :
 reassign 448072 nautilus
 stop
 
 Josselin Mouette [EMAIL PROTECTED] writes:
 
  this sounds like a cool idea, but if it requires ffmpeg for running, it
  sounds like it should be contained in the ffmpeg package.
 
 It would only be used by nautilus, so it should be in that package.
 
 I'd suggest to modify it to not depend on ffmpeg but behave in a sane
 way if ffmpeg is not available.
 
 If you insist having it in ffmpeg, please try to convince upstream to
 include it.

Nautilus only provides a way for programs to register thumbnailers for
some MIME types. I don’t consider its job to set these handlers,
especially when it is not possible to know whether the handler will
actually work or not. Just like application handlers, thumbnailers must
be registered by the software providing it.

Currently, the thumbnailers are registered by totem-common, using an
alternative named gnome-video-thumbnailer. It is not such good thing to
use an alternative since the list of supported MIME types depends on the
implementation, but this is the only way to have it configurable.

If we really want to be able to use ffmpeg as the thumbnailer, we need
to do the following:
  * study the list of supported MIME types, to know if a single
alternative is enough;
  * put the common files (picture border and schemas registration)
in a new package;
  * have each implementation register the gnome-video-thumbnailer
alternative.

Frankly, I’m not interested enough. We currently have a working solution
in GNOME, and if people really want to install a thumbnailer for videos
without actually installing a video player (!), we can let them
configure their systems as they wish.

Cheers,
-- 
 .''`.
: :' :  We are debian.org. Lower your prices, surrender your code.
`. `'   We will add your hardware and software distinctiveness to
  `-our own. Resistance is futile.


signature.asc
Description: Ceci est une partie de message	numériquement signée


Bug#448072: Video thumbnailing should not rely on a particular media player

2008-09-21 Thread Reinhard Tartler
reassign 448072 nautilus
stop

Josselin Mouette [EMAIL PROTECTED] writes:

 this sounds like a cool idea, but if it requires ffmpeg for running, it
 sounds like it should be contained in the ffmpeg package.

It would only be used by nautilus, so it should be in that package.

I'd suggest to modify it to not depend on ffmpeg but behave in a sane
way if ffmpeg is not available.

If you insist having it in ffmpeg, please try to convince upstream to
include it.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#448072: Video thumbnailing should not rely on a particular media player

2007-10-26 Thread Josselin Mouette
reassign 448072 ffmpeg
thanks

Le jeudi 25 octobre 2007 à 21:39 +0200, Jean-Michel Philippe a écrit :
 Package: nautilus
 Version: 2.14.3-11+b1
 Severity: wishlist
 Tags: patch
 
 In nautilus video thumbnails are only displayed if the user has totem
 installed. If for any reason this not the case (maybe he prefers another
 media player?), he may have not installed or uninstalled totem.
 Therefore video thumbnailing in nautilus should rather rely on a small
 library, eg. ffmpeg. This is what I did on my system. I wrote a small
 Python script in replacement of “totem-video-thumbnailer” and declared
 it as a new “gnome-video-thumbnailer” alternative.

Hi,

this sounds like a cool idea, but if it requires ffmpeg for running, it
sounds like it should be contained in the ffmpeg package.

Reassigning.
-- 
 .''`.   Josselin Mouette/\./\
: :' :   [EMAIL PROTECTED]
`. `'[EMAIL PROTECTED]
  `-  Debian GNU/Linux -- The power of freedom


signature.asc
Description: Ceci est une partie de message	numériquement signée


Bug#448072: Video thumbnailing should not rely on a particular media player

2007-10-26 Thread Jean-Michel PHILIPPE
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


 this sounds like a cool idea, but if it requires ffmpeg for running, it
 sounds like it should be contained in the ffmpeg package.

 Reassigning.
Indeed I posted this idea for Nautilus because I consider that showing
video thumbnails could be the default Nautilus behaviour. I've always
been thinking this was a lacking feature until I figured out why video
thumbnails were not displayed. Nowadays there is no reason to show
photo thumbnails out of the box but not video ones!

JM. Philippe
*
*
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHIkZPn8dRVBZY2OsRAkl/AJwMBjTtA5TgfYLkzWiyhP5bW8ArLgCeNfQd
Tenh5mm6j8kK6bm6qTi7p5Q=
=XFxD
-END PGP SIGNATURE-




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#448072: Video thumbnailing should not rely on a particular media player

2007-10-25 Thread Jean-Michel Philippe
Package: nautilus
Version: 2.14.3-11+b1
Severity: wishlist
Tags: patch

In nautilus video thumbnails are only displayed if the user has totem
installed. If for any reason this not the case (maybe he prefers another
media player?), he may have not installed or uninstalled totem.
Therefore video thumbnailing in nautilus should rather rely on a small
library, eg. ffmpeg. This is what I did on my system. I wrote a small
Python script in replacement of “totem-video-thumbnailer” and declared
it as a new “gnome-video-thumbnailer” alternative.

=== code of “ffmpeg-video-thumbnailer” =

#!/usr/bin/env python
#
# Ffmpeg video thumbnailer
#  generates a thumbnail from a video file
#
# requires ffmpeg, imagemagick and filmholes.png from totem
#
# Use:
#   ffmpeg-video-thumbnailer [-s geometry] input output
#
# geometry  = thumbnail geometry, eg. 128 or 128x96
# input = video file name
# output= thumbnail file name
#
# Author: JM. Philippe - http://philipjm.free.fr/blog/
# Public domain

import sys, os, re, commands, urllib

# the ffmpeg command to be executed (extracts 1st video image)
FfmpegCmd = ffmpeg -i '%s' -vcodec png -vframes 1 -s %s -f rawvideo -y
'%s'

# the imagemagick command (composes images)
MagickCmd = composite -compose atop -geometry %s %s %s %s

# film holes to be overlaid (from totem install)
FilmHoles = '/usr/share/totem/filmholes.png'
HoleHeight = 35 # film holes image dimensions
#HoleWidth = 9

##
##
def dims(FileName):

gets video dimensions

Result = commands.getoutput(ffmpeg -i '%s' % FileName)
Orient = re.findall(r'(\d+)x(\d+)', Result)
if len(Orient):
return map(int, Orient[0])
else:
return 0, 0

##
##
def film_holes(FileName, Height):

adds film holes on the left side

Start = 0
while Start  Height:   # repeat pattern vertically
Position = '+%d+%d' % (0, Start)
commands.getoutput(MagickCmd % (Position, FilmHoles, FileName, 
FileName))
Start += HoleHeight

##
# get parameters
if sys.argv[1] == -s:
ThumbSize, Input, Output = sys.argv[2:5]
else:
ThumbSize = 128
Input, Output = sys.argv[1:3]

##
# URL's to pathnames
Input = urllib.url2pathname(Input.replace('file://', ''))
Output = urllib.url2pathname(Output.replace('file://', ''))

##
# thumbnail size
if 'x' not in ThumbSize:
ImgWidth, ImgHeight = dims(Input)
ThumbWidth = int(ThumbSize)
if ImgWidth = ImgHeight:
ThumbHeight = ThumbWidth * ImgHeight / ImgWidth
else:
ThumbHeight = ThumbWidth
ThumbWidth = ThumbHeight * ImgWidth / ImgHeight
ThumbSize = '%dx%d' % (ThumbWidth, ThumbHeight)

##
# make thumbnail
Result = commands.getoutput(FfmpegCmd % (Input, ThumbSize, Output))
film_holes(Output, ThumbHeight)
commands.getoutput(mogrify -flop  + Output)   # flip left to right
film_holes(Output, ThumbHeight)
commands.getoutput(mogrify -flop  + Output)

=== end of script 

Caveats:
* doesn't understand gnome URI's (video files are assumed to be local)
* uses the film hole image of totem, “/usr/share/totem/filmholes.png”
* uses ImageMagick to overlay the film hole image over the thumbnail
  (should use a much smaller library)

So I don't think my script is sufficient but I made it to check that
there was another way to do this.

Regards,

JM. Philippe

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages nautilus depends on:
ii  desktop-file-utils 0.11-1Utilities for .desktop files
ii  gnome-control-center   1:2.14.2-7utilities to configure the GNOME d
ii  libart-2.0-2   2.3.17-1  Library of functions for 2D graphi
ii  libatk1.0-01.12.4-3  The ATK accessibility toolkit
ii  libbonobo2-0   2.14.0-3  Bonobo CORBA interfaces library
ii  libc6  2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii  libeel2-2.14   2.14.3-5  Eazel Extensions Library (for GNOM
ii  libesd-alsa0 [libesd0] 0.2.36-3  Enlightened Sound Daemon (ALSA) - 
ii  libexif12  0.6.13-5etch1 library to parse EXIF files
ii  libgail-common 1.8.11-4  GNOME Accessibility Implementation
ii  libgail17  1.8.11-4  GNOME Accessibility Implementation
ii  libgconf2-42.16.1-1  GNOME configuration database syste
ii  libglade2-01:2.6.0-4 library to load .glade files at ru
ii  libglib2.0-0   2.12.4-2  The GLib