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.

 

Go Back   Doom9's Forum > General > Audio encoding

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 23rd November 2008, 15:21   #7101  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by himan2001 View Post
There are a lot more "old" BD Releases which contains seemless branching and "splitted" Releases that produce Audio-Spikes
and loud noise at the cutting/fixxing Points after timecode-rerun

Something is borked when using DTS, no matter if itīs Arcsoft or Sonic. With AC3-Track splitting/joining is ok.

As i can remember, the same BDīs using an older eac3to version < 2.58 doesnīt produce this errors.

A good try will be Conair/German BD. Try to assemble
the GERMAN DTS Track. On the cut point there is a loud
spike on the decoded file (destination format can be WAV or AC3 - result is the same)
This should finally be fixed in the next build. The problem was caused by the RAW/PCM gap/overlap fixing code. The code was working just fine, but due to how LPCM sampling curves work, just removing a number of audio samples from an audio track can result in spikes. This problem doesn't seem to occur if the gap fixing is done on the AC3/DTS bitstream. Now the next version will contain a new post processing filter which will adjust the audio signal 0.5ms before and after the m2ts join points to make sure that there are no spikes in the final audio stream...
madshi is offline  
Old 23rd November 2008, 18:12   #7102  |  Link
bigotti5
Spielberger
 
bigotti5's Avatar
 
Join Date: Feb 2005
Posts: 838
Can you correct delay calculation in the next build?
Closed GOPs at the beginning of a stream are misinterpreted in eac3to.
eac3to calculates delay from first I-frame, but this I-frame is third in presentation order, so -66 ms for NTSC and -80 ms for PAL is calculated.
Quote:
TS, 1 video track, 1 audio track, 0:00:03
1: MPEG2, 480p30 /1.001 (4:3)
2: AC3, 5.1 channels, 448kbps, 48khz, dialnorm: -27dB, -66ms

----
File Name: closed_gop.ts
File Size: 3 533 272
Stream Type: Transport
Packets Count: 19332

.....
.....
0x00002400 PES Packet { stream_id = 0xE0 (video stream)}
packet_length = 0
PES_scrambling_control = 0
PES_priority = 0
data_alignment_indicator = 1
copyright = 0
original_or_copy = 0
PTS_DTS_flags = 3
ESCR_flag = 0
ES_rate_flag = 0
DSM_trick_mode_flag = 0
additional_copy_info_flag = 0
PES_CRC_flag = 0
PES_extension_flag = 0
PES_header_data_length = 10
PTS = 0: 10: 0: 066 (54 006 006)
DTS = 0: 9: 59: 966 (53 996 997)

0x00002413 Sequence Header
horizontal_size_value = 720
vertical_size_value = 480
aspect_ratio_information = 2 (0.673500)
frame_rate_code = 4 (29.970000)
bit_rate_value = 22500 (9000000)
marker_bit = 1
vbv_buffer_size = 112
constrained_parameters_flag = 0
load_intra_quantiser_matrix = 0
load_non_intra_quantiser_matrix = 0

0x0000241F Sequence Extention
profile_and_level_indication = 72 (Main@Main)
progressive_sequence = 1
chroma_format = 1 (4:2:0)
horizontal_size_extension = 0
vertical_size_extension = 0
bit_rate_extension = 0
marker_bit = 1
vbv_buffer_size_extension = 0
low_delay = 0
frame_rate_extension_n = 0
frame_rate_extension_d = 0

0x00002429 Sequence Display Extention
video_format = 2
colour_description = 1
colour_primaries = 6
transfer_characteristics = 6
matrix_coefficients = 6
display_horizontal_size = 720
marker_bit = 1
display_vertical_size = 480

0x00002435 User Data {}

0x00002487 Group of Picture Header #0
time = 0:0:0:0 closed_gop = 1
broken_link = 0

0x0000248F Picture Header - I Frame #0
temporal_reference = 2
picture_coding_type = 1
vbv_delay = 65535

0x00002497 Picture Coding Extention
f_code[0][0] = 15
f_code[0][1] = 15
f_code[1][0] = 15
f_code[1][1] = 15
intra_dc_precision = 2
picture_structure = 3 (Frame picture)
top_field_first = 1
frame_pred_frame_dct = 1
concealment_motion_vectors = 0
q_scale_type = 0
intra_vlc_format = 1
alternate_scan = 0
repeat_first_field = 0
chroma_420_type = 1
progressive_frame = 1
composite_display_flag = 0

.......
.......

0x00013BC8 Transport Packet { PID = 0x1011, Payload = Yes (184), Counter = 14, Start indicator }

0x00013BCC PES Packet { stream_id = 0xE0 (video stream)}
packet_length = 26939
PES_scrambling_control = 0
PES_priority = 0
data_alignment_indicator = 1
copyright = 0
original_or_copy = 0
PTS_DTS_flags = 2
ESCR_flag = 0
ES_rate_flag = 0
DSM_trick_mode_flag = 0
additional_copy_info_flag = 0
PES_CRC_flag = 0
PES_extension_flag = 0
PES_header_data_length = 5
PTS = 0: 10: 0: 000 (54 000 000)
0x00013BDA Picture Header - B Frame #1
temporal_reference = 0picture_coding_type = 3
vbv_delay = 65535
full_pel_forward_vector = 0
forward_f_code = 7
full_pel_backward_vector = 0
backward_f_code = 7

0x00013BE3 Picture Coding Extention
f_code[0][0] = 1
f_code[0][1] = 1
f_code[1][0] = 1
f_code[1][1] = 1
intra_dc_precision = 2
picture_structure = 3 (Frame picture)
top_field_first = 1
frame_pred_frame_dct = 1
concealment_motion_vectors = 0
q_scale_type = 0
intra_vlc_format = 0
alternate_scan = 0
repeat_first_field = 0
chroma_420_type = 1
progressive_frame = 1
composite_display_flag = 0
.....
.....
0x0001A7C0 PES Packet { stream_id = 0xFD (extended_stream_id)}
packet_length = 1803
PES_scrambling_control = 0
PES_priority = 0
data_alignment_indicator = 1
copyright = 0
original_or_copy = 0
PTS_DTS_flags = 2
ESCR_flag = 0
ES_rate_flag = 0
DSM_trick_mode_flag = 0
additional_copy_info_flag = 0
PES_CRC_flag = 0
PES_extension_flag = 1
PES_header_data_length = 8
PTS = 0: 10: 0: 000 (54 000 000)

0x0001A7D1 AC3 Frame
SyncInfo():
CRC1 = 22870
fscod = 0
frmsizecod = 30
SamplingRate = 48000
FrameSize = 1792
BitRate = 448000
Duration = 0.032000
BSI():
bsid = 8
bsmod = 0
acmod = 7
cmixlev = 0
surmixlev = 0
lfeon = 1
dialnorm = 27
compre = 1
compr = 4
langcode = 0
Channels = 6
Here is the above examble

eac3to should calculate either from GOP header or PTS from b-picture with temporal_reference = 0

Same in h264 files. My Sony AVCHD Cam e.g. creates h264 streams with 2 b-frames at the beginnung of the stream.
bigotti5 is offline  
Old 23rd November 2008, 18:22   #7103  |  Link
rickardk
Registered User
 
Join Date: Jul 2007
Posts: 259
Quote:
Originally Posted by madshi View Post
Which movie is that? The warning means what it says: The ArcSoft decoder decodes this track correctly, but it lowers the volume a bit. You can more or less undo the volume change by adding "+3db" to the eac3to command line. However, perfect losslessness is lost in any case.

Why does ArcSoft lower the volume? Don't ask me. It's caused by the speaker mapping the studio has chosen. DTS-HD supports a big number of different speaker mappings for 7.1 streams. There are at least 3 different mappings the ArcSoft decoder decodes perfectly. But this specific speaker mapping used for this track seems to confuse the ArcSoft decoder, which makes it decode the track with lower volume. It's not a terribly bad thing, it's more or less similar to the effect DialNorm has. If you want, you can report this problem to the ArcSoft guys (together with a small sample). Should be easy for them to fix. Just ask them to decode the sample as 5.1 and then as 7.1. The 7.1 decoding volume will be lower, which doesn't really make any sense. With almost every other 7.1 track on the planet the 7.1 decoding volume is not lower. You can use "-logdts" to see which speaker mappings a specific 7.1 DTS-HD track uses...
Sin City (Swedish).
So ArcSoft will lower all channels with 3dB during decoding?

I will try to find where I can send the ArcSoft guys a sample.


with logdts switch:
F:\>eac3to sample.m2ts 3: e:\sample.flac -logdts
+ DTS-Core
- frameSize 2012
- DTS-ES -
- channelNo 5
- lfe 1
- channelDescr 5.1
- samplingRate 48000
- bitDepth 24
- bitrate 1536000
- samplesPerFrame 512
- copyHistory 1
+ DTS-HD
- fullSize 84
- headerSize 32
- refClockCode 1/48000
- frameDurationCode 1
- activeMasks [1], [[1]]
+ Asset [0]
- fullSize 52
- headerSize 14
- corePackets Core
- extSubStrPackets XLL
- bitResolution 24
- maxSampleRate 48000
- totalNumChannels 8
- activeSpeakers C L R Ls Rs LFE Lsr Rsr ($4f)
M2TS, 1 video track, 2 audio tracks, 4 subtitle tracks, 0:00:26
1: h264/AVC, 1080p24 /1.001 (16:9)
2: AC3, 5.1 channels, 640kbps, 48khz
3: DTS Master Audio, 7.1 (strange setup) channels, 24 bits, 48khz
(core: DTS, 5.1 channels, 24 bits, 1536kbps, 48khz)
4: Subtitle (PGS)
5: Subtitle (PGS)
6: Subtitle (PGS)
7: Subtitle (PGS)
CAUTION: Decoding this track with ArcSoft results in low volume.
rickardk is offline  
Old 23rd November 2008, 18:47   #7104  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by bigotti5 View Post
Can you correct delay calculation in the next build?
Look two comments above yours. I already replied to you there. Delay should be correct with the next build. At least the current work in progress sources don't report any audio delay for both of your samples...

Quote:
Originally Posted by rickardk View Post
So ArcSoft will lower all channels with 3dB during decoding?
With this specific track: Yes. With most other 7.1 tracks: No.
madshi is offline  
Old 23rd November 2008, 19:45   #7105  |  Link
bigotti5
Spielberger
 
bigotti5's Avatar
 
Join Date: Feb 2005
Posts: 838
Quote:
Look two comments above yours. I already replied to you there. Delay should be correct with the next build. At least the current work in progress sources don't report any audio delay for both of your samples...
Sorry..overlooked and big thanks for your appreciated work.
bigotti5 is offline  
Old 23rd November 2008, 23:32   #7106  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
eac3to v2.78 released

http://madshi.net/eac3to.zip

Code:
* fixed: h264 interlaced muxing to MKV could result in too long runtime
* fixed: transcoding DTS-HD/E-AC3 core sometimes failed to work correctly
* improved TS/m2ts audio delay detection
* added filter to remove spikes when fixing gaps/overlaps in RAW/PCM audio
* each eac3to instance has its own log file now
* playlist output now also works with "-log" option
* default bitrate for mono & stereo AC3 encodes lowered to 448kbps
* default bitrate for mono & stereo DTS encodes lowered to 768kbps
* it should be possible to handle TsSplitter splitted TS files via "+" now
madshi is offline  
Old 24th November 2008, 00:07   #7107  |  Link
nwg
Registered User
 
Join Date: Mar 2004
Posts: 819
Thanks for the new version.
nwg is offline  
Old 24th November 2008, 01:31   #7108  |  Link
Chumbo
Registered User
 
Chumbo's Avatar
 
Join Date: Feb 2005
Posts: 585
Quote:
Originally Posted by madshi View Post
eac3to v2.78 released

http://madshi.net/eac3to.zip

Code:
...
* each eac3to instance has its own log file now
...
Thanks so much for all the fixes and improvements and especially for adding this one. Much appreciated.
__________________
Chumbo
Chumbo is offline  
Old 24th November 2008, 02:28   #7109  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,197
Quote:
Originally Posted by madshi View Post
eac3to v2.78 released
thanks! will test those interlaced h264 movies during the week!

regarding that improved m2ts audio delay correction, have there been any problems (maybe also such which werent indicated by the log?) and it was a fix, or just more like getting the already fine working detection (for most movies) more towards perfection?
Thunderbolt8 is offline  
Old 24th November 2008, 08:18   #7110  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by Thunderbolt8 View Post
regarding that improved m2ts audio delay correction, have there been any problems (maybe also such which werent indicated by the log?) and it was a fix, or just more like getting the already fine working detection (for most movies) more towards perfection?
Check out bigotti5's last two posts in this thread. Delay correction itself worked just fine, but delay detection was off by 2 video frames in two samples he provided. I think this problem only occurred with some movies, though, not with all. I think most Blu-Ray movies shouldn't have this problem.
madshi is offline  
Old 24th November 2008, 08:35   #7111  |  Link
bigotti5
Spielberger
 
bigotti5's Avatar
 
Join Date: Feb 2005
Posts: 838
Thx - works in ts-streams.
------------
Delay correction in VOB files regarding closed GOP:
- Closed GOP Video - 2 leading B-frames
- Audio AC3 - no delay
eac3to reports:
Quote:
VOB, 1 video track, 1 audio track, 0:00:08
1: MPEG2, 704x576 50i (4:3)
2: AC3, 2.0 channels, 192kbps, 48khz, dialnorm: -27dB, 3ms
in VOB files delay should be calculated using 'PTS first audio' and 'Vobu Start Presentation Time'
bigotti5 is offline  
Old 24th November 2008, 10:48   #7112  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Small feature request:
Could you make the bitrate switch "-xxx" also work with the nero aac encoder? That would save me some typing.
nurbs is offline  
Old 24th November 2008, 10:53   #7113  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by bigotti5 View Post
Delay correction in VOB files regarding closed GOP:
- Closed GOP Video - 2 leading B-frames
- Audio AC3 - no delay
eac3to reports:

in VOB files delay should be calculated using 'PTS first audio' and 'Vobu Start Presentation Time'
Are you sure about that? What happens if:

- vobu start presentation time: X
- PTS first audio: X + 10ms
- PTS first video: X + 5ms

Now if you demux audio and video, audio should be delayed by 5ms and not by 10ms, or am I wrong? I can't "delay" video, so I have to delay audio by the difference between first audio and video PTS, no?

Quote:
Originally Posted by nurbs View Post
Could you make the bitrate switch "-xxx" also work with the nero aac encoder? That would save me some typing.
Using CBR for AAC encoding is not really a good thing for quality. VBR encoding gives better quality per average bitrate. So why would you want to use CBR?
madshi is offline  
Old 24th November 2008, 11:24   #7114  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by madshi View Post
I'm still waiting for a reply from a guy who compares a lot of resampling algorithms.
madshi,
This "guy" is not me, am I?
I'm still working on my resampler's test, and it could take a while to finish it, I have to do a few things first.
But my first test gave some interesting results, I only don't know if the results are valid enough...
yesgrey is offline  
Old 24th November 2008, 11:55   #7115  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by yesgrey3 View Post
This "guy" is not me, am I?
I'm still working on my resampler's test, and it could take a while to finish it, I have to do a few things first.
But my first test gave some interesting results, I only don't know if the results are valid enough...
I meant the maintainer of this comparison website:

http://src.infinitewave.ca/

He gave me some feedback on my early SSRC implementation, based on which I tweaked the SSRC parameters a bit.

But I'm still interesting in your comparison, too. Would be nice if you could use the latest eac3to version, because of the tweaked SSRC parameters...

As far as I understand the technical comparison website above, SSRC is a rather steep resampling filter with good results, but with "normal" ringing. r8brain filters out quite a lot of the high frequencies, but on the positive side r8brain has very reduced ringing (see pulse graph). So both filters have their advantages and disadvantages, technically.
madshi is offline  
Old 24th November 2008, 12:11   #7116  |  Link
bigotti5
Spielberger
 
bigotti5's Avatar
 
Join Date: Feb 2005
Posts: 838
Quote:
Are you sure about that? What happens if:

- vobu start presentation time: X
- PTS first audio: X + 10ms
- PTS first video: X + 5ms
not possible - vobu start presentation time == start time of first video frame (presentation order)
bigotti5 is offline  
Old 24th November 2008, 12:17   #7117  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by bigotti5 View Post
not possible - vobu start presentation time == start time of first video frame (presentation order)
Is that written in some documentation/specification? You seem to be very sure about it. Thanks...
madshi is offline  
Old 24th November 2008, 12:42   #7118  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
Originally Posted by madshi View Post
Using CBR for AAC encoding is not really a good thing for quality. VBR encoding gives better quality per average bitrate. So why would you want to use CBR?
Because sometimes I need to hit a certain filesize. I have no problem with quality based encoding as the default, but adding the option isn't much work and it would save me some typing compared to manually piping the stdout from eac3to to the nero encoder.
nurbs is offline  
Old 24th November 2008, 12:58   #7119  |  Link
bigotti5
Spielberger
 
bigotti5's Avatar
 
Join Date: Feb 2005
Posts: 838
Quote:
Is that written in some documentation/specification?
5000$ + Non Disclosure Agreement....

But look in "Philips DVD Verifier" documentation page 127
Quote:
[A3] A VOBU‘s video presentation start time is given by the presentation start time of its first picture in DISPLAY ORDER ! Notice that in coding order this first picture (which is always an I-picture) may be preceded by some B-pictures.
bigotti5 is offline  
Old 24th November 2008, 13:20   #7120  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by nurbs View Post
Because sometimes I need to hit a certain filesize. I have no problem with quality based encoding as the default, but adding the option isn't much work and it would save me some typing compared to manually piping the stdout from eac3to to the nero encoder.
Ok, will add that to my to do list.

Quote:
Originally Posted by bigotti5 View Post
5000$ + Non Disclosure Agreement....

But look in "Philips DVD Verifier" documentation page 127
Thanks!! Would you mind uploading the first part of that "3ms" VOB sample?
madshi is offline  
Closed Thread

Tags
eac3to

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.