Log in

View Full Version : eac3to - libav vs ArcSoft DTS decoder problems


amgeex
7th September 2009, 05:57
Ok, I've spent all day trying to figure this out to no avail. I demuxed the main mpls from a bluray and here is the log:

eac3to v3.16
command line: eac3to.exe -demux ..\PLAYLIST\00100.mpls
------------------------------------------------------------------------------
M2TS, 2 video tracks, 3 audio tracks, 6 subtitle tracks, 3:06:27
1: Chapters, 44 chapters
2: VC-1, 1080p24 /1.001 (16:9)
3: VC-1, 480p24 /1.001 (3:2)
4: DTS Master Audio, English, 5.1 channels, 24 bits, 48khz, dialnorm: -4dB
(core: DTS, 5.1 channels, 24 bits, 1509kbps, 48khz, dialnorm: -4dB)
5: AC3, French, 5.1 channels, 448kbps, 48khz, dialnorm: -27dB
6: DTS Express, English, 2.0 channels, 16 bits, 192kbps, 48khz
7: Subtitle (PGS), English
8: Subtitle (PGS), French
9: Subtitle (PGS), Spanish
10: Subtitle (PGS), French
11: Subtitle (PGS), English
12: Subtitle (PGS), French
Creating file "00500 - Chapters.txt"...
[a05] Extracting audio track number 5...
[s10] Extracting subtitle track number 10...
[v02] Extracting video track number 2...
[a05] Removing AC3 dialog normalization...
[s12] Extracting subtitle track number 12...
[s09] Extracting subtitle track number 9...
[s08] Extracting subtitle track number 8...
[a04] Extracting audio track number 4...
[a04] Removing DTS dialog normalization...
[s11] Extracting subtitle track number 11...
[s07] Extracting subtitle track number 7...
[a04] Creating file "00500 - 4 - DTS Master Audio, English, 5.1 channels, 24 bits, 48khz.dtsma"...
[v02] Creating file "00500 - 2 - VC-1, 1080p24.vc1"...
[a05] Creating file "00500 - 5 - AC3, French, 5.1 channels, 448kbps, 48khz.ac3"...
[s12] Creating file "00500 - 12 - Subtitle (PGS), French.sup"...
[s11] Creating file "00500 - 11 - Subtitle (PGS), English.sup"...
[s07] Creating file "00500 - 7 - Subtitle (PGS), English.sup"...
[s08] Creating file "00500 - 8 - Subtitle (PGS), French.sup"...
[s09] Creating file "00500 - 9 - Subtitle (PGS), Spanish.sup"...
[a04] Audio overlaps for 7ms at playtime 0:00:04. <WARNING>
[a04] Audio overlaps for 7ms at playtime 0:05:41. <WARNING>
[a04] Audio overlaps for 10ms at playtime 0:20:45. <WARNING>
[a04] Audio overlaps for 9ms at playtime 0:44:59. <WARNING>
[a04] Audio overlaps for 12ms at playtime 0:52:07. <WARNING>
[a04] Audio overlaps for 9ms at playtime 0:54:11. <WARNING>
[a04] Audio overlaps for 6ms at playtime 1:00:59. <WARNING>
[a04] Audio overlaps for 8ms at playtime 1:24:20. <WARNING>
[a04] Audio overlaps for 10ms at playtime 1:26:25. <WARNING>
[a04] Audio overlaps for 8ms at playtime 1:57:19. <WARNING>
[a04] Audio overlaps for 6ms at playtime 2:19:29. <WARNING>
[a04] Audio overlaps for 6ms at playtime 2:22:18. <WARNING>
[a04] Audio overlaps for 7ms at playtime 2:34:53. <WARNING>
[a04] Audio overlaps for 5ms at playtime 2:59:30. <WARNING>
[a05] Audio overlaps for 28ms at playtime 0:00:04. <WARNING>
[a05] Audio overlaps for 13ms at playtime 0:02:38. <WARNING>
[a05] Audio overlaps for 26ms at playtime 0:05:41. <WARNING>
[a05] Audio overlaps for 20ms at playtime 0:20:45. <WARNING>
[a05] Audio overlaps for 20ms at playtime 0:44:59. <WARNING>
[a05] Audio overlaps for 14ms at playtime 0:47:27. <WARNING>
[a05] Audio overlaps for 20ms at playtime 0:52:07. <WARNING>
[a05] Audio overlaps for 30ms at playtime 0:54:11. <WARNING>
[a05] Audio overlaps for 27ms at playtime 1:00:59. <WARNING>
[a05] Audio overlaps for 19ms at playtime 1:24:20. <WARNING>
[a05] Audio overlaps for 20ms at playtime 1:26:25. <WARNING>
[a05] Audio overlaps for 8ms at playtime 1:57:19. <WARNING>
[a05] Audio overlaps for 28ms at playtime 2:19:29. <WARNING>
[a05] Audio overlaps for 28ms at playtime 2:22:18. <WARNING>
[a05] Audio overlaps for 28ms at playtime 2:34:53. <WARNING>
[a05] Audio overlaps for 23ms at playtime 2:41:30. <WARNING>
[a05] Audio overlaps for 24ms at playtime 2:43:55. <WARNING>
[a05] Audio overlaps for 23ms at playtime 2:59:30. <WARNING>
[s10] Creating file "00500 - 10 - Subtitle (PGS), French.sup"...
[a04] Starting 2nd pass...
[a04] Realizing DTS gaps...
[a04] Creating file "00500 - 4 - DTS Master Audio, English, 5.1 channels, 24 bits, 48khz.dtsma"...
[a05] Starting 2nd pass...
[a05] Realizing (E-)AC3 gaps...
[a05] Creating file "00500 - 5 - AC3, French, 5.1 channels, 448kbps, 48khz.ac3"...
Video track 2 contains 268251 frames.
Video track 3 contains 268251 frames.
Subtitle track 7 contains 2035 captions.
Subtitle track 8 contains 2134 captions.
Subtitle track 9 contains 1991 captions.
Subtitle track 10 contains 20 captions.
Subtitle track 11 contains 2378 captions.
Subtitle track 12 contains 2611 captions.
eac3to processing took 1 hour, 28 minutes.
Done.
You can see that the audio overlaps in several places, although eac3to seems to have fixed it. Or so I thought... If I extract the DTS core and mux it to my already-done x264 encode, the audio is out of sync in several places. So then I tried encoding the dts-ma track to AC3 with libav and it still doesn't work, same sync issues, here's the log:

eac3to v3.16
command line: eac3to audio.dtsma audio.ac3 -libav
------------------------------------------------------------------------------
DTS Master Audio, 5.1 channels, 24 bits, 48khz
(core: DTS, 5.1 channels, 24 bits, 1509kbps, 48khz)
The libav DTS decoder doesn't decode the full DTS-HD information. <WARNING>
Extracting DTS core...
Decoding with libav/ffmpeg...
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Creating file "audio.ac3"...
Clipping detected, a 2nd pass will be necessary. <WARNING>
The original audio track has a constant bit depth of 64 bits.
The libav DTS decoder doesn't decode the full DTS-HD information. <WARNING>
Starting 2nd pass...
Extracting DTS core...
Decoding with libav/ffmpeg...
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Creating file "audio.ac3"...
The processed audio track has a constant bit depth of 64 bits.
eac3to processing took 19 minutes, 51 seconds.
Done.
Now, I have the latest ArcSoft DTS decoder installed, so I thought, as to use the lossless data from the dts-ma track, I should use it. And the ac3 track it produces its out of sync, much like the dts core I extracted earlier, check the log:

eac3to v3.16
command line: eac3to audio.dtsma audio.ac3
------------------------------------------------------------------------------
DTS Master Audio, 5.1 channels, 24 bits, 48khz
(core: DTS, 5.1 channels, 24 bits, 1509kbps, 48khz)
Decoding with ArcSoft DTS Decoder...
Encoding AC3 <640kbps> with libAften...
Creating file "audio.ac3"...
The original audio track has a constant bit depth of 24 bits.
eac3to processing took 29 minutes, 43 seconds.
Done.
Why is it that when decoding with libav the clipping/overlaps are detected and (seemingly) corrected, but its still out of sync? Why is it that when extracting the dts core or encoding to ac3 with the arcsoft decoder the same happens? Is there a way to force the clipping/overlapping correction? Whan can I do if I want to use the arcsoft dts decoder and get a dolby digital compliant ac3 track?

Thanks in advance! :thanks:

Snowknight26
7th September 2009, 06:21
Maybe it's the way that you're joining the video (if at all.. the multiple overlaps suggest a seamlessly branched Blu-ray) that is causing it to be out of sync?

tebasuna51
7th September 2009, 12:29
...
and mux it to my already-done x264 encode, the audio is out of sync in several places.
But, you use the extracted vc1 by eac3to to obtain the h264 with a frame accurate method?
If you use other, contains 268251 frames at 24/1.001 fps?
Your problem seems related with the video conversion.
The audio is more simple and seems ok.

So then I tried encoding the dts-ma track to AC3 with libav and it still doesn't work, same sync issues, ...
Of course, all the audio extracted must be in sync, then you have problems with all the tracks and cores no matter if you transcode to other format with different decoders/encoders.

Why is it that when decoding with libav the clipping/overlaps are detected and (seemingly) corrected, but its still out of sync?
Don't mistake clipping with overlaps. Clipping affect only to volume, overlaps to sync

Why is it that when extracting the dts core or encoding to ac3 with the arcsoft decoder the same happens?
Because the audio extracted is coherent and have always the same duration. I think your problem is with video duration.

Is there a way to force the clipping/overlapping correction?
The second pass for clipping/overlapping correction is done by default, you can avoid the second pass with the parameter: -no2ndpass

Whan can I do if I want to use the arcsoft dts decoder and get a dolby digital compliant ac3 track?
You must buy a Dolby Digital certified encoder and see the allowed input formats:
- If need monowavs you can use:
eac3to input.dtsma mono.wavs

- If accept w64 format (like wav but > 4GB, needed here):
eac3to input.dtsma output.w64

But the audio duration obtained is the same than use Aften

amgeex
7th September 2009, 19:57
I did use the vc1 video track eac3to extracted as source for the video encode, resulting in an mkv with the same duration as the audio track and with the same framerate, 23.976 fps. I'm muxing the tracks with the latest mkvmerge, version 2.9.8 and it has always worked without problems. Reviewing the encode log I noticed that the frame number is higher and it reports 23.98 as fps, not 23.976. Could this be the problem? Here's the x264 encode log:

[Information] Log for job1 (video, video.avs -> video.mkv)
-[Information] [9/5/2009 10:48:14 AM] Started handling job
-[Information] [9/5/2009 10:48:14 AM] Preprocessing
-[NoImage] Job commandline: "F:\Program Files\MeGUI\tools\x264\x264.exe" --profile high --crf 18.0 --level 4.1 --ref 12 --no-fast-pskip --bframes 4 --b-adapt 2 --b-pyramid --deblock -3:-3 --subme 9 --trellis 2 --psy-rd 1.0:0.4 --partitions all --me umh --merange 24 --threads 4 --thread-input --aq-strength 0.8 --sar 1:1 --no-dct-decimate --output "video.mkv" "video.avs" --direct auto
-[Information] [9/5/2009 10:48:15 AM] Encoding started
-[NoImage] Standard output stream
-[NoImage] Standard error stream
--[NoImage] avis [info]: 1280x532 @ 23.98 fps (268296 frames)
--[NoImage] x264 [warning]: width or height not divisible by 16 (1280x532), compression will suffer.
--[NoImage] x264 [warning]: b-pyramid + mb-tree is not supported
--[NoImage] x264 [info]: using SAR=1/1
--[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
--[NoImage] x264 [info]: profile High, level 4.1
--[NoImage]
--[NoImage] x264 [info]: frame I:3179 Avg QP:15.56 size: 77377
--[NoImage] x264 [info]: frame P:80522 Avg QP:18.70 size: 30776
--[NoImage] x264 [info]: frame B:184595 Avg QP:21.04 size: 10012
--[NoImage] x264 [info]: consecutive B-frames: 1.5% 8.2% 45.0% 14.1% 31.2%
--[NoImage] x264 [info]: mb I I16..4: 17.6% 68.9% 13.5%
--[NoImage] x264 [info]: mb P I16..4: 2.9% 10.6% 1.6% P16..4: 43.4% 16.8% 16.3% 0.4% 0.8% skip: 7.1%
--[NoImage] x264 [info]: mb B I16..4: 0.1% 1.7% 0.3% B16..8: 36.2% 1.4% 2.0% direct: 7.9% skip:50.4% L0:39.2% L1:42.8% BI:17.9%
--[NoImage] x264 [info]: 8x8 transform intra:72.1% inter:48.6%
--[NoImage] x264 [info]: direct mvs spatial:98.9% temporal:1.1%
--[NoImage] x264 [info]: coded y,uvDC,uvAC intra:78.5% 86.7% 59.2% inter:26.6% 33.0% 11.1%
--[NoImage] x264 [info]: ref P L0 62.9% 13.7% 8.3% 3.9% 3.0% 2.3% 1.9% 1.0% 0.9% 0.8% 0.7% 0.6%
--[NoImage] x264 [info]: ref B L0 73.7% 10.4% 5.5% 2.9% 2.1% 1.6% 1.3% 0.8% 0.7% 0.6% 0.5%
--[NoImage] x264 [info]: kb/s:3269.3
--[NoImage] encoded 268296 frames, 3.35 fps, 3269.39 kb/s
-[Information] Final statistics
--[NoImage] Constant Quality Mode: Quality 18 computed...
--[NoImage] Video Bitrate Obtained (approximate): 3272 kbit/s
-[Information] [9/6/2009 9:03:27 AM] Postprocessing
--[Information] Deleting intermediate files
-[Information] [9/6/2009 9:03:27 AM] Job completed

Snowknight26
7th September 2009, 20:18
The framerate is probably correct, just displayed rounded up. The frame count on the other hand.. sounds like an avs issue, probably caused by DirectShowSource and not using a custom graph.

amgeex
7th September 2009, 20:36
I am using a custom graph, here's the avisynth script:

DirectShowSource("video.grf", Audio=false, Fps=23.98)
ConvertToYV12()
# resizeCalc Avisynth
# pixels = 680960, DAR error = 0
# Crop(Left, top, -right, -Bottom)
Crop(0,140,-0,-142) # 1920x798(-2px)
Spline36resize(1280,532) # (modw4,modh4)
# x264 --sar 1333:1000

Snowknight26
7th September 2009, 21:13
It would be best to add AssumeFPS(24000,1001) in there somewhere, but that won't fix the frame count issue. What does your graph look like?

amgeex
7th September 2009, 22:32
The graph looks like this:

http://img233.imageshack.us/img233/485/grapha.th.png (http://img233.imageshack.us/i/grapha.png/)

Snowknight26
7th September 2009, 23:31
Try using a different decoder or specify the correct framecount in DirectShowSource.

amgeex
7th September 2009, 23:56
Ok, I'll give those options a shot and see what happens, thanks for all the help so far! ;0)

amgeex
8th September 2009, 13:13
New encode, here's the log, the framecount is now correct and audio is in sync, maybe the keyframe and gop settings had something to do with it:

[Information] Log for job2 (video, video.avs -> video.mkv)
-[Information] [9/7/2009 6:09:39 AM] Started handling job
-[Information] [9/7/2009 6:09:39 AM] Preprocessing
-[NoImage] Job commandline: "F:\Program Files\MeGUI\tools\x264\x264.exe" --profile high --crf 18.0 --level 4.1 --keyint 240 --min-keyint 24 --ref 12 --no-fast-pskip --bframes 4 --b-adapt 2 --b-pyramid --direct auto --deblock -3:-3 --subme 9 --trellis 2 --psy-rd 1.0:0.4 --partitions all --me umh --merange 24 --threads 4 --thread-input --aq-strength 0.8 --sar 1:1 --no-dct-decimate --output "video.mkv" "video.avs" --direct auto
-[Information] [9/7/2009 6:09:40 AM] Encoding started
-[NoImage] Standard output stream
-[NoImage] Standard error stream
--[NoImage] avis [info]: 1280x532 @ 23.98 fps (268251 frames)
--[NoImage] x264 [warning]: width or height not divisible by 16 (1280x532), compression will suffer.
--[NoImage] x264 [warning]: b-pyramid + mb-tree is not supported
--[NoImage] x264 [info]: using SAR=1/1
--[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
--[NoImage] x264 [info]: profile High, level 4.1
--[NoImage]
--[NoImage] x264 [info]: frame I:3217 Avg QP:15.57 size: 77770
--[NoImage] x264 [info]: frame P:80547 Avg QP:18.70 size: 30782
--[NoImage] x264 [info]: frame B:184487 Avg QP:21.04 size: 10008
--[NoImage] x264 [info]: consecutive B-frames: 1.5% 8.2% 45.1% 14.1% 31.1%
--[NoImage] x264 [info]: mb I I16..4: 17.6% 68.9% 13.5%
--[NoImage] x264 [info]: mb P I16..4: 2.8% 10.6% 1.6% P16..4: 43.3% 16.8% 16.3% 0.4% 0.8% skip: 7.2%
--[NoImage] x264 [info]: mb B I16..4: 0.1% 1.7% 0.3% B16..8: 36.2% 1.4% 2.0% direct: 7.9% skip:50.4% L0:39.2% L1:42.8% BI:18.0%
--[NoImage] x264 [info]: 8x8 transform intra:72.3% inter:48.6%
--[NoImage] x264 [info]: direct mvs spatial:98.9% temporal:1.1%
--[NoImage] x264 [info]: coded y,uvDC,uvAC intra:78.6% 86.9% 59.4% inter:26.6% 33.0% 11.1%
--[NoImage] x264 [info]: ref P L0 62.9% 13.7% 8.4% 3.9% 3.0% 2.3% 1.8% 1.0% 0.9% 0.8% 0.7% 0.6%
--[NoImage] x264 [info]: ref B L0 73.8% 10.4% 5.5% 2.8% 2.1% 1.6% 1.3% 0.8% 0.7% 0.6% 0.5%
--[NoImage] x264 [info]: kb/s:3271.9
--[NoImage] encoded 268251 frames, 3.42 fps, 3271.95 kb/s
-[Information] Final statistics
--[NoImage] Constant Quality Mode: Quality 18 computed...
--[NoImage] Video Bitrate Obtained (approximate): 3274 kbit/s
-[Information] [9/8/2009 3:57:34 AM] Postprocessing
--[Information] Deleting intermediate files
-[Information] [9/8/2009 3:57:34 AM] Job completed