View Single Post
Old 22 August 2014, 15:14   #49
Registered User
Join Date: Jun 2010
Location: NL/PL
Posts: 1,429
Fixed version for ffmpeg (aspect ratio auto calculation works now with non ususal aspect ratios, overall flexibility improved, new: anti-aliasing* added - optional, improved audio syntax, still issues with color space - ffmpeg ignore (partially?) syntax and seem that issue is raised on ffmpeg bug-list - solution for today: piping - perhaps in next version)

@rem echo --audio--
@rem possible samplerates are for example: 28604, 23646, 22168, 15977, 11260
@set samplerate=15977

@rem possible ngain are for example: -3.0103, -6.0206, -9.0309
@set ngain=-6.0206

@rem possible audither are: 0,1,2,3
@set audither=1

@rem possible volume value are for example: 3.0103dB, 6.0206dB, 9.0309dB, 12.0412dB, 18.0618dB or 1.5 2 etc
@set avol=1

@rem echo --video--
@rem possible vidither are: 0,1,2,3,4,5,6 or "bayer","ed","a_dither", "x_dither"
@set vidither=bayer
@rem possible video color space are: rgb555le (15 bit), rgb444le (12 bit - native Amiga) ;CLUT format not suitable for AVI conatiner but fine GIF (or similar format) bgr4_byte (4 bit CLUT), rgb8 (8 bit CLUT) 
@set cspc=rgb555le

@ffmpeg -threads %NUMBER_OF_PROCESSORS%+1 -i %1 -map 0:v -c:v rawvideo -vf hqdn3d=6:6:8:8,decimate=cycle=2,pp="hb/vb/dr/al|f",format=pix_fmts=rgb24[midv1];[midv1]scale="'if(gt(a,4/3),320,-1)':'if(gt(a,4/3),-1,216)':sws_flags=spline:sws_dither=%vidither%",pad=320:216:(ow-iw)/2:0[midv2];[midv2]scale=320:-1:sws_flags=spline:sws_dither=%vidither%,vflip,format=pix_fmts=%cspc% -sws_dither %vidither% -y %1.avi -map 0:a:0 -c:a pcm_u8 -af "[in]aformat=sample_fmts=fltp[mida1] ; [mida1]pan=stereo|FL < FL + 1.414FC + .5BL + .5SL + 0.25LFE|FR < FR + 1.414FC + .5BR + .5SR + 0.25LFE[mida2] ; [mida2]highpass=f=2.5,compand='.13|.13:.35|.35:-70/-35|-35/-20|-20/-15|-15/-15:6:%ngain%:-90:0.2',treble=g=%ngain%*-2:f=%samplerate%/4,volume=%avol%[mida3];[mida3]aresample=resampler=soxr:osr=%samplerate%:cutoff=0.995:dither_method=%audither%,aformat=sample_fmts=u8:channel_layouts=stereo[out]" -y %1.wav

@rem ffmpeg -threads %NUMBER_OF_PROCESSORS%+1 -i %1 -map 0:v -c:v rawvideo -vf hqdn3d=6:6:8:8,decimate=cycle=2,pp="hb/vb/dr/al|f"[midv1];[midv1]scale="'if(gt(a,4/3),320,-1)':'if(gt(a,4/3),-1,216)'",pad=320:216:(ow-iw)/2:0[midv2];[midv2]format='pix_fmts=bgr24',hqx=2,scale=iw/2:-1:sws_flags=spline:sws_dither=%vidither%,vflip,format=pix_fmts=%cspc% -sws_dither %vidither% -y %1_hqx.avi -map 0:a:0 -c:a pcm_u8 -af "[in]aformat=sample_fmts=fltp[mida1] ; [mida1]pan=stereo|FL < FL + 1.414FC + .5BL + .5SL + 0.25LFE|FR < FR + 1.414FC + .5BR + .5SR + 0.25LFE[mida2] ; [mida2]highpass=f=2.5,compand='.13|.13:.35|.35:-70/-35|-35/-20|-20/-15|-15/-15:6:%ngain%:-90:0.2',treble=g=%ngain%*-2:f=%samplerate%/4,volume=%avol%[mida3];[mida3]aresample=resampler=soxr:osr=%samplerate%:cutoff=0.995:dither_method=%audither%,aformat=sample_fmts=u8:channel_layouts=stereo[out]" -y %1_hqx.wav
*AA implemented as hqx - slower, not universal, but improvements visible - to turn ON - un-rem second ffmpeg.

Automatic Audio can't be implemented currently without at least 2 pass or pipe - perhaps in future sufficient filter for ffmpeg can be used to do this.

pandy71 is offline  
Page generated in 0.05075 seconds with 9 queries