JakeWharton / mkvdts2ac3

Bash script to convert DTS audio to AC3 within a matroska file.
Apache License 2.0
321 stars 60 forks source link

faad for aac support? #39

Open ecifer opened 13 years ago

ecifer commented 13 years ago

Hey there-

Great script, made the dts->ac3 conversion a breeze on my Snow Leopard machine. I was just wondering if you would consider adding additional input types, other than DTS? (Obviously the name of the script would become a little wonky then ;)

Using faad2, you can accomplish pretty much the same exact work as you did w/ dcadec, but for aac encodings instead of DTS.

If I'm not mistaken:

dcadec -o wavall "/mnt/media/tmp/Some.Random.Movie.dts" == faad -w "/mnt/media/tmp/Some.Random.Movie.aac"

JakeWharton commented 13 years ago

I had someone request AAC encoding as well (provided by faac). I'll try to take a look at a possible implementation over this long weekend.

ecifer commented 13 years ago

Sweet... it might make more sense in your new python'd version, but with so many codecs, it might just be worth it to make a "codec module"... eg. a simple extendable object which would store codec name, decoder location, decoder flags, encoder location, encoder flags... that way the end user could select i/o formats.

Then again, it might just be easier to support if you mandate the encoders and flags :)

choekstr commented 13 years ago

I did confirm this seems to work as straightforward as we would expect. The challenge is that right now the tools, mkvinfo and mkvextract only work on mkv files. So the AAC audio stream in my MKV file came out no problem.

However, of my 200 movies the majority of them with AAC audio tracks are mp4 or m4v files and I confirmed neither of the mkvtools listed above work with mp4 files.

This would be a fairly straight forward addition to the 1.5.2 branch as long as we limit it to MKV containers. Would this be of benefit or too limited?

JakeWharton commented 13 years ago

I like the idea of moving to a X-to-Y in a Z container in the distant future. Any container with appropriate and similarly-designed tools can be supported. Any audio codec can be decoded and encoded to and from each other as long as the tools exist.

The script operates in three distinct steps:

  1. Extract audio from the container
  2. Transcode the audio
  3. Remux the audio back into the container

There's no reason these steps can't be abstracted to support multiple tools.

This is obviously a very long-term goal.

Haefler1985 commented 5 years ago

Really interested in this feature (change aac 6 chanel to ac3 6 channel within mkv). I looked into the script but do not have a clou how and where to adopt.

I guess you changed from dcadec to ffmpeg. I also think ffmpeg also can do aac to ac3 but I need to change the script on many parts...