Hello, I'm unable to extract both audio tracks of my file in AvsPmod. Note that I'm a beginner and this is my first script I've written so far and I feel like I'm close to exporting it and would like to fix it. I've read the documentation on avisynth but couldn't get rid of the error. First here's the relevant part of my script;
Here's the relevant MediaInfo part of my fileCode:SetFilterMTMode ("QTGMC", 2) FFmpegSource2("Live At The Quick.mkv") # Extract audio tracks 1 and 2 a1 = FFmpegSource2("Live At The Quick.mkv", atrack=1) a2 = FFmpegSource2("Live At The Quick.mkv", atrack=2) # Add the audio tracks to the video AudioDub(last, a1, a2)
Here's the error I'm gettingCode:Audio #1 ID : 2 ID in the original source medium : 189 (0xBD)160 (0xA0) Format : PCM Format settings : Little / Signed Codec ID : A_PCM/INT/LIT Duration : 1 min 0 s Bit rate mode : Constant Bit rate : 1 536 kb/s Channel(s) : 2 channels Sampling rate : 48.0 kHz Frame rate : 30.000 FPS (1600 SPF) Bit depth : 16 bits Delay relative to video : 66 ms Stream size : 11.0 MiB (22%) Title : Stereo Language : English Default : Yes Forced : No Original source medium : DVD-Video Audio #2 ID : 3 ID in the original source medium : 189 (0xBD)129 (0x81) Format : AC-3 Format/Info : Audio Coding 3 Codec ID : A_AC3 Bit rate : 0 b/s Channel(s) : 6 channels Sampling rate : 48.0 kHz Compression mode : Lossy Stream size : 0.00 Byte (0%) Title : Surround 5.1 Language : English Default : No Forced : No Original source medium : DVD-Video
[Attachment 70888 - Click to enlarge]
I also tried to use the track IDs from the MediaInfo modifying my script like so but it didn't worked
This code is working but only output 1 audio track if I understand this thing rightCode:SetFilterMTMode ("QTGMC", 2) FFmpegSource2("Live At The Quick.mkv") # Extract audio tracks 1 and 2 a1 = FFmpegSource2("Live At The Quick.mkv", atrack=2) a2 = FFmpegSource2("Live At The Quick.mkv", atrack=3) # Add the audio tracks to the video AudioDub(last, a1, a2)
Thank you for helping me!Code:SetFilterMTMode ("QTGMC", 2) FFmpegSource2("Live At The Quick.mkv") # Extract audio tracks 1 and 2 a1 = FFmpegSource2("Live At The Quick.mkv", atrack=1) # Add the audio tracks to the video AudioDub(last, a1)
+ Reply to Thread
Results 1 to 7 of 7
-
-
Probably not a vaild 2nd audio track, or it wasn't decrypted properly since the bitrate is 0 kb/s and the stream size is 0.00 bytes. Sometimes mediainfo is wrong
To double check, you can demux with mkvextract to see if there is a valid 2nd audio track
Then go back to the DVD and check if there are 2 audio tracks. If there are, then revise your DVD ripping method -
BTW - Normally you would not add audio to the script, unless you were editing the video as well (adding or cutting parts, changing the duration or speed). Avisynth frameserves uncompressed audio and video . This means for lossy audio (such as the supposed 2nd track), you usually re-encode and incur quality loss . AC3 to uncompressed to AC3 incurs 1 generation loss. Normally you would just mux the original audio into the final container , so you get same quality and filesize for that track. For uncompressed PCM audio (such as audio track 1), some people might compress losslessly with flac (depends what the situation/goal was, or what the intended playback scenario was)
-
You're right the remux failed for some reason, I could successfully get it working with MakeMKV.
Glad you shared this. The only thing I thought is that since I de-interlaced and that it bumped up the framerate to 59.94, I wonder if the DVD9 audio will sync correctly. Should I convert back the 59.94 framerate to 24 fps? Or maybe it was shot as a broadcast directly in 29.97 fps but I'm not sure. How would I know? My goal here is to preserve the audio tracks without any re-conversion. Well, if that's possible! -
If it was interlaced NTSC video @ 29.97 fps , double rate deinterlacing to 59.94p will not change the sync or duration. Essentially each field becomes a frame
If you have 59.94p deinterlaced video, check frame by frame, and if there is motion every frame then it's interlaced content. Just leave it at 59.94p
If you have duplicates, the content frame rate is actually 29.97p (ie. 29.97p in 59.94p), and it shouldn't have been deinterlaced - it should have been field matched instead .
If you have a 3:2 pattern of triplicates, duplicates, then it's 23.976p content and it shouldn't have been deinterlaced. It should have been inverse telecined
There are other patterns, but those are the most common -
Wow thank you so much for taking the time to summarize this, I read a lot about it but never as clear and concise as the way you laid it out.
When I check each frame have motion and is different than the last frame so it seems that it would be interlaced.
Maybe this can add more information but in avidemux I have the following frame types:
I-TFF > B-TFF > BTFF >
P-TFF > B-TFF > BTFF >
P-TFF > B-TFF > BTFF >
P-TFF > B-TFF > BTFF >
P-TFF > B-TFF > BTFF >
I-TFF > ...and then it repeats -
Frametypes (I,B,P) do not have any relationship to the content frame rate.
If you double rate deinterlaced and encoded to an all I-frame file (IIIIII...), it would still be 59.94p, and 59.94 unique moments in time represented per second in a scene with motion
Or if you took the original interlaced DVD, encoded to 29.97i, all I-frame , encoded interlaced , it would still have 59.94 fields per second where all 59.94 fields have unique moments in time represented in a scene with motion
Similar Threads
-
MP4 and multiple audio tracks
By akkers in forum Video ConversionReplies: 5Last Post: 12th Apr 2023, 04:35 -
Getting rid of multiple audio tracks, etc.
By Ethaliano in forum Video ConversionReplies: 2Last Post: 25th Jun 2021, 08:49 -
Unable to extract audio data to wave file on Subtitle edit 3.5.16
By Nakasofi in forum SubtitleReplies: 1Last Post: 14th Sep 2020, 04:42 -
Unable to extract LPCM audio from MJPG video stream
By JJonah in forum AudioReplies: 4Last Post: 6th Feb 2020, 05:45 -
How to extract/cut parts from a mkv including all audio and subtitle tracks
By Baldrick in forum User guidesReplies: 23Last Post: 22nd Mar 2019, 11:00