dem2vid shell script
|
05-26-2009, 06:58 AM
(This post was last modified: 06-01-2009 05:37 AM by lost.)
Post: #1
|
|||
|
|||
dem2vid shell script
Hi I'm Lost(prophets), dunno why it took me so long to come here. Here I am tho, hello everyone. :)
lost, proud to be a member of Nexuiz Ninjaz - Practicing the Ninja Art of Nexuiz since May 2009.
I thought I'd share my script that automates video capture & encoding on Linux (& Mac with a few tweaks). It works with the standard release from Alientrap, it may need editing if you use a distro specific package tho. One word of warning, you'll need a good 10GB of free space on your home dir, this'll be relinquished upon completion tho. Code: #!/bin/sh My presets: [b]libx264-fast.ffpreset:[/b] Code: coder=1 libx264-vhq.ffpreset:[/b] Code: coder=1 Example VBR encode (no file-size entered): [url]http://omploader.org/vMXFoMA/e1m6_768x432.mp4.html[/url] ^ It works for other games too. ;) If you're not bothered by quality & compression then you may be content with Nexuiz's built in ogg/theora encoder. There's no need for ~10GB free space & requires no dep's: Code: #!/bin/bash [b]Editing tips:[/b] Add a soundtrack: [i]ffmpeg -i tune.mp3 -i handsofgod.mp4 -vcodec copy -acodec copy newaudio.mp4[/i] This uses a specified mp3 as the audio track & makes a new mp4, leaving your original untouched. No encoding is done here, it simply copies the streams. Cut the video: [i]ffmpeg -i newaudio.mp4 -t 65.4 -vcodec copy -acodec copy cut.mp4[/i] -t is what does the trick here, in this example I've asked it to stop at 65.4 seconds. Again this simply copies the streams to a new file, keeping the original untouched & avoids re-encoding. Edited example (VBR): [url]http://omploader.org/vMTdoMA/cut.mp4[/url] ^ Nexuiz this time ;) Hope this has been of some help, if nothing else it's my introduction. For more examples see my Youtube page: [url]http://www.youtube.com/user/found666[/url] Tony. |
|||
05-26-2009, 07:15 AM
(This post was last modified: 05-26-2009 07:17 AM by -z-.)
Post: #2
|
|||
|
|||
RE: dem2vid shell script
nice man, very cool of you to share :).
Inspire your neighbor, they'll inspire you back.you know you can go a step further and integrate this with nautilus? if you put it in ~/.gnome2/nautilus-scripts -- you can pass $1 (the demo name) with a right click. For the other variables I'd suggest using something like [url=http://library.gnome.org/users/zenity/stable/zenity-text-entry-options.html.en]zenity[/url] to pass the other variables. Then you can simply right click >> encode. I have examples of this here: [url]http://github.com/z/maptoolz[/url] [url=http://maps.nexuizninjaz.com]maps.nn[/url] | [url=http://pics.nexuizninjaz.com]pics.nn[/url] | [url=http://chat.nexuizninjaz.com]chat.nn[/url] | [url=http://toolz.nexuizninjaz.com/cvar]2.5 cvar browser[/url] |
|||
05-26-2009, 07:58 AM
(This post was last modified: 06-01-2009 05:41 AM by lost.)
Post: #3
|
|||
|
|||
RE: dem2vid shell script
Cheers Z,
lost, proud to be a member of Nexuiz Ninjaz - Practicing the Ninja Art of Nexuiz since May 2009.
I don't use a full DE like Gnome, I keep it simple with openbox. Such custom actions would be a nice touch for things like (un)compressing files but requiring Zenity is taking it too far imo. If anyone wants to do this, using my simple ogg/theora script with the hq preset would be more suitable. You could also be sure of no missing dep's & require no ffmpeg configuration. Tony. PS. You'd also need to copy the demo to a location within ~/.nexuiz/data for Nexuiz to be able to play it. |
|||
« Next Oldest | Next Newest »
|