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

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd December 2017, 12:56   #14541  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,384
Cut all tracks of a container without recode (VideoReDo or similar can recode only boundaries) at a exact point need:

- The time point is a exact multiple of audio framelength. Here, with AC3 48 Khz, 8000 ms are 250 x 32 ms, then cut the first 250 frames.

- The time point is a exact multiple of video framelength. If video have 25 fps you can cut the first 8000 / 25 = 320 frames, but you need than the 321 frame was a Keyframe.
With other fps or without a Keyframe at exact point you can't cut exactly without recode.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 2nd December 2017, 13:10   #14542  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,492
But the problem of mtamimi here is not cutting at an arbitraty timecode. It is cutting at the audio frame where the channel layout changes. And it is knowing the position of that audio frame, not in milliseconds, but in audio frame number. And you already suggested SplitAc3 for this job. All is fine.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 2nd December 2017, 13:45   #14543  |  Link
mtamimi
Registered User
 
Join Date: Jun 2007
Posts: 43
Quote:
Originally Posted by tebasuna51 View Post
Cut all tracks of a container without recode (VideoReDo or similar can recode only boundaries) at a exact point need:

- The time point is a exact multiple of audio framelength. Here, with AC3 48 Khz, 8000 ms are 250 x 32 ms, then cut the first 250 frames.

- The time point is a exact multiple of video framelength. If video have 25 fps you can cut the first 8000 / 25 = 320 frames, but you need than the 321 frame was a Keyframe.
With other fps or without a Keyframe at exact point you can't cut exactly without recode.
"VideoReDo or similar can recode only boundaries" << Does this make a difference?

"you can't cut exactly without recode."
mtamimi is offline   Reply With Quote
Old 2nd December 2017, 19:54   #14544  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,384
Quote:
Originally Posted by mtamimi View Post
"VideoReDo or similar can recode only boundaries" << Does this make a difference?
Recode always lose quality, but it's the best choice if you need that cut.

If you need more info please open a thread in video subforum, is off topic here.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 2nd December 2017, 20:14   #14545  |  Link
mtamimi
Registered User
 
Join Date: Jun 2007
Posts: 43
Quote:
Originally Posted by tebasuna51 View Post
Recode always lose quality, but it's the best choice if you need that cut.
Does not worth it. I prefer the 8s silence...
mtamimi is offline   Reply With Quote
Old 5th December 2017, 17:59   #14546  |  Link
ashlar42
Registered User
 
Join Date: Jun 2007
Posts: 333
Is there any up to date GUI available?
ashlar42 is offline   Reply With Quote
Old 13th December 2017, 07:52   #14547  |  Link
pstn
Registered User
 
Join Date: Sep 2017
Posts: 12
Does anyone know if there are any risks or downside to demuxing from a share (LAN) or a mounted ISO?
pstn is offline   Reply With Quote
Old 13th December 2017, 08:09   #14548  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,492
It's not much different to copying files. Mostly sequential reading from one file, and mostly sequential writing into a few other files. I would try to avoid both reading and writing over LAN due to low speed.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 19th December 2017, 20:39   #14549  |  Link
Megalith
Registered User
 
Join Date: Mar 2011
Posts: 82
Can someone clarify whether or not "Removing AC3 dialog normalization" affects TrueHD tracks? Or does it only affect the AC3 "core" track?
Megalith is offline   Reply With Quote
Old 1st January 2018, 05:33   #14550  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 63
I was trying to convert a .ts file to mkv. I got a message about the audio track not being "clean". See below. What does that mean? Thanks and happy new year.

Code:
eac3to v3.34
command line: eac3to   war_requiem.ts 1: v.h264 2: a.flac
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 1:30:00, 50p
1: h264/AVC, 720p50 (16:9)
2: AC3, German, 2.0 channels, 448kbps, 48kHz, dialnorm: -23dB, 9ms
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a02] Removing AC3 dialog normalization...
[a02] Decoding with libav/ffmpeg...
[a02] Applying RAW/PCM delay...
[a02] Reducing depth from 64 to 24 bits...
[a02] Encoding FLAC with libFlac...
[v01] Creating file "v.h264"...
[a02] This track is not clean.  <WARNING>
[a02] Creating file "a.flac"...
[a02] Audio has a gap of 32ms at playtime 0:00:02.  <WARNING>
[a02] Starting 2nd pass...
[a02] Extracting audio track number 2...
[a02] Removing AC3 dialog normalization...
[a02] Decoding with libav/ffmpeg...
[a02] Applying RAW/PCM delay...
[a02] Reducing depth from 64 to 24 bits...
[a02] Encoding FLAC with libFlac...
[a02] Realizing RAW/PCM gaps...
[a02] Creating file "a.flac"...
Video track 1 contains 270021 frames.
eac3to processing took 1 hour, 18 minutes.
Done.
[edit] the output flac from the command above was 270min - was supposed to be 90 min. Must be a bad audio stream in that .Ts file. I’ll post the mediainfo.

[edit2]mediainfo -f
Code:
General
Count                                    : 327
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
ID                                       : 1
ID                                       : 1 (0x1)
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : AC-3
Audio_Format_WithHint_List               : AC-3
Audio codecs                             : AC3
Audio_Language_List                      : German
Complete name                            : C:\0\War_Requiem.ts
Folder name                              : C:\0
File name                                : War_Requiem
File extension                           : ts
Format                                   : MPEG-TS
Format                                   : MPEG-TS
Format/Extensions usually used           : ts m2t m2s m4t m4s tmf ts tp trp ty
Commercial name                          : MPEG-TS
Internet media type                      : video/MP2T
Codec                                    : MPEG-TS
Codec                                    : MPEG-TS
Codec/Extensions usually used            : ts m2t m2s m4t m4s tmf ts tp trp ty
File size                                : 6321633292
File size                                : 5.89 GiB
File size                                : 6 GiB
File size                                : 5.9 GiB
File size                                : 5.89 GiB
File size                                : 5.887 GiB
Duration                                 : 5400380.000000
Duration                                 : 1 h 30 min
Duration                                 : 1 h 30 min 0 s 380 ms
Duration                                 : 1 h 30 min
Duration                                 : 01:30:00.380
Duration                                 : 01:30:00:23
Duration                                 : 01:30:00.380 (01:30:00:23)
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
Overall bit rate                         : 9364703
Overall bit rate                         : 9 365 kb/s
Maximum Overall bit rate                 : 35500000
Maximum Overall bit rate                 : 35.5 Mb/s
Frame rate                               : 50.000
Frame rate                               : 50.000 FPS
Frame count                              : 270023
Stream size                              : 315367443
Stream size                              : 301 MiB (5%)
Stream size                              : 301 MiB
Stream size                              : 301 MiB
Stream size                              : 301 MiB
Stream size                              : 300.8 MiB
Stream size                              : 301 MiB (5%)
Proportion of this stream                : 0.04989
File creation date                       : UTC 2017-12-31 22:57:08.222
File creation date (local)               : 2017-12-31 17:57:08.222
File last modification date              : UTC 2015-10-16 14:42:01.150
File last modification date (local)      : 2015-10-16 09:42:01.150
OverallBitRate_Precision_Min             : 9364702
OverallBitRate_Precision_Max             : 9364704

Video
Count                                    : 338
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0-0
ID                                       : 4113
ID                                       : 4113 (0x1011)
Menu ID                                  : 1
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4
Format settings, ReFrames                : 4 frames
Format settings, GOP                     : M=4, N=32
Internet media type                      : video/H264
Codec ID                                 : 27
Codec                                    : AVC
Codec                                    : AVC
Codec/Family                             : AVC
Codec/Info                               : Advanced Video Codec
Codec/Url                                : http://developers.videolan.org/x264.html
Codec profile                            : High@L4
Codec settings                           : CABAC / 4 Ref Frames
Codec settings, CABAC                    : Yes
Codec_Settings_RefFrames                 : 4
Duration                                 : 5400460
Duration                                 : 1 h 30 min
Duration                                 : 1 h 30 min 0 s 460 ms
Duration                                 : 1 h 30 min
Duration                                 : 01:30:00.460
Duration                                 : 01:30:00:23
Duration                                 : 01:30:00.460 (01:30:00:23)
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Bit rate                                 : 8449420
Bit rate                                 : 8 449 kb/s
Maximum bit rate                         : 40000000
Maximum bit rate                         : 40.0 Mb/s
Width                                    : 1280
Width                                    : 1 280 pixels
Height                                   : 720
Height                                   : 720 pixels
Sampled_Width                            : 1280
Sampled_Height                           : 720
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Frame rate                               : 50.000
Frame rate                               : 50.000 FPS
Frame count                              : 270023
Resolution                               : 8
Resolution                               : 8 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Interlacement                            : PPF
Interlacement                            : Progressive
Bits/(Pixel*Frame)                       : 0.183
Delay                                    : 600000.000
Delay                                    : 10 min 0 s
Delay                                    : 10 min 0 s 0 ms
Delay                                    : 10 min 0 s
Delay                                    : 00:10:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Stream size                              : 5703844345
Stream size                              : 5.31 GiB (90%)
Stream size                              : 5 GiB
Stream size                              : 5.3 GiB
Stream size                              : 5.31 GiB
Stream size                              : 5.312 GiB
Stream size                              : 5.31 GiB (90%)
Proportion of this stream                : 0.90227
Buffer size                              : 30000000

Audio
Count                                    : 306
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 0-1
ID                                       : 4352
ID                                       : 4352 (0x1100)
Menu ID                                  : 1
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : AC-3
Format settings, Endianness              : Big
Codec ID                                 : 129
Codec                                    : AC3
Codec                                    : AC3
Duration                                 : 5400384
Duration                                 : 1 h 30 min
Duration                                 : 1 h 30 min 0 s 384 ms
Duration                                 : 1 h 30 min
Duration                                 : 01:30:00.384
Duration                                 : 01:30:43:29
Duration                                 : 01:30:00.384 (01:30:43:29)
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 448000
Bit rate                                 : 448 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
ChannelLayout                            : L R
Samples per frame                        : 1536
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 259218432
Frame rate                               : 31.250
Frame rate                               : 31.250 FPS (1536 spf)
Frame count                              : 168762
Resolution                               : 16
Resolution                               : 16 bits
Bit depth                                : 16
Bit depth                                : 16 bits
Compression mode                         : Lossy
Compression mode                         : Lossy
Delay                                    : 600009.000
Delay                                    : 10 min 0 s
Delay                                    : 10 min 0 s 9 ms
Delay                                    : 10 min 0 s
Delay                                    : 00:10:00.009
Delay, origin                            : Container
Delay, origin                            : Container
Delay relative to video                  : 9
Delay relative to video                  : 9 ms
Delay relative to video                  : 9 ms
Delay relative to video                  : 9 ms
Delay relative to video                  : 00:00:00.009
Video0 delay                             : 9
Video0 delay                             : 9 ms
Video0 delay                             : 9 ms
Video0 delay                             : 9 ms
Video0 delay                             : 00:00:00.009
Stream size                              : 302421504
Stream size                              : 288 MiB (5%)
Stream size                              : 288 MiB
Stream size                              : 288 MiB
Stream size                              : 288 MiB
Stream size                              : 288.4 MiB
Stream size                              : 288 MiB (5%)
Proportion of this stream                : 0.04784
Language                                 : de
Language                                 : German
Language                                 : German
Language                                 : de
Language                                 : deu
Language                                 : de
Service kind                             : CM
Service kind                             : Complete Main
bsid                                     : 6
dialnorm                                 : -23
dialnorm                                 : -23 dB
compr                                    : -0.28
compr                                    : -0.28 dB
dsurmod                                  : 1
dsurmod                                  : Not Dolby Surround encoded
acmod                                    : 2
lfeon                                    : 0
dialnorm_Average                         : -23
dialnorm_Average                         : -23 dB
dialnorm_Minimum                         : -27
dialnorm_Minimum                         : -27 dB
dialnorm_Maximum                         : -23
dialnorm_Maximum                         : -23 dB
dialnorm_Count                           : 1885
compr_Average                            : -0.13
compr_Average                            : -0.13 dB
compr_Minimum                            : -0.28
compr_Minimum                            : -0.28 dB
compr_Maximum                            : 2.36
compr_Maximum                            : 2.36 dB
compr_Count                              : 1885
dynrng_Average                           : 0.11
dynrng_Average                           : 0.11 dB
dynrng_Minimum                           : 0.00
dynrng_Minimum                           : 0.00 dB
dynrng_Maximum                           : 2.15
dynrng_Maximum                           : 2.15 dB
dynrng_Count                             : 1885
format_identifier                        : AC-3

Last edited by Ripman; 1st January 2018 at 06:53.
Ripman is offline   Reply With Quote
Old 1st January 2018, 13:09   #14551  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,384
Quote:
Originally Posted by Ripman View Post
...the output flac from the command above was 270min - was supposed to be 90 min.
Your AC3 seems have some frames 2.0, but most of them are 5.1.

Extract and split the AC3 track.
http://forum.doom9.org/showthread.ph...95#post1447695
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 1st January 2018, 15:59   #14552  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 63
Quote:
Originally Posted by tebasuna51 View Post
Your AC3 seems have some frames 2.0, but most of them are 5.1.

Extract and split the AC3 track.
http://forum.doom9.org/showthread.ph...95#post1447695
Thanks for that tip. Which line in the mediainfo report caught your attention? I tried the SplitAc3 program. Here is the log:

Code:
FileSize : 302421504 bytes
---------- First valid Header
Time eq. : 5400384 ms.
SamplCod : 0 (0:48, 1:44.1, 2:32 KHz.)
BitRate  : 448 Kb/s
ChanMode : 2 (1:1/0, 2:2/0, 3:3/0, 4:2/1, 5:3/1, 6:2/2, 7:3/2)
FrameSize: 1792 bytes
---------- Process ( 25.000000 fps is used for Trim)
Time: 0 ms.	Written: 69 frames 2.0	( 2208 ms.)
Time: 2208 ms.	Written: 2 frames 5.1	( 64 ms.)	Trim(55, 56)
Time: 2272 ms.	Skipped: 1792 bytes	(Maybe: 32 ms.)
Time: 2304 ms.	Written: 168665 frames 5.1	( 5397280 ms.)	Trim(58, 134989)
Time: 5399584 ms.	Written: 6 frames 2.0	( 192 ms.)
Time: 5399776 ms.	Written: 9 frames 5.1	( 288 ms.)	Trim(134994, 135000)
Time: 5400064 ms.	Written: 1 frames 2.0	( 32 ms.)
Time: 5400096 ms.	Written: 3 frames 5.1	( 96 ms.)	Trim(135002, 135003)
Time: 5400192 ms.	Skipped: 1792 bytes	(Maybe: 32 ms.)
Time: 5400224 ms.	Written: 5 frames 2.0	( 160 ms.)
---------- End of File
Total time: 5400384 ms. at EOF
T. written: 168679 frames 5.1.
T. written: 81 frames 2.0.
[edit] looking at the splitac3 log, it seems like my tv signal got a bit corrupted — a little at the start, and a little at the end. It seems like splitac3 put 2ch samples in one output file, and 5.1ch samples in another file.

I could go back to the source .ts file, trim 2.304 secs from the start, preserve the next 5397280 ms (01:29:57.28), discard everything after that, and then extract the audio. Or, I could "zero-out" the first 2 frames (64ms) from the SplitAc3 5.1ch output, and everything after (64ms + 5397280 ms). Does this sound about right? How do I account for delays in the original audio stream? Thanks again.

Last edited by Ripman; 1st January 2018 at 18:54.
Ripman is offline   Reply With Quote
Old 1st January 2018, 19:34   #14553  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,384
Quote:
Originally Posted by Ripman View Post
Which line in the mediainfo report caught your attention?
Nothing in MediaInfo.
Is a typical problem, the output length is 3 times the expected because 5.1 have 3 times samples than 2.0

Quote:
I could go back to the source .ts file, trim 2.304 secs from the start, preserve the next 5397280 ms (01:29:57.28), discard everything after that, and then extract the audio. Or, I could "zero-out" the first 2 frames (64ms) from the SplitAc3 5.1ch output, and everything after (64ms + 5397280 ms). Does this sound about right? How do I account for delays in the original audio stream? Thanks again.
If you don't need the video I think is better cut the ts file, maybe commercials.

But if the video is OK you can use the 5.1 extracted by SplitAc3 with:

eac3to split51.ac3 one.ac3 -64ms
(the first 2 frames)
eac3to one.ac3 two.ac3 +2304ms
(audio/video delay)

And, maybe, you can delete the last 12 frames with DelayCut, only if sound bad.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 2nd January 2018, 14:17   #14554  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 63
Quote:
Originally Posted by tebasuna51 View Post
Nothing in MediaInfo.
Is a typical problem, the output length is 3 times the expected because 5.1 have 3 times samples than 2.0
>clever fellow


If you don't need the video I think is better cut the ts file, maybe commercials.

But if the video is OK you can use the 5.1 extracted by SplitAc3 with:

eac3to split51.ac3 one.ac3 -64ms
(the first 2 frames)
eac3to one.ac3 two.ac3 +2304ms
(audio/video delay)

And, maybe, you can delete the last 12 frames with DelayCut, only if sound bad.
Thanks for the tip. Video and audio recovered. SplitAc3 worked nicely - if'd be cool to have an option with that simple program to leave samples in contiguous numbered files.
Ripman is offline   Reply With Quote
Old 2nd January 2018, 15:26   #14555  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 63
Is there any plans to integrate eac3to with mkvextract/mkvmerge? I know it works with haali, but I wondered about the others too. Almost positive I read about this within the thread last year.
Ripman is offline   Reply With Quote
Old 2nd January 2018, 15:29   #14556  |  Link
nautilus7
Registered User
 
nautilus7's Avatar
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,506
ffmpeg mkv muxing support would be easier.
nautilus7 is offline   Reply With Quote
Old 2nd January 2018, 18:25   #14557  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,465
I agree, Haali is dead, and Nero is dead as well, it's time to drop them.
Midzuki is offline   Reply With Quote
Old 3rd January 2018, 18:26   #14558  |  Link
stax76
staxrip & mpv.net
 
Join Date: Jun 2002
Posts: 5,248
mp4 muxing for avc/hevc would also be useful because LSMASHVideoSource/LibavSMASHSource can open it without indexing. (something I miss from the mkv format)
__________________
I have a dream by Martin Luther King
one hundred years later...
We can never be satisfied...
With this faith...
Let freedom ring...
stax76 is offline   Reply With Quote
Old 3rd January 2018, 18:48   #14559  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,302
Quote:
Originally Posted by stax76 View Post
mp4 muxing for avc/hevc would also be useful because LSMASHVideoSource/LibavSMASHSource can open it without indexing. (something I miss from the mkv format)
Agreed
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 3rd January 2018, 23:38   #14560  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 63
Quote:
Originally Posted by nautilus7 View Post
ffmpeg mkv muxing support would be easier.
I like ffmpeg too. But I ended up at mkvmerge years ago, and the developer is pretty accessible via doom9.

Are there specific ffmpeg mkv capabilities that you use or prefer? Any capabilities that exist in ffmpeg but not in mkvmerge? Thanks.
Ripman is offline   Reply With Quote
Reply

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 19:13.


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