NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] FFMPEG & LAME

bz-gmort at beezifies.com bz-gmort at beezifies.com
Wed Oct 10 10:05:18 EDT 2007


Ben Sgro (ProjectSkyLine) wrote:
> Good morning,
>  
> Super off topic, but since this list is one of my best resources for help,
> I figured I'll try here.
>  
> I've spent a lot of time on google and can't seem to figure out the problem.
>  
> I have a PHP app that is converting .avi's to .flvs. I'm using ffmpeg 
> and lame.
>  
> I've built ffmpeg w/libmp3lame support enabled, to encode to .mp3 for 
> the .flv
>  
> However, I don't know much about this stuff, and I can't seem to figure 
> out the correct
> parameters. The online documentation for ffmpeg is lacking.


It's not so much lacking, as there are so many different parameters that 
are format specific, and many that you would only use for a particular 
combination, that it is a waste of time to try to document it all when 
they can be working on making the next version.

Generally, I find it easiest when working with ffmpeg to find someone 
else that wants to do what I want and start with a known working formula.

For example, converting to flash is a web thing.
People running personal DVR's do a lot of Flash conversion.
So if you search for Mythweb and FLV you will get a lot of hits on 
people who want to convert their MythTV recorded videos to FLV.

Here is a simple howto, give it a try:
http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_from_mythweb_using_flash_video

Also, please note that FLVTOOL is very important in making flash videos. 
  Basically, without getting technical(cause I have no clue what it is),
the flv file you get from ffmpeg is gonna be one loooong file where you 
have to start at the beginning and go to the end to view a file.  No 
fast forwarding, no rewinding.

FLVTOOL adds some "bookmarks" to allow you to jump forward and back in 
the flash player.

FFMPEG is not always as forgiving of poorly packaged audio/video as a 
video player(VLC, Windows Media, Realplayer, etc).  Which leads to loads 
of headaches when someone has a file that plays fine, but after 
conversion is missing the last 5-15 seconds of audio or video or both! 
In such a situation, one thing to do is to upload the video to Google 
video or Youtube.  They use similar programs and run into the same 
problems - so if you can demonstrate that Youtube can't convert the 
video, you will find people a lot more understanding of why their 
free/low cost app won't do it.

There are a couple of services to convert videos to flash(or convert 
from any format to any format) where you submit your video and they 
email you a link or some such.  There was one I used that was credit 
based, so they had a relatively intelligent API for doing the conversion 
- this moves the conversion off of your responsibility and onto someone 
else, but it costs something like 10 cents per video.  For medium 
traffic sites or proof of concepts, I'd start with them and only deal 
with ffmpeg when it becomes economically justifiable(ie you are willing 
to put the hours in to troubleshooting again and again when problems 
crop up).

For extremely low volume, use Super to do the translation offline on a 
PC and just upload Flash videos.






More information about the talk mailing list