Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » FFmpeg FLV no sound


FFmpeg FLV no sound

Reply
  #1 (permalink)  
Old 07-19-06, 04:44 AM
johnbanks johnbanks is offline
New Member
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
FFmpeg FLV no sound

I have installed ffmpeg installed on my server.
Converting works perfect, but now my movies dont have sound.
Is there a setting that I forgot or may be a stupid thought, but does it needs that a server has to have an audio card?
Never heard of this but read something about this.
May be any of you are familiar with this issue.
Reply With Quote
  #2 (permalink)  
Old 04-10-07, 11:44 AM
antonyf antonyf is offline
New Member
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How I did it

This is how i did it on my Debian Server and Mac OS X client. I hope it works for you!

/ Antony Fernandez

Last edited by Nico; 12-27-08 at 03:20 PM. Reason: Removed link.
Reply With Quote
  #3 (permalink)  
Old 04-25-07, 04:22 PM
tophat's Avatar
tophat tophat is offline
Newbie Coder
 
Join Date: Dec 2005
Location: Michigan
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
you need to install lame on your server.

http://lame.sourceforge.net/index.php
__________________
tophatcomedy.com
Reply With Quote
  #4 (permalink)  
Old 05-02-07, 12:29 AM
Lain Lain is offline
New Member
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I'm also having the same problem and I've installed lame.
When I use this command

Code:
[root@ser001 Video]# ffmpeg -acodec mp3 -i Picture052.avi output.flv
FFmpeg version SVN-r8863, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-libfaac --enable-xvid --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on May  2 2007 13:01:26, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51)
Input #0, avi, from 'Picture052.avi':
  Duration: 00:01:07.7, start: 0.000000, bitrate: 2307 kb/s
  Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 15.00 fps(r)
  Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, 88 kb/s
File 'output.flv' already exists. Overwrite ? [y/N] y
Output #0, flv, to 'output.flv':
  Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s, 15.00 fps(c)
  Stream #0.1: Audio: 0x0000, 11024 Hz, mono, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[flv @ 0x51f564]removing common factors from framerate
Unsupported codec for output stream #0.1
If I don't use -acodec, it converted fine but with no audio

Code:
[root@ser001 Video]# ffmpeg -i Picture052.avi output.flv
FFmpeg version SVN-r8863, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-libfaac --enable-xvid --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on May  2 2007 13:01:26, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51)
Input #0, avi, from 'Picture052.avi':
  Duration: 00:01:07.7, start: 0.000000, bitrate: 2307 kb/s
  Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 15.00 fps(r)
  Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, 88 kb/s
File 'output.flv' already exists. Overwrite ? [y/N] y
Output #0, flv, to 'output.flv':
  Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s, 15.00 fps(c)
Stream mapping:
  Stream #0.0 -> #0.0
[flv @ 0x51f564]removing common factors from framerate
Press [q] to stop encoding
frame= 1015 fps=421 q=6.5 Lsize=    1787kB time=67.7 bitrate= 216.3kbits/s
video:1771kB audio:0kB global headers:0kB muxing overhead 0.905871%
I have spent one full day to search for every possible answer in google but still no luck so far. Can anyone please help? I'm basically stuck and wanting to bang my head on the desk
Reply With Quote
  #5 (permalink)  
Old 06-18-07, 12:38 PM
TRicciardi TRicciardi is offline
New Member
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
this works

Quote:
Originally Posted by antonyf View Post
This is how i did it on my Debian Server and Mac OS X client. I hope it works for you!

http://www.antony.se/2007/4/10/ffmpe...ebian-and-os-x

/ Antony Fernandez
Did what Antony sugested on my CentOS server and it worked.

Now i need to try php integration..
Btw should i force options like -ar 44100 in my php code? coz the source file may have a flash incompatible sampling rate.
Reply With Quote
  #6 (permalink)  
Old 07-16-07, 10:13 PM
ludlow ludlow is offline
New Member
 
Join Date: Feb 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy

Hi. I've been having the same problems and I'm not sure what else I can do. I have installed Lame and configured ffmpeg to use the libraries (or it should be anyways). Here are my resulting outputs:

If I just do a very basic ffmpeg command:

Code:
[root@localhost videos]# ffmpeg -y -i cimg3456.avi -acodec mp3 -f flv cimg3456.flvFFmpeg version SVN-r9708, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-libmp3lame --enable-static --disable-vhook
  libavutil version: 49.4.1
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jul 16 2007 22:03:39, gcc: 4.1.2 20070502 (Red Hat 4.1.2-12)

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
Input #0, avi, from 'cimg3456.avi':
  Duration: 00:00:39.6, start: 0.000000, bitrate: 3960 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 640x480, 29.97 fps(r)
  Stream #0.1: Audio: adpcm_ima_wav, 44100 Hz, mono, 177 kb/s
Output #0, flv, to 'cimg3456.flv':
  Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 29.97 fps(c)
  Stream #0.1: Audio: 0x0000, 44100 Hz, mono, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1
You can see from the output it's utilizing the libmp3lame library. If I do the most basic of commands (essentially leaving out the audio codec):

Code:
[root@localhost videos]# ffmpeg -y -i cimg3456.avi -f flv cimg3456.flv
FFmpeg version SVN-r9708, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-libmp3lame --enable-static --disable-vhook
  libavutil version: 49.4.1
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jul 16 2007 22:03:39, gcc: 4.1.2 20070502 (Red Hat 4.1.2-12)

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
Input #0, avi, from 'cimg3456.avi':
  Duration: 00:00:39.6, start: 0.000000, bitrate: 3960 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 640x480, 29.97 fps(r)
  Stream #0.1: Audio: adpcm_ima_wav, 44100 Hz, mono, 177 kb/s
Output #0, flv, to 'cimg3456.flv':
  Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 29.97 fps(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1186 fps=150 q=31.0 Lsize=    1877kB time=39.6 bitrate= 388.5kbits/s    
video:1858kB audio:0kB global headers:0kB muxing overhead 1.007290%
You can see that it actually works, but with NO AUDIO.

Any thoughts, comments, or obscene gestures are welcome.
Reply With Quote
  #7 (permalink)  
Old 07-16-07, 10:16 PM
ludlow ludlow is offline
New Member
 
Join Date: Feb 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
...for the record, I'm on a dual AMD Opteron 64 board running Fedora 7.

Additionally, I can get this to work flawlessly using OSX (but I need to automate this process for my server).
Reply With Quote
  #8 (permalink)  
Old 07-17-07, 05:34 PM
ludlow ludlow is offline
New Member
 
Join Date: Feb 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Trophee Finally got everything working - Complete solution included

Okay - well I didn't actually get any replies *unfortunately*, but I WAS able to finally get this thing working after a solid day of work. So here's basically what I did and the problems that I ran into along the way. I hope this helps someone:

The first problem(s) essentially came from not having the right libraries installed. I assumed FFMPEG took care of this, but I assumed incorrectly.

The final FFMPEG configuration I FINALLY got to work was this one:
Code:
./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg  --enable-liba52 --enable-libmp3lame --enable-libfaad --enable-libfaac
So - I would recommend starting with just the first enable. It only takes a moment to figure out if you have the libraries installed or not. If it works, move on to the next one. Essentially we're just trying to figure out what you DON'T have installed. In my case, I had problems with the liba52, libfaad, and libfaac. Please also note if you haven't already installed LAME, you'll want to do that first. It's pretty easy to do and there are hundreds of threads explaining how.
The three libraries I was missing I conveniently found here:
http://atrpms.net/dist/f7/a52dec/
http://atrpms.net/dist/f7/faac/
http://atrpms.net/dist/f7/faad2/
Find your processor type and download the RPMs. There should be 3 or 4 files for each processor type and you'll need all of them. Also, you need to get them in order as they depend on one another as well.

As you save them to your local server, install the RPM packages.
Code:
rpm -ivh <filename>.rpm
If it fails, you probably went out of order. Read what it says and the RPM info should probably display the missing dependency.

Once these have been installed, you'll want to CLEANLY rebuild FFMPEG.

Run the following commands in order:
Code:
./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg  --enable-liba52 --enable-libmp3lame --enable-libfaad --enable-libfaac

make clean

make

make install
It should take quite a bit longer than you may have been noticing if you keep rebuilding it. That's simply because you probably weren't running the MAKE CLEAN first.
Now go back and give it a go. I used the following to test:
Code:
[root@localhost videos]# ffmpeg -y -i cimg3456.avi -f flv cimg3456.flv
Unfortunately, after running this one I had the following error:
ffmpeg: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory
Another pain in the *** (who stars out the word a s s???). After much searching, I found the following solution:
Add /usr/local/lib to /etc/ld.so.conf
I noticed a lot of forums simply said to add '/usr/local/lib' but don't really explain how to do it. If you don't know what to do, just edit the file with your favorite editor.
Code:
vim /etc/ld.so.conf
In the end, mine looked like this:
Code:
include ld.so.conf.d/*.conf
/usr/local/lib
I only added the second line in there.

Finally, run ldconfig:
Code:
/sbin/ldconfig
After that I went to test it and everything FINALLY worked. The FLV was made, the audio worked, etc. etc.

Hope this helps someone.
Reply With Quote
  #9 (permalink)  
Old 10-07-07, 02:03 PM
mezzanine mezzanine is offline
New Member
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Spin

Ludlow: I owe you my life.

Thank you! I've been banging my head up against this for quite some time now, not sure which part of your explanation helped but it did the job!

Configured with:

./configure --enable-gpl --enable-pp --enable-libmp3lame

I didn't need the three libs stated above, nor did I need ogg or vorbis - but I assume you will if you're going to use those codecs.

Note: A lot of guides will tell you to use --enable-mp3lame, I can only assume this is an old switch as it's no longer valid. --enable-libmp3lame worked a treat, along with Ludlow's help!
Reply With Quote
  #10 (permalink)  
Old 11-28-10, 08:31 PM
Tracey Low's Avatar
Tracey Low Tracey Low is offline
Newbie Coder
 
Join Date: Nov 2010
Posts: 5
Thanks: 3
Thanked 0 Times in 0 Posts
Thumbs up Very Useful Thread

I've had similar problems and just from following this thread I've managed to sort out the problem.
Thanks.

Last edited by Nico; 12-02-10 at 02:46 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert video to FLV through code Arctic The Lounge 7 08-01-10 10:33 PM
best method for flv playback in flash 8 shermski Flash & ActionScript 0 06-26-06 01:06 PM
FPS in SoCal – Software Engineer (Sound) DigitalMedia Job Offers & Assistance 0 03-22-06 07:19 PM
sound play hit counter aconeinc PHP 2 12-22-03 04:22 AM
Onmouseover sound help >.< ProcyWolfy JavaScript 1 08-07-03 02:11 PM


All times are GMT -5. The time now is 06:22 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.