LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 04-13-2005, 09:11 PM   #1
dtra
Member
 
Registered: Nov 2004
Distribution: fc4
Posts: 104

Rep: Reputation: 15
video encoding from uploaded files


hi all

we need to set up a system where users can upload movies in some format (avi, wmv, mpeg, mov, etc or can be limited i guess)
which we would need to be converted server side to mp4 video files (not streaming atm)
the movies will be 2MB or less (so really short videos taken on phones or digital cameras)
now i have a lot of questions about this cos i have no idea what i need to do

is this a reasonable situation, would the video conversion take up too many system resources
our site is pretty busy and it already gets a bit slow at times, would video encoding of uploaded video files slow it down even more?

we are using apache 2 with php 4.3.9
red hat 9, dual xeon cpu, 2GB ram

72GB HDD
is there an application we can use where we just call exec(/usr/local/videoencoder $filein $fileout $encoding);?

does anyone know of a tutorial or resource site where i can find this information?

also, is there a way to get a frame, or series of frames so that we can create a thumbnail for the movie?

thanks a lot
any help is greatly appreciated
dave

Last edited by dtra; 04-13-2005 at 10:46 PM.
 
Old 04-13-2005, 11:39 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Video encoding is extremely CPU intensive, but for your situation you can run it as a lowest priority process (so it only uses idle CPU time).

There are multiple utilities that can do the job for you on Linux (choice is good ). For example:

ffmpeg
transcode
mencoder (part of the mplayer package).

Documentation and tutorials are on each respective site.
 
Old 04-14-2005, 12:06 AM   #3
dtra
Member
 
Registered: Nov 2004
Distribution: fc4
Posts: 104

Original Poster
Rep: Reputation: 15
hey thanks mate
i'll see what i can make of each
and which will suit us best, or whatever we can get going
 
Old 04-14-2005, 01:18 AM   #4
dtra
Member
 
Registered: Nov 2004
Distribution: fc4
Posts: 104

Original Poster
Rep: Reputation: 15
ok, i got ffmpeg installed and sorta working
i just installed it default everything
./configure, make, make install

i tried to just convert a simple .mov to mp4 with
ffmpeg -i /export/downloads/sc01.mov -b 150 /export/downloads/sc01.mp4
but it said unsupported codec for output stream

and to wmv
ffmpeg -i /export/downloads/sc01.mov -b 150 /export/downloads/sc01.wmv
that worked but when i try to play it in windows media player it says unkown video codec

what am i missing here, do i need to rebuild ffmpeg with some extra codecs configured?
i was able to convert simply from .mov to .mpg, not sure which codec it used (default i guess)

any help
dave
 
Old 04-14-2005, 01:42 AM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Try specifying the output format, instead of letting it default based on extension:

ffmpeg -i /export/downloads/sc01.mov -b 150 -f mp4 /export/downloads/sc01.avi

For a list of supported formats:

ffmpeg -formats | less

I usually use pre-built binaries, so I haven't had to check the build options. For an old release like RH9, that's not really an option, since the prebuilt binaries are very old. There's usually a help option to list the build options:

./configure --help
 
Old 04-14-2005, 02:05 AM   #6
dtra
Member
 
Registered: Nov 2004
Distribution: fc4
Posts: 104

Original Poster
Rep: Reputation: 15
thanks for the tip

i tried -f mp4 output to mpg, avi, mp4
but it said unsupported codec for output stream
don't all the codecs come with the source
if not, where can i download them from?

also, i tried this from the ffmpeg site
try '-f image -img jpeg test%d.jpg'
but it says unkown image format: 'jpeg'?

does anyone know of a good resource site for this, eg. tutorials, forums?

dave

Last edited by dtra; 04-14-2005 at 02:12 AM.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Vsftpd uploaded files Permissions silver05 Linux - Software 2 09-30-2005 09:22 AM
Uploaded Files permissions (proftpd) Wynand1 Linux - Security 1 01-28-2005 04:32 AM
Encoding Video Files help cferris Red Hat 1 11-04-2004 12:03 AM
Renaming files as they are uploaded Cr4wford Linux - Software 1 04-26-2004 04:41 PM
Lost permission on uploaded files beatlelane Linux - Security 5 09-11-2003 03:36 AM


All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
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