View Full Version : Optimising, preset-based console video encoder updated
aflegg
05-07-2006, 03:49 PM
Hi,
I've updated my optimising, preset-based console video encoder:
http://www.bleb.org/software/770/#encode
http://www.bleb.org/software/770/770-encode-capture.png
Updated in this version:
Guess a suitable frame rate for crazy Flash Videos (e.g. downloaded from Google Video (http://video.google.com/))
Improve cropping for optimisation
Tweak "best" preset for full-screen video on latest firmware
Auto-detect mencoder features for maximum compatibility
What is it?
Converts any MPlayer-supported input into 770-compatible DivX
Simple user interface for quick conversion
Console-based, so can be used in "Send To" items or other scripts
Preset-based so you say "smallest" or "best" and get video without having to mess around with bitrates, framerates, resolutions etc.
Attempts to guarantee that the output video will always play on the 770, no matter what the input
Any comments or questions, please don't hesitate to let me know. For those who prefer a GUI, konttori's Media Converter is almost certainly better. There are a list of known encoders (http://maemo.org/maemowiki/VideoEncoding) in the MaemoWiki.
If anyone comes up with any additional presets, I'd love to incorporate them.
Cheers,
Andrew
konttori
05-07-2006, 04:29 PM
Really nice stuff Andrew!
One thing I was thinking about would be an instruction (or additional script) that people could use to setup your script to automatically convert stuff in a folder to 770 compatible video. This would be nice for dvr people so that whenever your dvr finishes recording, it would automatically make a version for 770 as well.
Well, just an idea
aflegg
05-07-2006, 05:34 PM
Good idea. Something straightforward which can be fired off crontab should do; I'll have a think...
One thing I've also thought of is that there's nothing stopping mencoder being ported to the 770. Sure, it'd be slow, but could be handy to have an encoder on the device itself.
Cheers,
Andrew
aflegg
05-12-2006, 08:40 AM
Updated to v1.11 (12-May-2006):
Enhance "smallest" to better fit 770 screen
Add "small" preset (much better audio quality than "smallest", video slightly better)
Fix cropping which just didn't work in some instances
Remote User
05-12-2006, 12:28 PM
Normally when a fellow gets married & has his first child he kind of backs off the software for a while. While I am sure that you are spending lots of time with your family you also seem to be really inspired lately. We're all glad to see you contributing your time & talents to the 770. I think I speak for virtually everyone here when I say that your contributions are very much appreciated.
aflegg
05-12-2006, 05:31 PM
Thanks :-)
Unfortunately work means being away from home a couple of nights a week, so that (should) give me plenty of time to work on stuff. Not done all the things I want yet to my TV pages (http://tv.bleb.org), content management system (http://www.bleb.org/commas-demo/) or - more 770-related - Sylpheed port; so I think I'm a little behind TBH!
Cheers,
Andrew
varis
05-12-2006, 07:41 PM
The new preset is
small => { abitrate => 96, vbitrate => 96, width => 240 },
I tried low video bitrates like this as well, but personally I don't like them so much. Of course they save space on the card. Is the audio bitrate of 96 kbps quite a bit of an overkill here?
I mostly have watched anime (cartoons), and here I'm starting to like something like this:
new3 => { abitrate => 96, vbitrate => 200, width => 352 },
Big resolution seems to be good for clarity/sharpness. But I figure there's a huge YMMV in presets, since different videos have different characteristics, not to talk of MMC sizes and personal preferences. For anime/cartoons you don't need so high a bitrate as the frames will have large areas of uniform colour. I suppose if you have lots of action/movement, you need a bit higher bit rate, too...
BTW how about adding an option that only encodes 30 seconds, like in Konttori's MediaConverter? Would help us find good presets quicker.
aflegg
05-13-2006, 03:20 AM
I'll add your preset as "average" and bump the audio/video up a bit for a "good". The main reason for the "small" preset is that the video bitrate works well enough for presentations etc. (e.g. Google's TechTalks) but the low audio rate can sometimes be less fun (although for mostly speaking, again, it's not too bad).
Adding a 30 second encode is trivial, I was thinking of doing it anyway so thanks for the prod.
--
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org (http://www.bleb.org/)
Jaffa on #maemo, irc.freenode.net
aflegg
05-15-2006, 03:53 PM
Hi,
I've now added two new presets "average" and "good", based on varis' above. I've also added a "--sample" option (short version, "-s") which only encodes the first 30 seconds of video.
Updated script available from same URL as before:
http://www.bleb.org/software/770/#encode
HTH,
Andrew
neiljerram
05-18-2006, 04:10 AM
Hi Andrew,
I just used 770-encode.pl for the first time and it worked beatifully. Many thanks.
The only slight snag is that the volume is very low on the 770. I presume this is a consequence of the volume level being low on the source (DVD), but would it be possible for you to add an option to increase the volume when encoding?
Regards - Neil
aflegg
05-18-2006, 04:50 AM
Neil,
Could you add the following at line 108 and see if it helps?
push @params, '-af', 'volnorm';
Due to the mono-encoding on the "smallest" preset you'll have to use "small" or above (obviously a limitation which I'd fix if it works).
If it does, I'll include it in v1.21.
Cheers,
Andrew
neiljerram
05-18-2006, 05:24 PM
Neil,
Could you add the following at line 108 and see if it helps?
push @params, '-af', 'volnorm';
Yes, that works very well, thanks. I'm using --preset=good, so the need to use small or better is not a problem for me.
- Neil
aflegg
05-19-2006, 04:11 AM
Hi,
v1.21 now uploaded to same location (http://www.bleb.org/software/770/#encode) with automatic volume normalisation (on all presets).
Cheers,
Andrew
aflegg
05-26-2006, 05:30 PM
For those who are interested:
v1.30 (http://www.bleb.org/software/770/#encode) (26-May-2006) adds support for anamorphic data sources (e.g. widescreen DVDs) and passing through options to mencoder.
For example:
770-encode -p good -m-aid -m128 dvd://4 MaxAndPaddy-01x04.avi
Comments, as ever, welcome.
elpaso
11-06-2006, 11:35 AM
Hi,
I tried several presets and options but cannot make a playable video (latest OS 2006), the video is playable only with mplayer on the 770 but not with the default video player.
Any hint?
I could send you the video for testing if you like.
aflegg
11-06-2006, 11:38 AM
Yeah, please. Although I'm not going to have a chance to look at it for a few days.
Either email me directly (andrew@bleb.org), or post here.
Cheers,
Andrew
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.