And, using the following SWFObject to load the player:
var s1 = new SWFObject("mediaplayer.swf","mediaplayer","400","220","8"); s1.addParam("allowfullscreen","true"); s1.addVariable("width","176"); s1.addVariable("height","144"); s1.addVariable("file","output6.mp4"); s1.addVariable("type","flv"); s1.write("container");
I get video playing fine, but no audio. The audio plays when I play the file in mplayer/vlc/totem/on my friend's Windows machine. Via the player, under linux and windows (latest versions of flash plugin), no sound.
I've tried resampling audio to 22050Hz, and a variety of bitrates, but with no luck. I've also tried type=mp4, but that has no effect either.
I don't, currently, have a demo up anywhere on the web - my webserver is on order, should have arrived today but didn't. :(
If anyone has any helpful suggestions on what I'm doing wrong, your advice would be greatly appreciated.
Turns out, this morning, every other machine I test on, sound works fine. I think it's my browser. (I'm on a 64-bit linux, so I'm running flash via nspluginwrapper)
Your posted command line, using *libmp3lame*, didn't work for me.bc.. ffmpeg -i video3.mp4 -sameq -vcodec libx264 -acodec *libmp3lame* -ab 128k -ar 44100 output6.mp4 But *libfaac* did work for me.
I don't think it did with JW's player. Although it's a bit hard to tell as I've now found out no flash in my browser has audio. MP4s with mp3 audio played with audio OK on my desktop.
libmp3lame only works if you compiled ffpmeg with --enable-libmp3lame, and have lame installed, obviously.
I'm currently using (via http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/ )
and that seems OK. At least, people I know who have working flash plugins assure me it's OK... :)
Now my only problem is making sure that ffmpeg command works with as much video as I can throw at it (application is a video-blogging site, so transcoding needs to be automated).
I also could not get it to work with Lame MP3 in a MP4box with x264 video. I encode with MediaCoder, tried lots of different options and browsers, nothing worked. Switching to FAAC worked fine though.
I have the same problem with MP4 videos encoded with MeGUI and the x264 encoder. When the video file is muxed with an MP3 audio file I get no sound in the FLV Player (tried versions 3.17 and 4.3), but the sound plays fine in Media Player Classic, Windows Media Player and KM Player.
When I mux it with an AAC audio file the sound plays in the FLV player, but the AAC quality is much inferior to the MP3 quality regardless which settings I use.
What is it that prevents the FLV Player from playing the sound in an MP4+MP3 file?
I have found a way to get good AAC quality. Don't use MeGUI/Nero. Use enc_aacplus and make sure to set the speech option. I get very good quality with this command line: enc_aacplus input.wav output.mp4 --cbr 24000 --speech --mp4box The wav file must be PCM 44,100 Hz. MeGUI/Nero is OK for music only tracks (use HE-AAC 48 kbps stereo), but absolutely useless for speech.
See: *http://kb2.adobe.com/cps/402/kb402866.html* Specifically, the note below the second table and the third table. H.264 + AAC in the MP4 container is supported. H.264 + MP3 in the MP4 container is not supported.
This question has received the maximum number of answers.