[v0.4.1]video4fuze [Outdated]

This post is outdated. It has been continued here

Based on ewelot’s findings on this thread, I’ve done a little GUI app. which will let you convert your videos to a format readable by our beloved fuze.

You can download it here

It has support for a wide range of video formats (the same as mencoder, as it uses mencoder as a backend) and should work on all *nix  systems (you’ll need wine installed) and windows.

It also includes a command-line version wich can come in handy for scripting.

The universal tar.bz2 archive requires python, mencoder, ffmpeg, PyQt4, PIL and on *nix wine

Please, let me know if it works on any non-Debian sid non-Windows XP SP3 system (the only ones i’ve tested so far).

Features

* .pla playlist creation and edition for MSC mode! ATM it’s a basic implementantion, but I might polish it a bit. These playlists can have files from both the internal memory and the µSD. Thanks to Dunny for providing me with all the information I needed about the .pla/.pla.refs file format :wink:

* Video batch conversion capability, with advanced customizable options, and video thumbnail generation (.thm file) and huge input format support

* Image batch conversion & resizing, in order to be displayable and fit the fuze’s screen size, with huge input format support

* Fully translated into 3 languages (english, spanish, catalan). If you would like your language supported, read the end of the post

* Crossplatform: works on all major platforms, taking native look and feel ( I don’t have a mac, so it’s not tested on macosx, but it should work. Also, it won’t take macosx’s look and feel if you use qt4-x11(fink, darwinports) instead of qt4-mac)

* It’s free as in free beer and as in free speech.

Changelog:

 –0.4.1–
* Updated copyright and license information in main script
* Bugfix: mencoder changing path work-arounded by creating a windows installer (Yes! I finally did it)
* Bugfix: Now unicode paths work on all platforms!
* Bugfix: Video thumbnails are now generatod for files with whitespace in its name
* Bugfix: Strange selection behaviour in playlist mode
* Bugfix: Now it displays thumbnails correctly

–v0.4–
* Added playlist creation and edition capibilities. The playlists creted with v4f can have files from both internal memory and µSD card. Only tested in MSC.
* Added image preview in image conversion
* Some UI redesign.
–v0.3–
* Now it makes .thm thumbnails of videos while converting (which adds a dependency on ffmpeg)
* Bugfix: working directory permissions, fix adapted from the one supplied by srtuct in the sansa forums. Only affects the .deb package (and converted packages).
* Updated .deb depencies in order to make it installable with the relatively new “wine-unstable” sid package.
* Some little changes in unicode string handling, hoping they would solve some problems, but without any effect so far.
* This version won’t load settings from previous versions.
–v0.2.1–
* Bugfix: Now supports utf-8 paths in *nix (not on windows for some weird reason)
* Bugfix: Now it refreshes correctly the output path.
* Bugfix: Fixed whitespace basename error (you couldn’t convert files with whitespace in their name)
–v0.2–
* mencoder command line no more hard-coded: you can now set it in advanced>preferences
* Major restructuration of code in fuze.py
* Changed default mencoder options, using the last suggested by ewelot
* Now it also supports image conversion!
–v0.1–
* First public release

-Known issues:

* In order to run video4fuze in vista and windows server 2008, you need to run it under Windows XP SP2 compatibility mode (this is a bug in avi-mux GUI that prevents it from launching in systems newer than windows server 2003). I guess you’ll have to use itunder XP mode in Windows 7

 You can convert images while converting videos, as the video conversion will only gray out the “Video” tab. I comment this because it may not be obvious if you don’t know it…

Planned features:

 More advanced playlist editing. Maybe ordering by tags and so on. It will add dependencies, though.

Every feedback is also welcomed

If you want it translated into your language and would like to help translate it, just tell me, it’s a very very easy process! :slight_smile:

Message Edited by ssorgatem on 09-15-2009 02:45 PM

Message Edited by ssorgatem on 03-05-2010 06:19 PM

Message Edited by ssorgatem on 03-07-2010 05:31 AM

Excellent work!  I converted a 2 hr, 699MB m4v file - it took roughly 45 minutes (I didn’t think to check, so that’s an estimation).  Dragged the resulting avi file (628MB) onto the Fuze, and it plays fine, and not a single audio sync problem to be found.  I will say that I would prefer the option to letterbox (yes, even on a screen so small - I don’t like the “squeeze” vision! :wink:).  Fantastic solution to a frustrating problem - major props to you, ewelot, and anyone else who helped with the information to come up with this!

Message Edited by porkapalooza on 08-18-2009 11:05 AM

@ssorgatem wrote:
The GUI will have native look & feel

 

The windows version requires windows XP or higher with vcredist2008 installed.

Can you post any screen shots?

Also, what is vcredist2008 and why is it needed?

Thx.

vcredist2008 is the “Microsoft’s Visual C++ 2008 Redistributable package”. I think you can get it from microsoft update or whatever it’s called. It’s needed

Screenshots:

(That’s on my kde 4.3 on debian sid with QtCurve Qt4 style, with catalan locale)

(Here it’s under windows XP SP3 with microsoft’s Luna Noir theme, with spanish locale)

Just tried to start video4fuze under debian lenny. This is what I got:

jba@lisa:/usr/src/video/fuze/video4fuze\_0.1$ python video4fuze.pyw Traceback (most recent call last): File "video4fuze.pyw", line 17, in \<module\> VentanaP = MainWindow() File "/usr/src/video/fuze/video4fuze\_0.1/GUI/MainWindow.py", line 22, in \_\_init\_\_ self.tableWidget.horizontalHeader().setResizeMode(3) TypeError: insufficient number of arguments to QHeaderView.setResizeMode()

Whats the problem?

Another question is where to put the files for permanent installation?

struct

@struct wrote:

Just tried to start video4fuze under debian lenny. This is what I got:

 

jba@lisa:/usr/src/video/fuze/video4fuze_0.1$ python video4fuze.pyw
Traceback (most recent call last):
File “video4fuze.pyw”, line 17, in <module>
VentanaP = MainWindow()
File “/usr/src/video/fuze/video4fuze_0.1/GUI/MainWindow.py”, line 22, in __init__
self.tableWidget.horizontalHeader().setResizeMode(3)
TypeError: insufficient number of arguments to QHeaderView.setResizeMode()

 

Whats the problem?

 

Another question is where to put the files for permanent installation?

 

struct

 Well, it seems you don’t have a suffciently new PyQt4 version. In order to make it work, just comment  the problematic line (although that could lead to unpretty table display) or upgrade yout python-qt4 and qt4 packages…

I’m usingPyQt4 from the debian package python-qt4 4.5.1-1.1, which I don’t know exactly in which branch is, because my system is a pretty mix of testing sid and experimental :slight_smile:

For permanent installation… hum, put it anywhere and make a .desktop file pointing to video4fuze.pyw, or a one-liner shell script in your path to load it, something like:

#!/bin/sh  
python /path/to/video4fuze/video4fuze.pyw

 EDIT: You could try latest subversion from googlecode, with it it *should* start without complaining… too much, at least.

Message Edited by ssorgatem on 08-18-2009 02:23 PM

Tested on Ubuntu Jaunty with two videos of around 30 minutes. Works great - no problems with audio/video sync and seeking is fine. Thanks a lot to ssorgatem and ewelot!

This is really quite impressive. I’ll be giving this a try when I get home from work. :slight_smile:

Hey,im having some trouble.Can someone instruct me on how to install this?Im Running Windows XP Sp2.

THE FUZE TOOK A GREAT LEAP FORWARD THANKS TO SSORGATEM AND EWELOT. 

Thank you, this is very useful.  It’s encouraging to see that video conversion is possible without running Windows and SMC.  I tried video4fuze both GUI and script on Debian Squeeze/Sid and it works really well.   The only difficulty is that aspect ratio is not preserved, which I think is not so easy to do with mencoder as with ffmpeg (unless playback will be on mplayer and then autoaspect can be used with mpeg4 encoder).  Have you any thoughts/plans about implementing a way to preserve aspect ratio?

In the upcoming version 0.2 you can use you’re own mencoder options (with the GUI, still not from the command line, because I don’t see very urgent and it’s boring to implement :)). I think that preserving the aspect ratio is only a matter of finding the appropiate options to pass to mencoder. Just check it out from subversion if you wish to try it (assuming that not everything you’ll see in the GUI will work, it’s in subversion because it’s still a work in progress ;))

About installation instructions: simply unpack the archive and then execute video4fuze.exe or video4fuze.pyw, depending on the version you downloaded. Keep in mind that you have to have the MS Visual C++ 2008 resdistributable package (vcredist2008.exe) installed.

If you are trying to run the “universal” version (in windows or or on a Real OS), you need python >= 2.5 and PyQt4 >= 4.5 installed for your version of python.

Message Edited by ssorgatem on 08-19-2009 09:58 AM

@takla,

aspect ratio can be preserved. It is even simpler to achieve in mencoder than with ffmpeg, imho. See this post for reference. I don’t know if these improvements to my suggested video conversion procedure are in video4fuze already. You could even convert from anamorphic 16:9 video source by simply adding “-aspect 16:9” to the given mencoder command line examples.

@ssorgatem,

thanks for coming up with video4fuze !!! It looks promising and certainly can help to attract more (Windows-) users.

I think it is a good idea to give the user a chance to edit the mencoder commands to suit special needs - like the aspect issue.

Thanks, is a lot easier!!

I am using windows 7 RC and was wondering if you knew of an easy way to put vob files on the fuze using your application?

Thanks for the help.

@mh7301 wrote:

Thanks, is a lot easier!!

 

I am using windows 7 RC and was wondering if you knew of an easy way to put vob files on the fuze using your application?

 

Thanks for the help.

In version 0.2 you can use custom mencoder command line. Find out how to do that with mencoder, and then just tell video4fuze what to tell to do to mencoder :slight_smile:

Then, it works too on Windows 7? I love PyQt :slight_smile:

PD: For all those debian-based distro users, i’m building a .deb package right now :slight_smile:

bug report:

i’m using v0.2 for windoze. if the filename contains spaces, error will return.

edit:

fixed with v.21

Message Edited by marqck on 08-21-2009 06:19 AM

@marqck wrote:

bug report:

 

i’m using v0.2 for windoze. if the filename contains spaces, error will return.

  

Message Edited by marqck on 08-20-2009 08:03 AM

Humm strange. I’ve tested it with filenames with whitespaces with no problems… What’s the exact error it tells to you? Are you trying to conver a file in the same drive as video4fuze? does it happen if using the command-line fuze.exe? Does it happen converting images?
Could you start it from a cmd window and paste it’s output?

@ssorgatem wrote:


@struct wrote:

Just tried to start video4fuze under debian lenny. This is what I got:

 

jba@lisa:/usr/src/video/fuze/video4fuze_0.1$ python video4fuze.pyw
Traceback (most recent call last):
File “video4fuze.pyw”, line 17, in <module>
VentanaP = MainWindow()
File “/usr/src/video/fuze/video4fuze_0.1/GUI/MainWindow.py”, line 22, in __init__
self.tableWidget.horizontalHeader().setResizeMode(3)
TypeError: insufficient number of arguments to QHeaderView.setResizeMode()

 

Whats the problem?

 

Another question is where to put the files for permanent installation?

 

struct


 

 

 

 Well, it seems you don’t have a suffciently new PyQt4 version. In order to make it work, just comment  the problematic line (although that could lead to unpretty table display) or upgrade yout python-qt4 and qt4 packages…

I’m usingPyQt4 from the debian package python-qt4 4.5.1-1.1, which I don’t know exactly in which branch is, because my system is a pretty mix of testing sid and experimental :slight_smile:

 

Debian lenny has only python-qt4 4.4.2-4 and I really dont like backports unless I really need them. So I put a comment # before that line and now it works.

struct

@struct wrote:


@ssorgatem wrote:


@struct wrote:

Just tried to start video4fuze under debian lenny. This is what I got:

 

jba@lisa:/usr/src/video/fuze/video4fuze_0.1$ python video4fuze.pyw
Traceback (most recent call last):
File “video4fuze.pyw”, line 17, in <module>
VentanaP = MainWindow()
File “/usr/src/video/fuze/video4fuze_0.1/GUI/MainWindow.py”, line 22, in __init__
self.tableWidget.horizontalHeader().setResizeMode(3)
TypeError: insufficient number of arguments to QHeaderView.setResizeMode()

 

Whats the problem?

 

Another question is where to put the files for permanent installation?

 

struct


 

 

 

 Well, it seems you don’t have a suffciently new PyQt4 version. In order to make it work, just comment  the problematic line (although that could lead to unpretty table display) or upgrade yout python-qt4 and qt4 packages…

I’m usingPyQt4 from the debian package python-qt4 4.5.1-1.1, which I don’t know exactly in which branch is, because my system is a pretty mix of testing sid and experimental :slight_smile:

 


Debian lenny has only python-qt4 4.4.2-4 and I really dont like backports unless I really need them. So I put a comment # before that line and now it works.

 

struct

I really suggest you use mencoder directly on your Debian box followed by AVI-Mux using wine. I believe this is a lot easier, as it even runs on an outdated Debian Etch and the last few Ubuntu releases without fiddling with backporting packages. If you like GUI wrappers around mencoder you could try kmenc15 or others_._

Please note that mencoder is by no means the only software for the video conversion part. Anything compliant to the Fuze video specifications will work if you add the proper OpenDML index afterwards (the AVI-Mux step).

Nevertheless the video4fuze is a very good alternative for those who like to see a crossplatform GUI version. Most notably Windows users should profit from this solution.

Message Edited by ewelot on 08-20-2009 10:30 AM

@struct wrote:

 Debian lenny has only python-qt4 4.4.2-4 and I really dont like backports unless I really need them. So I put a comment # before that line and now it works.

 

struct

Have you tried version 0.2? There it *should* start without having to edit any line. You even have a .deb available.

@ewelot: He could also use the commandline fuze.py :slight_smile: it definitively should not complain about outdated PyQt.

When I started video4fuze I didn’t thought it would have so many windows users. I just made it crossplatform because both python and Qt4 are, and because it’s cool to say it’s crossplatform :slight_smile:

Is Sansa Media Converter such a ■■■■? I haven’t even tested it xD. 

PD: Saturday i’m leaving for holidays and I won’t be back until 1rst september, So don’t expect me to answer any question in that period xD.

PD2: I’m open to feature requests or any other kind of suggestion, don’t be shy, guys :smiley:

used the GUI

the error appeared after clicking the ‘convert’ button

edit:

fixed with v0.21

Message Edited by marqck on 08-21-2009 06:19 AM