VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. 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;

    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)
    a2 = FFmpegSource2("Live At The Quick.mkv", atrack=2)
    
    # Add the audio tracks to the video
    AudioDub(last, a1, a2)
    Here's the relevant MediaInfo part of my file

    Code:
    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
    Here's the error I'm getting

    Image
    [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

    Code:
    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)
    This code is working but only output 1 audio track if I understand this thing right

    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)
    Thank you for helping me!
    Quote Quote  
  2. 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
    Quote Quote  
  3. 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)
    Quote Quote  
  4. Originally Posted by poisondeathray View Post
    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
    You're right the remux failed for some reason, I could successfully get it working with MakeMKV.

    Originally Posted by poisondeathray View Post
    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)
    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!
    Quote Quote  
  5. Originally Posted by G22 View Post
    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
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    Originally Posted by G22 View Post
    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
    Quote Quote  
  7. Originally Posted by G22 View Post

    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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!