-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ffmpeg instead of dcadec #57
Comments
There's obviously a patch for that :) |
It serves another purpose, too:
ffmpeg:
Might be insignificant and limited by the disk throughput, though. However, it saves you at least from building aften (and possibly even libdca). On a Mac, MKVToolNIX can be grabbed precompiled (Mkvtoolnix -> Show Package Content -> Contents/MacOS, copy binaries to /usb/local/bin or whereever), so can ffmpeg (http://ffmpegmac.net/). rsync is AFAIR already shipped with Mac OS X. This is much more convenient and does not require Xcode at all. I made some minor improvements to the original patch, btw (FFMPEG=0 as default, check for aften only when --ffmpeg is not specified): http://pastebin.ca/2092535 |
Hi, There is another issue which could encourage the maintainer to adopt this patch in the mainstream; see here: |
Thanks for your work on this. I will try to take a look at getting this implemented in the next few weeks as I agree that it offers many improvements. |
I did some testing and this seems to work quite well. If my testing is correct, we would just need to replace: and change the checkdep from dcadec and aften to ffmpeg: |
Done in |
Seems to work on the few files I tested but the output is so darn verbose. And of course insert appropriate bitching about how ffmpeg doesn't follow normal conventions (no quiet mode, no progress, all output is STDERR for some reason, -vstats doesn't work for audio, etc) I had to do some extra work to get the output into a sane format. '-v 0' is supposed to quiet the output. It doesn't. Here is what we could use for the line to provide just a bit of feedback but strip out all the crap it insists on displaying:
This loses the progress bar but gets rid of all the ffmpeg default crud. I am working on a slick way of getting a progress bar without any of the ffmpeg output. It is looking promising... |
The only hypothetical issue which could arise is whether ffmpeg can process DTS without prior installation of libdca, I was too lazy to test that as we all have it installed already. |
ooh, good thought process. I just removed libdca-utils and libdca0 and aften from my system and I couldn't see anything wrong and it created a valid file that checks out on my normal set of sanity checks. I don't see any issues but then again those wacky OSX guys always come back with something we never think of. ;) |
This has to be just me, but when I attempt to run the updated script ffmpeg throws an error when trying to convert dts to ac3. Says the fps of stream 0 does not match, 47.95 >- 23.9. If I run mkvextract and have it pull out both the h.264 video and dts and then run the dts through ffmpeg it works just fine. |
what is the mkvextract command you are using and what is the ffmpeg command. Maybe the params we use are not optimal or there are better switches to use? Since we use mkvextract and ffmpeg to convert the process is the same, it must be the specifics that are the difference. |
Seems with the recent commit I no longer have this issue. Please disregard. Thanks! |
With the latest version (awk output), I get the same message as guy2545 about not matching fps. |
Ok, the message is not telling about the real problem. Unfiltered, ffmpeg says "Output file #0 does not contain any stream", which in my case is caused by the fact that it's not the audio stream that got extracted, but the video stream! |
Sorry for swamping this issue, but I know now what's going on. I installed a new version of the MKVToolnix GUI, which comes with command line executables reporting version 5.2.0. This version reports different track numbers than before! Installing and using the latest version from MacPorts (5.0.1), and all is well again! |
I will work on getting 5.2 installed and seeing if we can use a single cmdline for the old and new versions. I would hate to have to put version checking into the script and run different cmdlines based on which version is installed. I know on my 10.04 LTS Ubuntu I am stuck at 5.0.1 for automatic updating. I would imagine for quite some time we will have people with varying versions of mkvtoolnix suite and can't really mandate a particular version unless there is no other way. I will try to find another way... In the meantime everyone should use <5.1 or older mkvtoolnix |
Ah that explains it, I am running 5.2 on Ubuntu 11.10. What worked for me was to modified the mkvextract line to pull both the DTS track and the video track out (similar to the line below). Once I did that, I could pass the DTS track through ffmpeg and it would not complain about frame rates not matching. It works, but I don't know if it is the right way to do it. mkvextract tracks input.mkv 1:video.h264 2:audio.dts |
Ok, setup an ubuntu 11.10 install so I could use mkvtoolnix 5.2 and sure enough, they have switched the numbering scheme from 0-n to 1-n in mkvextract BUT NOT IN mkvmerge. WTF?!? So an example is: File 'test.mkv': container: Matroska Track ID 0: video (V_MPEG4/ISO/AVC) Track ID 1: audio (A_DTS) $ mkvextract tracks test.mkv 0:video.mpeg4 Error: No track with the ID 0 was found in the source file. Off to see if there is a bug filed for this and if not file one. This isn't the correct behavior. |
There IS a bug filed for this and it has already been fixed in the code and will be pushed out in 5.3 version. So the short answer is: Don't use mkvtoolnix 5.2 as it has a serious bug that breaks mkvdts2ac3.sh |
mkvtoolnix 5.2.1 is out and tested to work correctly in Ubuntu 11.10. If you are having errors with mkvextract then update to the latest version. I will leave this issue open for a while to ensure mkvextract plus the new ffmpeg method works for everyone and there are no more issues uncovered. |
Released as 1.6.0 |
Hi,
for me, dcadec fails on large files. It floods the terminal with "skip", and the ac3 file increases by 1MB in size every five minutes or so.
However, ffmpeg works as expected. Could you add a switch that uses ffmpeg instead of dcadec? The syntax would be:
ffmpeg -i FILE.dts -acodec ac3 -ac 6 -ab 640k FILE.ac3
Kind regards
The text was updated successfully, but these errors were encountered: