View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Aug 27, 2007 6:23 am 
Offline
Joined: Mon May 24, 2004 10:49 pm
Posts: 112
Location: Calgary, Alberta, Canada
I have a couple of previously recorded programs where the volume is just too low. They are the first two I recorded with Myth, before I got all the various places where the volume is set figured out.

When I play them back I have to turn the sound way up, but of course should I change back to regular TV, or another Myth recording, I'm blasted into the back wall.

They both have a high educational value for some volunteer work I do, and I'd like to have them properly burnt to DVDs. I tried hauling them over to my MicroFlacid box, demuxing, boosting the volume, then remuxing them before putting them back on the Myth box. They play ok on that box, but don't survive the transition to DVD after I've played with them. It doesn't surprise me, because there's a file format conversion in this process, and the resulting .m2a file quite a bit smaller than the original. Not to mention the seven or so steps required to perform this magic. I've kept the original files - pre-futzing - just in case it all went to hell.

I'm sure there must be some simpler way to do this - right on my Myth box, that will maintain the file integrity and audio sink of the original.

Any suggestions?


Top
 Profile  
 
PostPosted: Sun Sep 02, 2007 3:26 pm 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
I have a suggestion rather than a solution: Take a look at the 'transcode' command. You may be able to do a volume boost on an in-place transcodek maybe with the gain parameter ('-s').

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 03, 2007 12:43 am 
Offline
Joined: Mon May 24, 2004 10:49 pm
Posts: 112
Location: Calgary, Alberta, Canada
Thanks Human. I'll look into that.

I found that I can do it with ffmpeg, with a couple of little snags. I've been meaning to to do some more testing, and maybe try my hand at a script for a more general increase or decrease volume, producing samples from which the user can choose how much of an increase or decrease to apply.

The documentation for ffmpeg says the command should be:
Code:
ffmpeg -i infilename.mpg -vol XXX -acodec copy -vcodec copy outfilename.mpg

Current versions of ffmpeg seem to have a bug though.

I can easily make a small video sample with the -acodec copy (audio codec) and -vcodec copy (video codec), adding the -ss timecode (start time) and -t timecode (length of clip) parameters.

The -vol parameter's XXX is 256 for the same volume, larger numbers to increase, and smaller numbers to decrease the level. The combination of "-vol XXX -acodec copy" seems to produce a segfault in both Linux and Windows at the moment.

If I specify "-acodec mp2" - ie use the same codec as my Hauppauge _50 card is recording, the output bitrate defaults to 64 kbs. So I have to specify the -ab (audio bitrate) parameter as well - keeping it the same as the original. My gut says that's triggering a re-encoding that may cause some loss in quality, but it may have to do that just to increase the volume anyway. But hey, "some loss of quality" is better than "volume so low I have to crank the TV up to Max just to hear," that is my current situation with those particular recordings.

I assume I could make a script to glean the audio codec and audio bitrate from the original file, and then issue the ffmpeg command with those parameters correctly and automatically specified. I'm a beginner at linux scripting, so I haven't figured out the How, on that part yet.

For those of you following along at home, with glazed over eyes, and a headache from the confusing parameters, the current command that works is:
Code:
ffmpeg -i infilename.mpg -vol VVV -acodec mp2 -ab XXX -vcodec copy outfilename.mpg

VVV = some number over 256 to increase volmue
XXX = same audio bitrate as the source file
Your browser may have wrapped that onto two lines - it is typed as single command

To make a sample clip of say the first one minute of the recording with and increased or decreased volume, the command would be:
Code:
ffmpeg -i infilename.mpg -ss 0 -t 60 -vol VVV -acodec mp2 -ab XXX -vcodec copy outfilename.mpg
or
ffmpeg -i infilename.mpg -ss 00:00:00 -t 00:01:00 -vol VVV -acodec mp2 -ab XXX -vcodec copy outfilename.mpg


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu