Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a flash web-app that created interactive video, and are using ffmpeg to do some compression/resizing when a user "publishes" their project.

The user can upload flv files and mp4 files, both of which play fine in the Flash UI before publishing. After publishing the flv files work fine, but the mp4 files will not play in the flash player: Audio will play but video won't.

The mp4 files will play fine if I download them and play them in the Quicktime player but if I attempt to open them in the Adobe Media Player it reports "The media file does not contain a supported video track".

If I open the Movie inspector in quicktime it tells me that the original file is an "h264" video and the ffmpeg-processed ones are "mpeg-4".

I have tried forcing it to h264 by adding flags like -f h264 and -vcodec h264 but I get a screenfull of errors (no frame, illegal POC type, sps_id out of range) ending with Could not find codec parameters (Video: h264)

h264 will show up if I run ffmpeg -formats and ffmpeg -codecs, and as I said it will play fine in Quicktime.

Is there anything else I need to do to convince the flash player to play them? Is there anything else I need to tell you about the server that will help?

share|improve this question

2 Answers 2

Here you find a very complete Guide How To compile ffmpeg for MP4 X264 encoding on Ubuntu:

http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

It also figures out how to add additional Settings/Tools for Streaming e.g qt-faststart

share|improve this answer

When I'm generating MPEG4 video files with ffmpeg, I use -vcodec libx264. The appropriate -f parameter depends on what your flash player can accept.

Please note that this question is off-topic on serverfault.com; you may want to ask questions about ffmpeg usage on the ffmpeg-user mailing list.

share|improve this answer
    
off topic? I am half expecting the actual answer to be that I need to recompile something, so figured this would be a place to ask. Didn't really seem like a Stack overflow/programming question. But thanks for answering anyhow. –  Andrew Fulton Apr 7 '11 at 3:21
    
Does that codec work for you? If not, what flash player are you using, and what command-line arguments do you pass to ffmpeg? –  justarobert Apr 7 '11 at 7:22
    
-vcodec libx264 hadn't worked previously, but now it is giving me a sensible error message rather than freaking out entirely (broken default settings, telling me to use a -vpre preset). Not sure what I changed. Does order of command-line arguments matter? –  Andrew Fulton Apr 8 '11 at 3:46
    
I haven't known order to matter here, but I am not an ffmpeg expert. The presets available to you by default will be in /usr/share/ffmpeg if you installed from a package. For example, -vpre fast corresponds to the file libx264-fast.ffpreset. –  justarobert Apr 8 '11 at 9:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.