Sponsored Content
Operating Systems Solaris converting midi to wav in solaris 10 Post 302260899 by incredible on Saturday 22nd of November 2008 06:52:02 AM
Old 11-22-2008
We will be using 3 tools: transcode, mplayer's mencoder and ffmpeg - all commandline tools. Anybody who has been keeping track of this journal should by now be aware that if I can, I avoid GUI point-n-click apps like the plague. Lastly, this mini howto is by no means exhaustive.

Basics
mencoder
-ovc codec for video output
-oac codec for audio output
-o outfile.avi

mencoder infile.avi -ovc lavc -oac lavc -o outfile.avi

transcode
-i input_filename.mpg
-y codec for audio/video output
-o output_filename.avi

transcode -i infile.mpg -o outfile.avi -y divx

ffmpeg

ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg

Video CD
ffmpeg -i infile.avi -target ntsc-vcd outfile.mpg

Flash Videos
ffmpeg -i infile.mpg -ab 256 outfile.flv

*note:

Use the “-ab” switch to control the sound quality. 64 is okay for home vidoes. For music you want something higher like 256.
XviD
First, something about video bitrates.

Crummy youtube-like video is around 80-150.
VCD quality is around 400-500.
DVD quality is approx 800.
Default bitrate for mencoder is 687kbps.
mencoder infile.avi -ovc xvid -oac mp3lame -xvidencopts bitrate=687 -o outfile.avi

*notes:

If you want the outfile to have an estimated size (like 700mb), set a negative bitrate and replace the bitrate value with the expected size of the outfile like:
-bitrate=-700000 - will give you a ~700mb avi file.

Two-pass encodings will give a nicer video but will take longer to convert:
mencoder infile.wmv -ofps 23.976 -oac mp3lame -lameopts abr:br=92 -ovc xvid -xvidencopts pass=2:bitrate=150 -o audiofix-150bit-xvid.avi

Audio quality can be set via the -lameopts switch if you're using mp3lame (-oac mp3lame) for the audio format:
mencoder infile.avi -ovc xvid -oac mp3lame -lameopts abr:br=256 -xvidencopts bitrate=800 -o outfile.avi

Microsoft media files (*.wmv, *.asf, *.wmx)
Just follow the howto for Xvid and replace the infile.avi with any M$.wmv file you have. There's an issue regarding some players (Xine) not being able to play wmv->xvid files converted using mencoder. Just use the -ofps 23.976 switch for that.

DivX
transcode -i infile.mpg -o outfile.avi -y divx

DVD
ffmpeg -i infile.avi -target ntsc-dvd dvd.mpg
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete original wav file if lame was successful encoding.

In a bash script: src=”cooltrack.wav” dst=”cooltrack.mp3” lame $src $dst I would like to add some line that would delete the source wav file like: rm $src but I would like this only if the encoding was successful. What should I include before deleting the original to check that the... (2 Replies)
Discussion started by: Aia
2 Replies

2. Shell Programming and Scripting

converting from reliant 2 solaris

Hello... I am trying to convert my script from one to another unix flavor... from reliant to solaris...I did all but can not convert this awk/nawk: First code if code that works what I want under reliant and the second should do same under solaris but it does not I did so far from this :... (2 Replies)
Discussion started by: abdulaziz
2 Replies

3. Ubuntu

Playing wav-file sounds.

I would like to be able to shell out to the command line and play sounds. After installing "sox" I can now do this using the play command. Is there a way to stop the playing once it starts? (5 Replies)
Discussion started by: newyorkpaulie
5 Replies

4. UNIX for Dummies Questions & Answers

Converting HP-UX awk to Solaris

Hi, I am using awk in HP-UX to enter an encrypted entry of the password into /etc/passwd with success, this is the command I am using and it is working great. cat /tmp/passwd.gal.before|awk -F: -v gal_passwd="encrypted_password" '{OFS=":" ; print $1,gal_passwd,$3,$4,$5,$6,$7}' >... (3 Replies)
Discussion started by: galuzan
3 Replies

5. UNIX Desktop Questions & Answers

how to create empty wav file

Dear All, Kindly explain me a command in unix to create a empty wav file with example. Thanks in Advance! (1 Reply)
Discussion started by: thillai_selvan
1 Replies

6. Shell Programming and Scripting

Converting from Linux bash (GNU) to Solaris script syntax errors

Original script written on CentOS 6.3 with GNU bash 4.1.2 Destination system is Solaris 9 with GNU bash 2.05 (not changeable by me) I have a script written on the linux side but now we need to provide a version to another site that "doesn't like linux". I've been going through changing the ] or... (13 Replies)
Discussion started by: oly_r
13 Replies

7. UNIX for Dummies Questions & Answers

Simple Midi Need

In MS Windows Media Player, I can open a MIDI file (.mid), and in 'Sound' sub section of control panel, I can direct an external USB device to play it. I do not seem to be able to find any SIMPLE way to do this in Linux: the Ubuntu Midi info says it is applicable UNLESS you are using external... (2 Replies)
Discussion started by: Priscus
2 Replies
tcscan(1)						      General Commands Manual							 tcscan(1)

NAME
tcscan - scan multimedia streams from medium and print information on the standard output SYNOPSIS
tcscan -i name [ -x codec ] [ -e r[,b[,c]] ] [ -b bitrate ] [ -w num ] [ -f rate ] [ -d verbosity ] [ -v ] COPYRIGHT
tcscan is Copyright (C) by Thomas Oestreich. DESCRIPTION
tcscan is part of and usually called by transcode. However, it can also be used independently. tcscan reads source (from stdin if not explicitely defined) and prints on the standard output. OPTIONS
-i name Specify input source. If ommited, stdin is assumed. You can specify a file, directory, device, mountpoint or host address as input source. tcscan usually handles the different types correctly. -d level With this option you can specify a bitmask to enable different levels of verbosity (if supported). You can combine several levels by adding the corresponding values: QUIET 0 INFO 1 DEBUG 2 STATS 4 WATCH 8 FLIST 16 VIDCORE 32 SYNC 64 COUNTER 128 PRIVATE 256 -v Print version information and exit. NOTES
tcscan is a front end for scaning various source types and is used in transcode's import modules. tcscan does a complete scan of the source to gather information. EXAMPLES
The command tcscan -i foo.avi prints header information about the AVI-file itself and lists details on the video and audio content, e.g., keyframes, chunk structure. The command cat audio.pcm | tcscan -x pcm -e 48000,16,2 simply determines the playtime lenghth of the raw audio stream. The command tcscan -x mp3 -i input.mp3 will print the number of chunks in the MP3 file and the average bitrate. AUTHORS
tcscan was written by Thomas Oestreich <ostreich@theorie.physik.uni-goettingen.de> with contributions from many others. See AUTHORS for details. SEE ALSO
avifix(1), avisync(1), avimerge(1), avisplit(1), tcprobe(1), tcscan(1), tccat(1), tcdemux(1), tcextract(1), tcdecode(1), transcode(1) tcscan(1) 23th September 2002 tcscan(1)
All times are GMT -4. The time now is 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy