View Full Version : Video and audio out of sync (DirectShowSource)
alexVS
22nd March 2022, 22:00
Hello!
I'm trying to recode ts file (fullHD@25i file to 720@50p) with AviSynth+ 3.7.1
Here is mediainfo of video
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 59s 200ms
Bit rate : 11.5 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.221
Stream size : 81.0 MiB (96%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Codec ID : A_MPEG/L2
Codec ID/Hint : MP2
Duration : 59s 208ms
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : 120ms
Stream size : 1.36 MiB (2%)
With this script I have video and audio out of synch:
a1 = "video.ts"
directShowSource(a1, FPS = 25, audio = true)
yadifmod2(order = 1, mode = 1)
lanczosresize(1280,720)
sharpen(0.2)
Can I use directShowSource and get video syched with audio?
I tried to use this (and works slow, sometimes hangs - especially in virtualDub, crashes). And it looks too difficult for me.
# PLUGINS
LoadPlugin("c:\Program Files (x86)\AviSynth+\plugins+\LSMASHSource.dll")
LoadPlugin("c:\Program Files (x86)\AviSynth+\plugins+\yadifmod2.dll")
# SOURCE
#LoadPlugin("LSMASHSource.dll")
##################################
## @ atrack - audio track number. Default auto. If -2, ignore audio.
## @ fpsnum, fpsden - framerate. Default auto.
## @ format - force specified output pixel format. Default auto.
## (see documentation for valid color formats)
## @ cache - if true (the default), create an index file.
##
##
function LibavSource2(string path, int "atrack",
\ int "fpsnum", int "fpsden",
\ string "format", bool "cache")
{
atrack = Default(atrack, -1)
fpsnum = Default(fpsnum, 0)
fpsden = Default(fpsden, 1)
cache = Default(cache, true)
format = Default(format, "")
video = LWLibavVideoSource(path,
\ fpsnum=fpsnum, fpsden=fpsden, format=format,
\ cache=cache)
return (atrack==-2) ? video: AudioDub(video,
\ LWLibavAudioSource(path, stream_index=atrack, cache=cache))
}
a1="video.ts"
LibavSource2(a1, atrack = 1, fpsnum = 25, fpsden = 1)
assumefps(25)
yadifmod2(order = 0, mode = 1)
lanczosresize(1280,720)
converttoYV12()
BTW After LibavSource2 line, I got 50FPS interlaced video, and I have to use assumefps(25) so correct it.
A also tried audiodub(FFVideoSource(a1) , FFAudioSource(a1))
but it can't hanlde interlaced video
Can I somehow use DirectShowSource and get video syched with audio?
StainlessS
23rd March 2022, 00:09
Forget DirectShowSource, try this[D.Graft's DgIndexNV]:-
http://rationalqm.us/dgdecnv/dgdecnv.html
Binaries here:- http://rationalqm.us/dgdecnv/binaries/
Using a template something like this [assumes that some audio source plugins are auto loaded]
VideoFileName ="__vid__"
AudioFileName =LCase("__aud__")
AudioDelay =Value("__del__")
DGSource(VideoFileName)
AudioExt=RT_GetFileExtension(AudioFileName)
Audio= (AudioExt==".ac3") ? NICAC3Source(AudioFileName,channels=2,DRC=0)
\ : (AudioExt==".mpa"||AudioExt=="mp1"||AudioExt==".mp2"||AudioExt==".mp3") ? NicMPG123Source(AudioFileName,Normalize=False)
\ : (AudioExt==".wav") ? RaWavSource(AudioFileName)
\ : (AudioExt==".dts") ? NicDTSSource(AudioFileName)
\ : (AudioExt==".w64") ? LWLibavAudioSource (AudioFileName)
\ : (AudioExt==".thd") ? LWLibavAudioSource (AudioFileName)
\ : 0
Assert(!isInt(Audio),"NO AUDIO")
(!isInt(Audio)) ? AudioDub(Audio).DelayAudio(AudioDelay).Trim(0,0) : NOP # Trim, chop/add audio to length
(!isInt(Audio) && AudioRate() <> 44100) ? ResampleAudio(44100) : NOP # EDIT: Unless you want some other rate
AssumeTFF # whatever is required
# ... # and the rest of your standard script template
return last
Stuff will be filled in eg [when using DgIndexNV "Save Project"]
VideoFileName ="D:\___BLURAY\OUT1\X-Men_2.dgi"
AudioFileName =LCase("D:\___BLURAY\OUT1\X-Men_2_track2_eng_DELAY 0ms.dts")
AudioDelay =Value("__del__") # Not always set, result as if AudioDelay =Value("0.0")
# ...
EDIT:
If you dont wanna install RT_Stats for "RT_GetFileExtension()" then can use this instead [and change it in template].
Function GetFilenameExtension(String fn) {
fn=fn.RevStr i1=fn.FindStr("\") i2=fn.FindStr("/")
i=(i1==0) ? i2 : (i2==0) ? i1 : min(i1,i2)
fn=(i>0) ? Fn.LeftStr(i-1) : fn
i=fn.FindStr(".")
Return (i>0)?fn.LeftStr(i).RevStr:""
}
tebasuna51
23rd March 2022, 02:44
@StainlessS
For what GetFileExtension?
Now you don't need NicAudio.dll (for NICAC3Source, NicMPG123Source, RaWavSource, NicDTSSource), all these audios, and other common like .eac3,.aac,... can be decoded better (I'm the last NicAudio plugin developper) by last LWLibavAudioSource, then use only:
Audio=LWLibavAudioSource (AudioFileName,drc_scale=0)
Also I can't recommend ResampleAudio, let the original samplerate.
StainlessS
23rd March 2022, 03:28
Thanks Teb,
I guess Nic...Source() stuff is just habit and what I've pretty much used for years,
I only recently added LWLibavAudioSource() for *.W64 and *.thd.
I guess I need to mod all my templates for just LWLibavAudioSource(AudioFileName,drc_scale=0).
I'm not too bothered about audio except I dont like eg 22050 or 32Khz,
and 48KHz seems a little bit overkill {leastwise for my lousy ears}.
So alexVS, something like this maybe.
VideoFileName ="__vid__"
AudioFileName ="__aud__"
AudioDelay =Value("__del__")
DGSource(VideoFileName)
Audio = LWLibavAudioSource(AudioFileName,drc_scale=0)
AudioDub(Audio).DelayAudio(AudioDelay).Trim(0,0) # Trim, chop/add audio to length [EDIT: video/audio identical length]
AssumeTFF # whatever is required
# ... # and the rest of your standard script template
return last
tebasuna51
23rd March 2022, 03:31
@alexVS
This script must work with your file (audio delay 120 ms):
# PLUGINS
LoadPlugin("c:\Program Files (x86)\AviSynth+\plugins+\LSMASHSource.dll")
LoadPlugin("c:\Program Files (x86)\AviSynth+\plugins+\yadifmod2.dll")
# SOURCE
Video = LWLibavVideoSource("video.ts")
assumefps(25)
yadifmod2(order = 0, mode = 1)
lanczosresize(1280,720)
converttoYV12()
Audio=LWLibavAudioSource ("video.ts",drc_scale=0)
DelayAudio(0.120)
AudioDub(Video,Audio)
But if your .ts is from a TV capture the async can be because a wrong capture with lost frames, like you say: "... sometimes hangs"
tebasuna51
23rd March 2022, 03:46
I only recently added LWLibavAudioSource() for *.W64 and *.thd.
*.W64 was supported by RaWavSource, but for *.thd,*.dtshd,*.aac,*.eac3, ... we need LWLibavAudioSource(), with the recent parameter drc_scale NicAudio is not needed at all.
StainlessS
23rd March 2022, 10:35
*.W64 was supported by RaWavSource
I did originally use RaWavSource() for W64, however I had some kind of problem with one source
(not sure, might have been playing too fast, maybe double speed), so I changed to using LWLibavAudioSource().
I also was originally using TsMuxerGUI to convert to M2TS [from MKV; I now know I should have went straight to demux using DgIndexNV],
which actually might have been what caused the double speed W64. Also, TsMuxerGUI seems to mess up thd streams.
Using DGIndexNV [EDIT: directly on MKV] seems to fix both problems I had with TsMuxerGUI, but on occasion outputs an audio file without any extension at all,
I did not spend too long trying to figure out what format the extensionless audio files are. [EDIT: but I think they were big]
[EDIT: Wild guess, extensionless audio about once in every 25 Blu-Ray disks]
I actually currently use this to convert all audiofiles to 16 bit stereo WAV, before loading into my script, saves an awful lot of time converting into
my required format using ffmpeg.
[I do auto conversions down to stereo 16 bit in script, also is Normalized in MeGUI before audio encode, so hi channel count; 2 hour movie could take 30 mins to (normalise) prescan prior to audio encode].
REM Convert audio to 16 bit stereo
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)
REM We DO NOT LIKE ACCENTS IN FILE NAMES.
setlocal
REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"
REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."
REM Where to place output file, No terminating Backslash.
set OUTDIR=".\OUTPUT"
FOR %%A IN (*.thd *.dts *.ac3 *.w64 *.aac *.m4a) DO (
%FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le -ac 2 "%OUTDIR%\%%~nxA.WAV"
)
Pause
After above, I just need to add ".WAV" to end of audio filename in filled in template. (and is a lot faster to encode normalised audio)
EDIT:
Not sure at all, but maybe BD, Kill Bill (I or II) or Dark Night Rises, may have produced extensionless audio files in DgIndexNV.
I'll use MakeMKV on those 3 to try find an error producing disk, but if I'm wrong on all 3 counts, I'll not look any further.
(EDIT: Might have been Kick-Ass I or II rather than Kill Bill)
EDIT: Also, DGIndexNV/DGsource, sometimes when seek to frame; will produce multicolored totally weird frame, whereas play from some seconds
before that frame shows no problems, so seems there may sometimes be seek errors.
[ Exposed via RT_QueryBorderCrop() which is s bit like RoboCrop() - where it fails to find border due to weird colored frame ]
EDIT: Also DGIndexNV/DGSource, and "Empire Strikes Back", & "Return of The Jedi", I get video/audio out of sync later in the movie.
(I first thought might be corrupt disk or something, but those two movies are consecutive SW's movies and I did "Empire Strikes Back" twice,
2nd time with cleaned disk, same result. So, maybe down to "non drop frame" 23.976, or something, I dont know???.
Maybe I should keep same rate audio and Assumefps(24.0) for video.
StainlessS
23rd March 2022, 16:15
I'll post this here as problem outlined in above post.
Kill Bill #1, main stream only [EDIT: or should that be 'Program' or something else. EDIT: maybe 'track'] rip to MKV. [about 28.7GB, english audio and subs].
DGIndexNV on MKV from physical hard drive, Save Project,
Seems to pause/very_slow at about 14000 (about 10%) frames [as indictated in Information box, coded #, playback # fields].
https://i.postimg.cc/hQQjgBD3/Dg-Index-NV.jpg (https://postimg.cc/hQQjgBD3)
EDIT: Above image capped @ about frame 15000.
When from SSD, pause not so noticable, seems maybe lots of seeking at about 10%.
Audio track #2 flagged as A_MS/ACM 48000 6 ch "eng".
DGIndexNV output files, note audio file Kill Bill Vol.1_t01_track2_eng_DELAY 0ms without extension. [ie the problem EDIT: part of problem]
https://i.postimg.cc/zHhJ6F7s/Output-Files.jpg (https://postimg.cc/zHhJ6F7s)
Track info as per TsMuxerGUI
https://i.postimg.cc/8sgnvVr1/Ts-Muxer-GUI.jpg (https://postimg.cc/8sgnvVr1)
Can somebody with BD, Kill Bill #1 in MKV form, confirm output for that audio track is without any extension in DgIndexNV Save Project result.
The track in mkv plays ok in a media player.
EDIT: Maybe DG will not be around for some time, I think he may be on a "30 day D9 vacation".
EDIT: Audio output file without extension, when name appended with either ".WAV", or ".W64", and load with LWLibavAudioSource, fails.
I think affects all audio files flagged as "A_MS/ACM" in DGIndexNV information box, or TsMuxerGUI as "LPCM".
EDIT: Same extensionless track demuxe's via TsMuxerGUI to Kill Bill Vol.1_t01.track_2_eng.wav
is 68 bytes longer than problem file, and plays OK.
EDIT: Extensionless file Hex/ASCII
https://i.postimg.cc/pT7yvPmX/Bad.jpg (https://postimages.org/)
TsMuxerGUI Hex/ASCII (with RIFF header and such)
https://i.postimg.cc/Df9chX4s/Good.jpg (https://postimages.org/)
tebasuna51
24th March 2022, 02:06
Sorry StainlessS, I can't reproduce your problem.
- The BD Kill Bill #1 I can access have two DTSHD audio tracks, without LPCM tracks.
- How do you obtain the mkv from the BD? MakeMkv? Work fine for me, but who knows, maybe fail with some protections,
Because when I make a mkv with a PCM track (PCM informed by MKVToolNix, LPCM informed by tsMuxeR) DGIndexNV inform it like A_PCM/INT/LIT, and demux it correctly like a WAV with the correct header.
- Seems the file extracted without extension by DGIndexNV is the same WAV but without the header (68 bytes), and, of course, LWLibavAudioSource fails.
I don't know for what DGIndexNV show that track like A_MS/ACM and don't create the wav header when extract.
StainlessS
24th March 2022, 04:01
Thanks for trying teb,
I use current (march 22) Beta MakeMKV,
Here UK, Kill Bill #1 [No Spanish] [EDIT: 1st audio track, LPCM Surround 5.1 English]
https://i.postimg.cc/50DryS2W/MakeMKV.jpg (https://postimg.cc/wyc2bJNw)
I've had same problem with other disks [I recently got (december) a BD player, and since then about 200 BD titles/series, so am a bit busy],
any BD disk with LPCM should (I think) display the same problem, I've had (so far) about 5 or 6 disks with same problem. (dont recall which others).
The DGIndexNV I'm using is latest, I updated within mayebe last 7 -> 10 days.
DG is aware, (I was contacted through an intermediary in PM) and so the problem may get looked into anyway.
(I was asked to post in his forum, and/or upload sample but on 4G Mobile Broadband Pre-Pay uploading 4GB LPCM file is not gonna happen).
[EDIT: Actually, DG would probably need the 28GB MKV file, and that would 100% for sure never happen due to cost, and upload speed on 4G is not at all fast either]
Kill Bill #1 is a fairly common-ish movie I think, maybe someone has english disk and can reproduce problem.
(The MakeMKV I did was well cleaned & watched closely and did not slow down rip at all so I assume no rip problems.)
EDIT: Its not actually a problem for me, I just use one of the other audio tracks and convert to 16 bit Stereo anyway.
EDIT: I use the ffmpeg conversion BAT file, as I've had (I think) some high channel count, 24 bit audio tracks and some 96KHz tracks (think maybe even both together),
and when doing normalise in MeGUI, is REALLY slow converting those to 16 bit stereo for the normalise prescan pass in MeGUI.
(Wild guess at where there might have been some "Exotic" audio, maybe "Fifth Element", because of the "Diva Dance" scene, but just a guess).
EDIT: Of course, you dont have to rip a BD to know if it has LPCM audio track, just an MakeMKV scan of disk and examine the audio tracks as in above posted image.
StainlessS
24th March 2022, 13:20
MediaInfo output for Kill Bill #1, English pub, MKV,
General
Unique ID : 174214137736103350825920264907029397218 (0x83106C26594B80F5FAEE79DA79C2BEE2)
Complete name : D:\___BLURAY\OUT7\Kill Bill Vol.1_t01.mkv
Format : Matroska
Format version : Version 2
File size : 27.4 GiB
Duration : 1 h 56 min
Overall bit rate mode : Variable
Overall bit rate : 33.7 Mb/s
Movie name : Kill Bill Vol.1
Encoded date : UTC 2022-03-23 14:02:59
Writing application : MakeMKV v1.16.7 win(x64-release)
Writing library : libmakemkv v1.16.7 (1.3.10/1.5.2) win(x64-release)
Original source medium : Blu-ray
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Format settings, GOP : M=4, N=24
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 51 min
Bit rate mode : Variable
Bit rate : 27.4 Mb/s
Maximum bit rate : 35.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.551
Stream size : 21.2 GiB (78%)
Language : English
Default : No
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio #1
ID : 2
ID in the original source medium : 4352 (0x1100)
Format : PCM
Codec ID : 00001000-0000-0100-8000-00AA00389B71
Duration : 1 h 51 min
Bit rate mode : Constant
Bit rate : 4 608 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 30.000 FPS (1600 spf)
Bit depth : 16 bits
Stream size : 3.58 GiB (13%)
Title : Surround 5.1
Language : English
Default : Yes
Forced : No
Audio #2
ID : 3
ID in the original source medium : 4353 (0x1101)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 1 h 56 min
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 spf)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 533 MiB (2%)
Title : Surround 5.1
Language : English
Default : No
Forced : No
Audio #3
ID : 4
ID in the original source medium : 4354 (0x1102)
Format : DTS
Format/Info : Digital Theater Systems
Format profile : MA / Core
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 1 h 51 min
Bit rate mode : Variable / Constant
Bit rate : 1 859 kb/s / 768 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 spf)
Bit depth : 16 bits
Compression mode : Lossless / Lossy
Stream size : 1.44 GiB (5%)
Title : Surround 5.1
Language : English
Default : No
Forced : No
Audio #4
ID : 5
ID in the original source medium : 4354 (0x1102)
Format : DTS
Format/Info : Digital Theater Systems
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 1 h 51 min
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 spf)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 611 MiB (2%)
Title : Surround 5.1
Language : English
Default : No
Forced : No
Text #1
ID : 6
ID in the original source medium : 4608 (0x1200)
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 1 h 42 min
Bit rate : 14.5 kb/s
Count of elements : 1697
Stream size : 10.7 MiB (0%)
Language : English
Default : No
Forced : No
Text #2
ID : 8
ID in the original source medium : 4610 (0x1202)
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 1 h 27 min
Bit rate : 4 317 b/s
Count of elements : 315
Stream size : 2.69 MiB (0%)
Language : English
Default : No
Forced : No
Menu
00:00:00.000 : en:Chapter 00
00:00:20.020 : en:Chapter 01
00:02:46.499 : en:Chapter 02
00:05:27.660 : en:Chapter 03
00:10:09.150 : en:Chapter 04
00:16:27.569 : en:Chapter 05
00:20:10.709 : en:Chapter 06
00:25:31.196 : en:Chapter 07
00:32:37.956 : en:Chapter 08
00:36:16.966 : en:Chapter 09
00:45:21.176 : en:Chapter 10
00:50:49.421 : en:Chapter 11
00:58:58.409 : en:Chapter 12
01:04:53.598 : en:Chapter 13
01:13:31.156 : en:Chapter 14
01:21:58.204 : en:Chapter 15
01:30:24.669 : en:Chapter 16
01:38:56.013 : en:Chapter 17
01:42:04.785 : en:Chapter 18
01:43:37.961 : en:Chapter 19
EDIT: I note that there is no "Endianness" media info for the LPCM audio track, maybe is little endian and is interpreted as big endian. (or vice versa)
StainlessS
24th March 2022, 17:53
Yo Teb, just sent you a PM.
tebasuna51
24th March 2022, 19:03
Now I can reproduce the problem with a simple BD created by me.
The Codec ID is different in the mkv created by MkvToolNix than the created by MakeMKV:
MediaInfo audio in : m2ts original mkv by MkvToolNix mkv by MakeMKV
------------------- ------------- ---------------- ---------------
Format : PCM PCM PCM
Format settings : Big / Signed Little / Signed Little / Signed
Codec ID : 128 A_PCM/INT/LIT A_MS/ACM / 00000001-0000-0010-8000-00AA00389B71
Bit rate : 6 912 kb/s 6 912 kb/s 6 912 kb/s
Channel(s) : 6 channels 6 channels 6 channels
Sampling rate : 48.0 kHz 48.0 kHz 48.0 kHz
Bit depth : 24 bits 24 bits 24 bits
Stream size : 77.9 MiB 77.9 MiB 77.9 MiB
1) I don't know for what MakeMKV put that Codec ID (https://www.matroska.org/technical/codec_specs.html)
Codec ID: A_MS/ACM
Codec Name: Microsoft(TM) Audio Codec Manager (ACM)
Description: The data are stored in little-endian format (like on IA32 machines).
Initialization: The Private Data contains the ACM structure WAVEFORMATEX including the extra private bytes, as defined by Microsoft.
instead
Codec ID: A_PCM/INT/LIT
Codec Name: PCM Integer Little Endian
Description: The audio bit depth MUST be read and set from the BitDepth Element. Audio samples MUST be considered as signed values, except if the audio bit depth is 8 which MUST be interpreted as unsigned values. Corresponding ACM wFormatTag : 0x0001
Initialization: none
In fact MkvExtract show than Codec ID: A_MS/ACM is not compatible with .wav or .w64.
2) Only eac3to extract that track like wav/w64.
But, maybe, DGIndexNV and others can create the header also.
BD sample (https://www.mediafire.com/file/jgczfhd1gz3ebjt/BD.7z/file)
StainlessS
24th March 2022, 20:09
Also, TsMuxerGUI demuxes that track to WAV. [the one I PM'ed, have not tried your BD sample].
OK, I'll leave this now, I'm sure DG will pick it up.
tebasuna51
25th March 2022, 14:16
You are right.
I make a test over different free methods to extract these tracks from the 00000.m2ts sample and converted to 00000.mkv by MkvToolNix, and converted to title_t00.mkv by MakeMKV.
Like is a short sample I used always WAV instead W64.
In PCM bluray 5.1 the surround channels don't have a exact equivalence to WAV channels, in past century the default is use MaskChannels: 63 (FL FR FC LF BL BR), but now the preferred default is MaskChannels: 1551 (FL FR FC LF SL SR).
Of course when WAV output header is WAVE_FORMAT_EXTENSIBLE, but by default AviSynth output is not WAVE_FORMAT_EXTENSIBLE and MaskChannels not exist (Mask 0 means simple wav header).
The correct option (show OK) is extract a WAV 24 bits 48 KHz 6 chan MaskChannels 1551, the differences are show below:
Demuxer 00000.m2ts 00000.mkv title_t00.mkv
------------------ -------------- ---------------- -----------------------
MkvExtract no mkv OK A_MS/ACM not compatible
ffmpeg OK (pcm_s24le) Mask 63 OK
tsMuxeR OK OK OK
eac3to OK OK OK
DGIndex Mask 0 Mask 0 RAW (without header)
LWLibavAudioSource Mask 0 Mask 0 Mask 0
FFAudioSource Mask 0, 32 bits Mask 0, 32 bits Mask 0, 32 bits
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.