VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Is it possible to manipulate audio channels in AVI files using avisyth without extracting the WAV files?

    I have several AVI videos where the left channel is much louder than the right. Mono tapes played on a Stereo equipment most likely. Is it possible to correct this without extracting the WAV files using Avisynth? I will also need to use the TRIM() function to select which audio to manipulate.

    It seems most solutions I've found require extracting the WAV files and using WAVSOURCE(), AUDIODUB(), GETCHANNEL(). NORMALIZE().
    Quote Quote  
  2. WavSource() can open AVI files. As can AviSource(), ffaudiosource(), lwlibavaudiosource(), dss2(), DirectShowSource() and maybe a few others I forgot.
    Quote Quote  
  3. But AUDIODUB doesn't support AVIs which is needed to merge the video and audio together.
    Quote Quote  
  4. AudioDub() works with any video and audio. It doesn't even know about the source file formats.
    Quote Quote  
  5. Does GetChannel() work with AVI?
    Quote Quote  
  6. GetChannel() works with any audio. It doesn't even know about the source file formats.

    (I hope you see the pattern here. Only the source filter needs to know a file format. Other filters grab the uncompressed video or audio data coming from the previous filter. They don't care if the source was AVI or something else...)
    Quote Quote  
  7. I'm trying to normalize the audio channels separately using the example from http://avisynth.nl/index.php/Normalize

    Code:
    video = AviSource("video.avi")
    left_ch = GetChannel(video,1).Normalize
    right_ch = GetChannel(video,2).Normalize
    return AudioDub(video, MergeChannels(left_ch, right_ch))
    I get this error. Getchannel: Attempted to request a channel that didn't exist.

    My AVI file is a Type 2 DV file. Here is the MediaInfo.

    Code:
    General
    Format                         : AVI
    Format/Info                    : Audio Video Interleave
    Commercial name                : DV
    Format profile                 : OpenDML
    File size                      : 24.9 GiB
    Duration                       : 2h 3mn
    Overall bit rate mode          : Constant
    Overall bit rate               : 28.9 Mbps
    
    Video
    ID                             : 0
    Format                         : DV
    Duration                       : 2h 3mn
    Bit rate mode                  : Constant
    Bit rate                       : 24.4 Mbps
    Encoded bit rate               : 28.8 Mbps
    Width                          : 720 pixels
    Height                         : 480 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Constant
    Frame rate                     : 29.970 fps
    Standard                       : NTSC
    Chroma subsampling             : 4:1:1
    Bit depth                      : 8 bits
    Scan type                      : Interlaced
    Scan order                     : Bottom Field First
    Compression mode               : Lossy
    Bits/(Pixel*Frame)             : 2.357
    Time code of first frame       : 00:55:49;05
    Time code source               : Subcode time code
    Stream size                    : 24.8 GiB (100%)
    
    Audio
    ID                             : 0-0
    Format                         : PCM
    Muxing mode                    : DV
    Muxing mode, more info         : Muxed in Video #1
    Duration                       : 2h 3mn
    Bit rate mode                  : Constant
    Bit rate                       : 1 536 Kbps
    Encoded bit rate               : 0 bps
    Channel(s)                     : 2 channels
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Stream size                    : 1.32 GiB (5%)
    Encoded stream size            : 0.00 Byte (0%)
    Quote Quote  
  8. Does info() report 2 ch audio ?

    Code:
    AVISource("video.avi")
    Info()
    Quote Quote  
  9. Try (one of) the source filters I mentioned in post #2.
    Quote Quote  
  10. So there is no audio, at least "heard" by your AVISource VFW system

    Is there audio when you use VLC, MPCHC etc... ?

    This is bizarre:
    Code:
    Bit rate                       : 1 536 Kbps
    Encoded bit rate               : 0 bps
    
    Stream size                    : 1.32 GiB (5%)
    Encoded stream size            : 0.00 Byte (0%)
    Makes me think something is corrupted, at least with this video

    Try another source filter as sneaker mentioned, and also test a different sample from that batch
    Quote Quote  
  11. Yeah it's the files that is the problem. I use TRIM() to select a section of the videos and everything is working now. Thank for the help.

    The files plays fine on VLC and MPCHC though, so they are not corrupt.
    Quote Quote  



Similar Threads