Diggin' technology every day

September 14, 2009

transcode tips

Filed under: Uncategorized — Nate @ 6:58 pm

I downloaded a show off my Tivo Series 3 last night, and wanted to convert it from it’s native MPEG-2 to MPEG-4. I’ve done it before, but didn’t want to spend time trying to find the scripts so I spent a bunch of time searching around for some quick tips on how best to do it. And despite some honest efforts I came up with nothing useful.

So a short time ago I dug up my scripts and thought to share some of them, not only will it make it easier for me since I can check this site for the syntax in the future but maybe it’ll help you too.

Of course I won’t cover installing transcode or it’s dependencies, I assume you have all of that done. I don’t recall what all of the options do but as you can see there are quite a few, not the easiest thing to remember. See the man page or transcode documentation for what the options mean.

Export audio portion of a video file to OGG Vorbis:

transcode -i input_filename -y raw,ogg -F mpeg4 -E44100 -b 128 -N 0x55 -w 120,300,2 -V -Z 176×120 -m filename.ogg -o /dev/null

Export audio portion of a file to MP3(using lame):

transcode -i input_file -y raw -F mpeg4 -E44100 -b 128 -N 0x55 -w 120,300,2 -V -Z 176×120 -m output.mp3 -o /dev/null

Convert video+audio from some format(e.g. MPEG-2) to MPEG-4:

transcode -i input.mpg y xvid4 -F mpeg4 -E22050 -b 64 -N 0x55 –w 250,200,3 -V -M 2 -o filename.avi

I wish transcode had some easy to use templates, such as convert with low, medium, or high compression type of deal. I mean if you don’t specify any options by default it seems to use maximum quality and in some cases despite going from say MPEG-2 to MPEG-4 I’ve seen the file size increase.

Fix hanging vmware tools on linux

Filed under: Virtualization — Tags: , — Nate @ 5:48 pm

I can’t be the only one who has come across this, back in early June I filed a support case with VMware around the fact that roughly 90% of the time when the latest version of vmware-tools that shipped with vSphere loaded on my CentOS 5 systems it would hang part way through, if I logged into the console I and just pressed <enter> it would continue loading. Naturally the Tier 1 support rep was fairly useless, wanting me to do some stupid things to get more debug information.

I went off on my own and traced down the problem to the script towards the end of the script at around line 11,600, where it tries to make a symlink. If I disable the offending code the problem stops(the link it’s trying to create is in fact already there):

sub symlink_icudt38l {
my $libdir = db_get_answer('LIBDIR');
install_symlink($libdir . '/icu', $gRegistryDir . '/icu');

If your interested in the strace output:

[pid  7228] <... read resumed> "", 4096) = 0
[pid  7228] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid  7228] fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid  7228] close(4)                    = 0
[pid  7228] rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_IGN}, 8) = 0
[pid  7228] rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) =  0
[pid  7228] rt_sigaction(SIGQUIT, {SIG_IGN},  {SIG_DFL}, 8) = 0
[pid  7228] wait4(7244, [{WIFEXITED(s)  && WEXITSTATUS(s) == 0}], 0, NULL) = 7244
[pid   7228] rt_sigaction(SIGHUP, {SIG_IGN}, NULL, 8) = 0
[pid   7228] rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
[pid   7228] rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
[pid  7228] lstat("/etc/vmware-tools/icu", {st_mode=S_IFLNK|0777,  st_size=25, ...}) = 0
[pid  7228] read(0, 

The last line there the system is waiting for input, when I hit <enter> it continues loading.

The support case sat..and sat..and sat. Then a couple of weeks ago some manager called me up and wanted to know how the case was doing. I guess they didn’t spend any time on it at all. I told him I already found a workaround, and he said because of that they were going to work up a KB entry on it then close the case. Then another week passes and I get an email saying OH! We see you found a workaround, we’ll forward that to engineering and get back to you. Yes the workaround I sent on JUNE 16.

So hope this helps someone, I’ll update this when/if they get a KB entry out on it. It’s certainly saved me a lot of time, it is very annoying to have to connect to each and every system to press enter to get it to continue to boot to workaround this bug.

Powered by WordPress