Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
9th June 2010, 10:02 | #1 | Link |
Registered User
Join Date: Jan 2003
Location: Germany
Posts: 65
|
ac3 reencoding other options than BeSweet
Because I like to convert my PAL-TV-Recordings to the original movie lenght, I do a conversion to ntsc or recently to 24p too.
Because of the resulting different movie length, I have to at least reencode the ac3-audio streams. For audio-only reencoding, the only tool I found to do the Job is BeSweet. Of course, I need wine to to the job in linux. Googling furhter around, I am a little confused by threads like this: http://forum.doom9.org/showthread.php?t=127663. So questions: 1. Are there maybe better and newer, maybe native linux applications to do the job of changing the lenght of an audio-ac3-file? 2. Do I suffer from this ac3enc-bug (didn't notice so far and found the resulting sound accurate and soft). 3. Can I use aften only with the BeLight-Gui or with the commandline BeSweet as well? So far I can see aften itself cannot change the lenght of an audio-file? Last edited by bernd_b; 9th June 2010 at 10:47. |
9th June 2010, 22:38 | #2 | Link |
One click is all it takes
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
|
Some answers
1. Changing timelength inevitably requires re-encoding. I don't know of a native linux encoder that comes close to Aften for quality but as you know it alone won't do the timeshift. I would imagine ffmpeg would allow you to demux to wav whilst altering the framerate. You could then feed the wav file into Aften. 2. The ac3enc.dll shipped with the last release of BeSweet is nowhere close to Aften in terms of quality but it's all about what you're happy with. 3. You could try putting Kurtnoise's updated bsn.dll file in your BeSweet directory, along with a Windows compile of Aften. http://kurtnoise.free.fr/BeLight/bsn_20070513.zip http://aften.softpedia.com/ then navigate to your besweet directory and use a commandline along the lines of wine ./besweet.exe -core\( -input Extracted_audio_1.ac3 -output Encoded_audio_1.ac3 -logfile C:\temp\Encoded_audio_1.log \) -azid\( -g max \) -ota\( -r 25000 24000 \) -bsn\( -exe aften.exe -b 384 -6chnew -readtoeof 1 \) (note -6chnew only necessary for 5.1 streams - omit this for stereo) Alternatively, search for "eac3to wine" - see if you come up with anything useful. Last edited by Nick; 10th June 2010 at 00:04. |
10th June 2010, 11:58 | #3 | Link |
Registered User
Join Date: Jan 2003
Location: Germany
Posts: 65
|
Tank you very much for your answers.
As far as I understood ffmpeg is of no help because it is build to change the frame rate without altering the length (deinterlace, pull-up/down or simply dropping frames). I just want to revert the speed up - so changing length is intended. But It took me months to get mencoder to work for me - so maybe useful options of ffmpeg are still hiding from me ... Taking your infos into account, I'll think about trying two things: 1. Using windows-aften with beSweet as decribed in your post (although I still wonder why my ears won't find a problem with ac3enc.dll, maybe because I use a high bitrate like 448 anyway?) 2. I found out that sox has a promising option called "stretch" which claims to alter the lenght of an audio file without changing the pitch - this - together with aften - maybe will do the job I'm running nowadays with beSweet even native on linux? |
10th June 2010, 13:09 | #4 | Link | ||
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
MEncoder or some actual muxer tool is probably an easier option. For example, if you're muxing to Matroska, mkvmerge can change the framerate for you. Quote:
|
||
10th June 2010, 13:57 | #5 | Link | |
One click is all it takes
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
|
Quote:
With regards pitch, I agree with nm the that original speed-up will have increased pitch and so I used -ota( r... to do the slowdown in my example commandline, as this will lower pitch to what I assume is original level. -soundtouch( r... will slow down preserving pitch of your source. See which sounds best to you. Although native linux feels good, I suspect the two-phase process will be much slower than BeSweet under Wine. I remain convinced, however, that achieving this with native apps is well within the realms of possibility, if you desire to do so. Last edited by Nick; 10th June 2010 at 14:00. |
|
10th June 2010, 14:05 | #6 | Link | |
Registered User
Join Date: Jan 2003
Location: Germany
Posts: 65
|
Quote:
Concerning sox: There is an alternative option called "speed" which changes the lenght and the pitch ("like with an magnetic tape"). So there is a choice. Still have to try it anyway and yes - once you get it running beSweet is still a very attractive option. My biggest concern is if audio and video stays in sync - with beSweet, I never had to complain about this. So sox & co will have a hard battle on my pc... Besides all this my biggest surprise was that reencoding the compressed movie audio tracks is possible at all without noticeable quality loss. My greatest thanks to all these super master coder who supply us with aften, sox, beSweet, ac3enc.dll & Co !!!! Last edited by bernd_b; 10th June 2010 at 14:20. |
|
10th June 2010, 14:12 | #7 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
If Aften can read the input from stdin or a named pipe, it should be about as fast. Last edited by nm; 10th June 2010 at 14:16. |
|
10th June 2010, 19:37 | #8 | Link | |
One click is all it takes
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
|
Quote:
Although I seem to recall reading somewhere recently that sox calculates the supposed output size and writes a valid wav header to a pipe, whereas ffmpeg does not, so some experimentation might be in order. |
|
10th June 2010, 23:18 | #9 | Link |
One click is all it takes
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
|
OK. Well, with Aften, sox and ffmpeg installed from my distro's repositories, the following seem to work:
If your audio is already demuxed to an ac3 file, just use this as ffmpeg's input Code:
ffmpeg -i /path/to/capture.avi -f sox - | sox -p -t wav -r 48000 - tempo 0.96 | aften -b 224 -readtoeof 1 - output.ac3 ####(slow down retaining pitch) or ffmpeg -i /path/to/capture.avi -f sox - | sox -p -t wav -r 48000 - speed 0.96 | aften -b 224 -readtoeof 1 - output.ac3 ####(slow down with lowering of pitch) <edit>only tested with stereo source - may or may not need minor modification for 5.1</edit> Last edited by Nick; 10th June 2010 at 23:25. |
Tags |
ac3, aften, besweet, frame rate conversion |
Thread Tools | Search this Thread |
Display Modes | |
|
|