LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-25-2009, 12:32 PM   #1
Suppen
Member
 
Registered: Mar 2009
Distribution: Ubuntu, Linux Mint
Posts: 35

Rep: Reputation: 17
Increase audio volume on flv-file


I have a .flv-file with extremely low volume. I have to turn it to max to be able to hear anything. Is there any way to increase the audio volume on the file itself? I have tried separating the audio from the video, amplifying it, and combine them again. Took forever and reduced the quality of the video. Have also tried ffmpeg with the -vol option. The volume then became just fine, but again, the video sucked after the operation.
 
Old 12-25-2009, 05:05 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
The only way to permanently up the volume is to do what you're already doing, extract the audio, boost it, then recombine it with the video.

Since you don't give any details about how you're doing it, I can't say for sure about the video quality issue, except that the command you're using is obviously running it through a conversion also.

If you're keeping the same container format for the output, or another container format that's compatible with the video codec of the input, then you can simply copy the video stream as-is. In ffmpeg "-vcodec copy" should do it.

PS: I've never seen a "-vol" option in ffmpeg. What command did you use exactly?

Last edited by David the H.; 12-25-2009 at 05:11 PM.
 
Old 12-25-2009, 08:14 PM   #3
Suppen
Member
 
Registered: Mar 2009
Distribution: Ubuntu, Linux Mint
Posts: 35

Original Poster
Rep: Reputation: 17
It worked perfectly when adding the -vcodec copy. Here is the full command:

Code:
ffmpeg -i input.flv -vol 1280 -vcodec copy output.flv
The site i got it from said the -vol option was poorly documented. It uses binary volume percent, meaning 256 = 100%. It works fine.

Thanks. Problem solved.

Last edited by Suppen; 12-25-2009 at 08:24 PM.
 
1 members found this post helpful.
Old 12-26-2009, 08:13 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Thanks for the info. Poorly documented is right. It's not listed in the man page at all, nor can I find it listed in the ffmpeg website documentation.

It is mentioned at various places around the web though. I found this page with a list of all the ffmpeg cli options.
http://club.myce.com/f74/ffmpeg-comm...ptions-166608/

It says that vol=256 is the default setting. But I wonder what that means exactly. It would be nice if you could set it to a percentage of the input.

One caution. I discovered when testing it that without setting anything else my input audio changed from 192k mp3 to 64k mp2. You may need to watch it carefully to ensure that you're keeping the audio quality settings you want.
 
1 members found this post helpful.
Old 12-26-2009, 03:16 PM   #5
Suppen
Member
 
Registered: Mar 2009
Distribution: Ubuntu, Linux Mint
Posts: 35

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by David the H. View Post
One caution. I discovered when testing it that without setting anything else my input audio changed from 192k mp3 to 64k mp2. You may need to watch it carefully to ensure that you're keeping the audio quality settings you want.
You're right. According to the command 'ffmpeg -i input.flv', the sound changed from
Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 32 kb/s
to
Stream #0.1: Audio: adpcm_swf, 22050 Hz, mono, s16

I dont know much about audio, so I'm not sure what this means. Anyway, the quality is good enough for me. No annoying background noise, and I can clearly hear what's going on.
 
Old 12-26-2009, 10:26 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Well, in this case I don't think you need to worry too much, since pcm codecs are generally lossless (actually, I believe pcm itself isn't so much a codec as a specification for how to represent analog sound digitally).

You could have trouble if you need the file to be portable though, since it's possible that there are players not able to handle that codec.
 
Old 10-13-2010, 04:11 AM   #7
Maaaks
LQ Newbie
 
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by Suppen View Post
It worked perfectly when adding the -vcodec copy. Here is the full command:

Code:
ffmpeg -i input.flv -vol 1280 -vcodec copy output.flv
The site i got it from said the -vol option was poorly documented. It uses binary volume percent, meaning 256 = 100%. It works fine.

Thanks. Problem solved.

Thank you very much, it works! (And not only for SWF.)
 
Old 02-10-2012, 06:23 PM   #8
Nutria
Member
 
Registered: Nov 2007
Location: New Orleans, LA, USA
Distribution: Xubuntu
Posts: 67

Rep: Reputation: 6
Quote:
Originally Posted by Suppen View Post
It worked perfectly when adding the -vcodec copy. Here is the full command:

Code:
ffmpeg -i input.flv -vol 1280 -vcodec copy output.flv
The site i got it from said the -vol option was poorly documented. It uses binary volume percent, meaning 256 = 100%. It works fine.

Thanks. Problem solved.
It's still not documented in v0.9.1 but the post was just the thing I needed to increase the gain in some MP4s (w/ AC3 audio) I ripped from DVD.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg - flv Unsupported audio codec JavaNinja Linux - Software 15 06-02-2011 02:08 AM
Increase audio volume in Jaunty shaakunthala Linux - Desktop 3 08-18-2009 08:15 AM
[SOLVED] unable to extract audio from .flv adityavpratap Slackware 15 08-09-2009 07:47 AM
Mplayer and flv files: audio trouble Changes Linux - Software 4 03-20-2009 07:32 PM
Audio File volume/gain level issues jmikeneedham Ubuntu 3 04-29-2008 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:27 PM.

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
Open Source Consulting | Domain Registration