LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-25-2008, 03:51 AM   #1
zafar466
LQ Newbie
 
Registered: Oct 2006
Posts: 14

Rep: Reputation: 0
converting all kind of videos to flash ( FLV


Hello,
I need to setup a way for converting all kind of videos to flash ( FLV ) format on linux . can youe please tell me the best way to do it.


Thanks
 
Old 07-25-2008, 05:17 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You probably could use mencoder. If mplayer can play the file, you probably won't need to have input parameters configured for each file, because mencoder should be able to set them automatically. That means that you need to configure the video and audio output parameters which might be the same since you want to convert the video to flash. So after figuring out the arguments you need to do the conversion, you can write a script that calls mencoder with the same arguments. Then you could simply run your script and the input filename: toflash video.avi

Look in the info bash manual. There are parameter expansions that you can use so set a variable to a default if it isn't supplied as an argument:

Code:
bitrate=1000
jschiwal@hpmedia:~> echo ${bitrate:=$((500))}
1000
jschiwal@hpmedia:~> unset bitrate
jschiwal@hpmedia:~> echo ${bitrate:=$((500))}
500
Also look at the getopts command. It allows you to write wrapper scripts that take arguments with values. For example, suppose you want to convert the video to one of three sizes. You could have an option -s that takes either "small", "medium" or "large" as arguments, so then you could call the command like:
toflash -s small avideo.mpg

Using defaults and optional arguments you can call a wrapper script with only the filename or you could apply special arguments when you don't want to use your own defaults.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting flv to Mpg with Audio and ffmpeg btbx Linux - Software 7 06-12-2008 02:41 PM
LXer: Convert .flv (Google Videos) to .mpg using ffmpeg LXer Syndicated Linux News 0 07-25-2007 06:31 AM
Help embedding FLV flash video MicahCarrick Programming 3 07-24-2006 08:40 PM
converting to 3gp videos stevsom Linux - Software 1 02-27-2006 02:07 AM
converting to 3gp videos zba78 Linux - Software 1 08-12-2005 04:14 AM


All times are GMT -5. The time now is 06:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration