Rockbox Technical Forums

Rockbox General => Announcements => Topic started by: Llorean on March 27, 2007, 04:07:32 PM

Title: Video Encoder Trial
Post by: Llorean on March 27, 2007, 04:07:32 PM
Linuxstb found what appears to be a very handy video encoder for Windows and Linux users, and I've created a list of presets for it for the various color Rockbox targets.

It's on the PluginMpegplayer wiki page, named "WinFF". I've included very, very, very basic instructions for use, because honestly it's not a terribly complex program (very point and click) and most of you should just need to select your player from the dropdown and convert.

I would like some feedback as to whether the files seem to play fullspeed, and whether the visual quality is where you'd like it. (If the visual quality is lower than you'd like, disable frame rate limiting, stop playback, and then re-run the file, and see what sort of FPS you get without it, compared to what the file's FPS is, to give me a small idea of if there's elbow room).

For those of you with Coldfire targets (H300, iAudio X5), there may be some current issues, with framerates (I have a 10fps test file that's playing at 15fps in Rockbox for some reason), but feedback on whether you feel this method is 'good enough' in terms of the process is still welcome.

As well, if you feel the instructions should be improved, feel free, or suggest here. I know I left them VERY scant, but 'eh, I'm lazy, and I'll improve them if it's needed. :)
Title: Re: Video Encoder Trial
Post by: Soader03 on March 27, 2007, 05:31:35 PM
I just tried this program and replaced the .xml file on the wiki and it doesn't work. It said that my video is corrupted or something like that but my video is fully fine.
Title: Re: Video Encoder Trial
Post by: Llorean on March 27, 2007, 07:56:54 PM
Okay, you know that we can't do anything to help without *actual* error messages.

What exactly does it say?
Title: Re: Video Encoder Trial
Post by: Mad Cow on March 27, 2007, 09:18:48 PM
I'm pretty sure this is a problem with ffmpeg, but it can't resample audio with more than 2 channels.
Title: Re: Video Encoder Trial
Post by: Llorean on March 27, 2007, 09:21:21 PM
Try adding
Code: [Select]
-ac 2 to the optional parameters and see if that makes it convert to 2 channels and then resample.
Title: Re: Video Encoder Trial
Post by: Mad Cow on March 27, 2007, 10:16:39 PM
That let it start encoding, I'll tell you if it encoded properly after it finishes.
Title: Re: Video Encoder Trial
Post by: Llorean on March 27, 2007, 10:18:00 PM
I'm not likely to add -ac 2 to the presets (wouldn't want to force mono files into stereo) but if it does we can make a note about it on the wiki page.

Oh, if you add
Code: [Select]
-fs 5000 you get an ~5,000 kilobyte (~5mb) file. This can be used to limit how much you encode when you just want to test if something works, but don't want to try it on a full file. Of course, tweak the size to taste, it should just encode the first X minutes of the file at the chosen settings until the output file reaches that size.
Title: Re: Video Encoder Trial
Post by: Mad Cow on March 27, 2007, 11:38:29 PM
Cool, could you post the other options?
Title: Re: Video Encoder Trial
Post by: Llorean on March 27, 2007, 11:44:06 PM
Here's the full list of options you can put in the advanced options box, I've attached it as a text file because there are a lot.

I can't promise which of these will or won't result in a working file, so tinker at your own risk. :)

[attachment deleted by admin for age]
Title: Re: Video Encoder Trial
Post by: soap on March 28, 2007, 06:43:21 AM
Every file I try to convert leads to the "Program Error" dialogue box that says:
"ffmpeg.exe has generated errors and will be closed by Windows.  You need to restart the program.  An error log is being created."

Though I can not find said error log.
Title: Re: Video Encoder Trial
Post by: Llorean on March 28, 2007, 06:49:44 AM
Hm. What edition of windows are you on?

You could try compiling (or finding a precompiled) ffmpeg.exe and ffplay.exe and replace the ones that come with WinFF with ones that actually work on your windows.
Title: Re: Video Encoder Trial
Post by: soap on March 28, 2007, 07:17:47 AM
I'm on Windows 2k.
I'm at work now, but when I get home, I'll do the magic "Fix Windows Problems" trick (reboot), and try again.
I was thinking about replacing ffmpeg.exe, but I didn't want to create a hard-to-troubleshoot situation where I was using different versions of the software than everyone else.

The first file I tried was XviD with AC3 audio, so I tried a second file with XviD and MP3 audio (but 1080 lines of resolution), I figured that too might be causing problems so I tried a third with a saner resolution and MP3 audio.
I guess I haven't tried any non-XviD sources, I will also try that when I get home.
Title: Re: Video Encoder Trial
Post by: Llorean on March 28, 2007, 07:24:56 AM
I've encoded XViD with AC3, DiVX with MP3, and a few others that I didn't pay attention to without problem.

I'd say first just try running ffmpeg.exe on its own, and see if it crashes, that'll tell you if it's hating your inputs, or it's hating itself. :)
Title: Re: Video Encoder Trial
Post by: soap on March 28, 2007, 09:11:21 PM
Rebooting Windows did not solve my problem.
I found this (http://ffdshow.faireal.net/mirror/ffmpeg/) page of ffmpeg windows precompiled SVN checkouts.
SVN r6830 and all previous builds work fine on my computer (though some older ones don't like newer XviD encodes).
SVN r7087 and all later builds crash with the same error I reported earlier.

I just bring this up since I consider the problem resolved well enough (I'll investigate more later, possibly.)
Title: Re: Video Encoder Trial
Post by: MU4L on March 29, 2007, 12:23:38 PM
Yep, I'm encountering a similar problem to soap, although it seems that mine is more hit and miss; that's to say that some files work (files recorded and re-sized via GigaPocket on my VAIO desktop), whilst the majority do not (DVD rips and files recorded by a newer DVB-T USB device).

I can upload a small file if necessary.

MU4L

P.S. I seem to be getting around 5-8FpS with yesterday's build (as opposed to the full 10FpS), although audio is playing full speed. I could also upload the test file if necessary.
Title: Re: Video Encoder Trial
Post by: iPodPhoto on April 03, 2007, 07:33:09 AM
well i was rather happy when i saw this because the mencoder way is a bit frusturating at times

i encoded a Divx AVI file and its was 1/2 the size of the one i made with mencoder (about 10mb off). But when i tried to play it on rockbox's mpegplayer the audio is really  out of sync

im not sure if this is just my iPod or an encoder problem
Title: Re: Video Encoder Trial
Post by: Llorean on April 03, 2007, 10:44:15 AM
Can you tell us more information? Which iPod, do you have frameskipping and limit frame rate both turned on, what build are you uisng, etc?
Title: Re: Video Encoder Trial
Post by: robin0800 on April 03, 2007, 04:39:22 PM
Any idea what the following means

Compiler did not align stack variables. Libavcodec has been misc
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers.
Title: Re: Video Encoder Trial
Post by: Llorean on April 03, 2007, 05:27:32 PM
It's not important in relation to using it for this. You can find a newer ffmpeg.exe if it bothers you. Use google and make sure the program works before replacing the old one.
Title: Re: Video Encoder Trial
Post by: iPodPhoto on April 03, 2007, 11:53:31 PM
Ok

File size: 18,941,952 bytes
Video Length: 00:06:29
Encoded with: WinFF
Quality: Apple iPod Color/Photo 4:3

Model: ipod Color/Photo
Rockbox Build: Daily Build [2 Apr 19:40]
Show FPS: On
Limit FPS: On
Skip frames: On
FPS: 15fps


Thats about all the info i think you would need...
hope that helps
Title: Re: Video Encoder Trial
Post by: Llorean on April 03, 2007, 11:56:06 PM
We'll need a sample file then, if the audio sync is off. Add the -fs 5000 (for a 5 mb file, adjust to how much you want to upload) to the options in the bottom of the WinFF window.
Title: Re: Video Encoder Trial
Post by: ilikedirt on April 18, 2007, 01:49:34 PM
WinFF doesn't work at all here. I'm on Ubuntu 6.10, installed it through the provided Debian package.

When I start encoding the status window pops up and closes immediately. Only a zero-byte output file gets created. This is for any video file I have thrown at it so far. The PLAY button in the main windows also doesn't seem to do anything - for me.
Title: Re: Video Encoder Trial
Post by: Llorean on April 18, 2007, 01:56:45 PM
Try executing the included ffmpeg binary in the terminal window and see if that provides you with any output giving a hint as to why it's failing.

You may want to try replacing it with an updated ffmpeg binary.
Title: Re: Video Encoder Trial
Post by: ilikedirt on April 18, 2007, 04:55:59 PM
Try executing the included ffmpeg binary in the terminal window and see if that provides you with any output giving a hint as to why it's failing.

You may want to try replacing it with an updated ffmpeg binary.

Hm. I'm on linux, so there is no binary provided with WinFF. I have ffmpeg installed in the system and when I run the command in terminal everything looks normal (gives me a help screen with options).
Title: Re: Video Encoder Trial
Post by: ilikedirt on April 18, 2007, 08:00:49 PM
Hi,
I think I figured it out.. ;) It seems ffmpeg in Ubuntu is "crippled" for legal reasons. I added the "Medibuntu" repository and updated ffmpeg from there. Now WinFF works as expected.
Title: Re: Video Encoder Trial
Post by: perfectdrug on June 08, 2007, 02:37:59 PM
if anyone has the same problem like me that winff doesn't start at all under Ubuntu feisty fawn try this:
Code: [Select]
sudo apt-get install libgdk-pixbuf-dev and after full installing ffmpeg everything workls like a charme
Title: Re: Video Encoder Trial
Post by: amado738 on August 07, 2008, 10:42:38 AM
I run a ubuntu platform and winff does not work for me! it seems that it is restricted for the audio! I have tried to fix it a number of ways but still cant get it to work! i also cant transcode with vlc (which worked fine before when I was running a windows system and a windows version of vlc). It would be nice to have a similar .bat like file in linux which transcode videos automatically with vlc. maybe there is an easier way! hope someone has a better idea!
Title: Re: Video Encoder Trial
Post by: afruff23 on August 11, 2008, 06:10:58 PM
I get this error on a XP 64-bit machine:
SHGetPathFromIDList failed: invalid pidl.

Here's the source code, the error message is in it but I still don't know what it means: http://winff.googlecode.com/svn-history/r30/trunk/%20winff%20--username%20bggmtt/unit1.pas
Title: Re: Video Encoder Trial
Post by: Llorean on August 11, 2008, 06:20:28 PM
The program itself is not created by us, and any real bugs should immediately be reported to its creator.
Title: Re: Video Encoder Trial
Post by: (V)3@7Y on August 18, 2008, 09:35:36 AM
ive been using winff problem free for my e200 for about 7 months now.
ive encoded a few dozen videos of many formats and sizes and both audio and video are perfect.