function ShowVideo (string video, int startframe, int finalframe, float fps, bool enableaudio , int x, int y, bool keepaspectratio, int BackgroundColor,bool DvdMode, bool AspectRatio43) {

 #keepaspectratio=true
 #BackgroundColor=$555555

 keepaspectratio==true ? Eval("""
   Import ("..\Functions\Function.ShowVideoWithCorrectAspectRatio.avs")
   s1v = ShowVideoWithCorrectAspectRatio (video,fps,x,y,BackgroundColor,DvdMode,AspectRatio43)
 """) : Eval("""
   s1v = DirectShowSource(video,audio=false,video=true).BilinearResize(Round(x/4)*4 ,Round(y/4)*4).ConvertToRGB32().ConvertFPS(fps).killaudio
 """)
 
 
   enableaudio==true  ? Eval("""
        s1a = DirectShowSource(video,audio=true,video=false)
        CountAudioChannels=(Audiochannels(s1a))
  """) : Eval("""
        audio=BlankClip(s1v, audio_rate=44100, stereo=true,sixteen_bit=true).ResampleAudio(44100).ConvertAudioToFloat
        mix=AudioDub(s1v,audio) 
        s1=mix.trim(startframe,finalframe)
  """)
  
   enableaudio==true && CountAudioChannels==1  ? Eval("""
        s1a = GetChannel(s1a, 1, 1).ResampleAudio(44100).ConvertAudioToFloat
        s1=AudioDub(s1v,s1a).trim(startframe,finalframe)
       """) : Eval(""" 
        """)
        
   enableaudio==true && CountAudioChannels>1 && CountAudioChannels<3 ? Eval("""
        s1a = GetChannel(s1a, 1, 2).ResampleAudio(44100).ConvertAudioToFloat
        s1=AudioDub(s1v,s1a).trim(startframe,finalframe)
       """) : Eval(""" 
        """)
        
    enableaudio==true && CountAudioChannels>=3  ? Eval("""
         s1a = GetChannel(s1a, 1, 3).ResampleAudio(44100).ConvertAudioToFloat
         s1= AudioDub(s1v, s1a).trim(startframe,finalframe)
       """) : Eval(""" 
        """)
        
   return s1     

}

