Some times FLAC is nice, sometimes MP4 videos are neat.
Sometimes though, you have an SD card that's too small, or a device with limited output quality, or decoding resources, and what you want is Mp3 in a space-saving, but still nice-enough sounding Variable Bit Rate (VBR).
Maybe it's a playlist for a mobile device? Who knows..
But when things like that happen, and you have a directory full of files, here's what you do:
mkdir out
ls | while read L
do
IN="$L"
OUT=`echo "$IN" | sed 's/\(.*\)\..*/\1/'`
ffmpeg -i "$IN" -aq 1 -vn -map_metadata 0 "out/$OUT.mp3"
done
This loops through all files, cuts off their extention, and trancodes them to variable bitrate between 190-250 Kbit/s ( http://ffmpeg.org/trac/ffmpeg/wiki/Encoding%20VBR%20%28Variable%20Bit%20Rate%29%20mp3%20audio )
Notice the -vn option, which, in case it's video, greatly speeds up encoding by ignoring the video part of the input file.
The -map_metadata 0 attempts to take the first chunk of metadata from the original file, and save its fields in the newly encoded mp3 file, milage may vary, it worked in most of my files.
Your files end up in the "out" directory.
I came up with this when assembling a playlist for my phone, not needing (or wanting to waste space on) super high quality, or music videoes.. Amongst input files were FLAC, Mp3, Ogg and video-files in avi and mp4 containers.
Thursday, November 29, 2012
Sunday, August 26, 2012
Wizznic update
So, I've been busy with real life, and being sick..
But yesterday I did manage to squeeze a few lines of code into Wizznic! :)
While collecting energypoints for the big endeavor of creating more real game content, I decided to implement some transitions into Wizznic, I think they turned out rather nice for a first try.
I have also converted from a Dark and Damp Debian Zealot (DDDZ) to a Happy and Fluffy Arch Linux User (HFALU), and was surprised at how nice the AUR is, some awesome person out there already made an AUR package for Wizznic! (Check that out, here), however, I pondered, and decided to make another package aswell, not as a replacement for the existing one, but an alternative, see, the package I made, is not a stable, or officially "released" wizznic, it is instead, the latest and greatest code, directly from github.
I really do try my best never to push breaking code (jenkins will at least scream at me for making uncompiling code). And I believe that if you like to be updated, then my package is for you:
Without further ado: The Wizznic-git AUR package!
I made a little video, showing the complete build and installation process, and my fancy new transitions too.
How awesome is that? Pretty awesome I'd say ;)
You can, ofcause, also grab prebuild binaries for Linux, Windows and Wiz over at the jenkins buildserver.
Rad.
But yesterday I did manage to squeeze a few lines of code into Wizznic! :)
While collecting energypoints for the big endeavor of creating more real game content, I decided to implement some transitions into Wizznic, I think they turned out rather nice for a first try.
I have also converted from a Dark and Damp Debian Zealot (DDDZ) to a Happy and Fluffy Arch Linux User (HFALU), and was surprised at how nice the AUR is, some awesome person out there already made an AUR package for Wizznic! (Check that out, here), however, I pondered, and decided to make another package aswell, not as a replacement for the existing one, but an alternative, see, the package I made, is not a stable, or officially "released" wizznic, it is instead, the latest and greatest code, directly from github.
I really do try my best never to push breaking code (jenkins will at least scream at me for making uncompiling code). And I believe that if you like to be updated, then my package is for you:
Without further ado: The Wizznic-git AUR package!
I made a little video, showing the complete build and installation process, and my fancy new transitions too.
You can, ofcause, also grab prebuild binaries for Linux, Windows and Wiz over at the jenkins buildserver.
Rad.
Saturday, July 28, 2012
Wizznic 1.0 preview and build stuff
Finished mouse-support in the Level-Editor.
Got distracted and wanted to push some pixels around so I had some fun with the "waveImg" function, if you feed it two additional pictures, an "overlay" and a "mask", it will, for every visible pixel in the picture to wave, check the same position on the mask picture for a pixel with a GREEN component of 0 (yep, I'm that weird, black colour works nicely), if a green value of 0 is found, it will read the colour from another (moving around the X and Y axis) position on the overlay image.
Anyway, this video shows the intro, and editing/playing a level, all using the mouse/potential touchscreen.
Oh, and I've linked the Wizznic Github project with my jenkins buildserver at http://jenkins.cyberstalker.dk/job/Wizznic/ that means that every time I put a change to the main branch, the following packages are built:
Got distracted and wanted to push some pixels around so I had some fun with the "waveImg" function, if you feed it two additional pictures, an "overlay" and a "mask", it will, for every visible pixel in the picture to wave, check the same position on the mask picture for a pixel with a GREEN component of 0 (yep, I'm that weird, black colour works nicely), if a green value of 0 is found, it will read the colour from another (moving around the X and Y axis) position on the overlay image.
Anyway, this video shows the intro, and editing/playing a level, all using the mouse/potential touchscreen.
Oh, and I've linked the Wizznic Github project with my jenkins buildserver at http://jenkins.cyberstalker.dk/job/Wizznic/ that means that every time I put a change to the main branch, the following packages are built:
- Wizznic for Linux (32 and 64 bit)
- Wizznic for Windows (32 bit, also works on 64 bit and in WINE)
- Wizznic for Gp2X Wiz
- Wizznic Source code package (for people with no GIT)
Wednesday, June 6, 2012
Tuesday, June 5, 2012
Wizznic work
Work continues slowly on Wizznic, All aspects of the game can now be controlled using the mouse, or a touch-screen, this really makes sense on the Wiz console, PC and other consoles too. That is, except the level-editor, but I might start hacking on this soon.
In less geeky news, the level-editor got a facelift thanks to my secret graphics guru with whom I spend an evening talking about graphics and wathing the magic happen.
I'm very satisfied with this new design as it is very specific to the editor and helps the interface a great deal.
Other changes include a new "back" button for when mouse is used, and the ability to use all features on the high-score entry screen using the mouse/touchscreen.
Before Wizznic 1.0 we will create two completely new themes, each for it's own pack, thus, two completely new packs! That is 40 new puzzles, leaving the mainline puzzle set at 80 puzzles.
However, before doing that, we will sit down and play through the entire game, this should allow us to come up with some really evil puzzles for the later levels ;)
Anyway, just wanted to say, in this in-browser, Object Oriented, Accelerated, flashy, highres, 3D world, that little pixel pushing Wizznic is not dead!
I'm eager to finish this, and hopefully start working on the next big thing, johnny, which is secret, shh!
In less geeky news, the level-editor got a facelift thanks to my secret graphics guru with whom I spend an evening talking about graphics and wathing the magic happen.
Other changes include a new "back" button for when mouse is used, and the ability to use all features on the high-score entry screen using the mouse/touchscreen.
Before Wizznic 1.0 we will create two completely new themes, each for it's own pack, thus, two completely new packs! That is 40 new puzzles, leaving the mainline puzzle set at 80 puzzles.
However, before doing that, we will sit down and play through the entire game, this should allow us to come up with some really evil puzzles for the later levels ;)
Anyway, just wanted to say, in this in-browser, Object Oriented, Accelerated, flashy, highres, 3D world, that little pixel pushing Wizznic is not dead!
I'm eager to finish this, and hopefully start working on the next big thing, johnny, which is secret, shh!
Subscribe to:
Posts (Atom)

