Старый набор:
vdub.vdr
)file.avs
, например: AVISource("vdub.vdr") # Convert to YV 4:2:0 to enable fast processing: ConvertToYV12() FieldDeinterlace() #Tweak(0, 1, -5, 1.4) crop_top = 0 crop_bottom = 0 crop_left = 0 crop_right = 0 Crop(crop_left, crop_top, -crop_right, -crop_bottom) crop_top_bottom = (crop_top + crop_bottom) / 2 crop_left_right = (crop_left + crop_right) / 2 AddBorders(crop_left_right, crop_top_bottom, crop_left_right, crop_top_bottom) #TurnRight() LanczosResize(576, 432)
file.avs
в новом VirtualDubModx264.exe
и avisynth.dll
должны совпадать): set OPTS=--bitrate %3 --preset placebo --tune film --profile high444 --level 4.1 -o %2 %1 x264 --pass 1 %OPTS% x264 --pass 2 %OPTS%
file.d2v
) и (несколько) AC3 или WAV.
Для создания
.idx
файла можно воспользоваться утилитой VSRip.
file.avs
) в качестве эталона: LoadPlugin("C:\Programs\GordianKnot\DGMPGDec\DGDecode.dll") mpeg2source("file.d2v") FieldDeinterlace() # Convert to YV 4:2:0 to enable fast processing: ConvertToYV12() # It could happen that some filters require YUV 4:4:4 – then use this function available in AviSynth 2.6: #ConvertToYV24() #Tweak(0, 1, -5, 1.4) #Levels(20, 1, 240, 0, 255) border_top = 0 border_bottom = 0 border_left = 0 border_right = 0 crop_top = 0 crop_bottom = 0 crop_left = 0 crop_right = 0 Crop(crop_left + border_left, crop_top + border_top, -crop_right -border_right, -crop_bottom -border_bottom) border_top_bottom = (border_top + border_bottom) / 2 border_left_right = (border_left + border_right) / 2 AddBorders(border_left_right, border_top_bottom, border_left_right, border_top_bottom) # Assuming 720x576 -> 640x480 LanczosResize(640,480)
file.avs
в VirtualDubMod и:
Используя плагин ffms2 (остальное – как выше):
LoadPlugin("C:\Programs\AviSynth\plugins\ffms2.dll") file="A1.MP4" FFIndex(file) # создаёт индекс (выполняется один раз) AudioDub(FFVideoSource(file), FFAudioSource(file)) # [optional as plugin already works in this color space] Convert to YV 4:2:0 to enable fast processing: #ConvertToYV12() #Levels(10, 1, 200, 0, 255) #Turn180() #FadeIn(15) #FadeOut(15) LanczosResize(960, 540)
–video-filter resize:width=1280,height=720,method=lanczos
для видео 1920×1080).Смотри также:
TransMarbles
, TransBubbles
, TransDisco
, TransPaint
, TransRipple
, TransRipples
, TransScratch
, TransSwirl
, TransWeave
) TransDisco(DirectShowSource("P1010064.MOV"), \ TransDisco(DirectShowSource("P1010106.MOV"), DirectShowSource("P1010134.MOV"), 40) \ , 40)
-crf 23
(default) or -crf 28
(worth).
function BlurBox(clip v, int x, int y, int w, int h, int "blur_factor") { blur_factor = Default(blur_factor, 1) sx = Max(v.width / blur_factor * 2, 12) # Spline36Resize() requires at least 12 pixels width sy = Max(v.height / blur_factor * 2, 12) # Spline36Resize() requires at least 12 pixels height w = w / 2 * 2 # force even for YV12, YUY2 h = h / 2 * 2 # force even for YV12 Spline36Resize(v, sx, sy) Blur(1.0) Spline36Resize(v.width, v.height) Spline36Resize(w,h,x,y,w,h) # alternate for Crop(x/2*2, y/2*2, w, h), allows odd x,y values Overlay(v, last, x, y) } ... video.BlurBox(600, 345, 80, 20, 20)
See also Compatibility table for some devices and x264 Presets.
pv
would be more universal, but won't work for .avs
input.
myvideo.avi
создать файл myvideo.avs
:
c = ConvertToRGB32() w = c.width()/2 h = c.height()/2 LeftRight3DToRCAnaglyph(c).Lanczos4Resize(w, h)
avs [error]: failed to load avisynth
is reported ×64 version of x264 can work only with ×64 version of AviSynth.
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4
exiftool -rotation=270 input.mp4
$ for i in `seq 1 10`; do gm convert -pointsize 500 -gravity center label:$i -geometry 400x400 -extent 400x400 image_$i.jpg; done $ ffmpeg -framerate 1 -i image_%d.jpg -vcodec libx264 -profile:v high422 -preset veryslow -refs 16 -vf "fps=25,format=yuv420p" out.mkv ffmpeg version 3.2.10-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers Input #0, image2, from 'image_%d.png': Duration: 00:00:10.00, start: 0.000000, bitrate: N/A Stream #0:0: Video: png, rgb48be(pc), 400x400, 1 fps, 1 tbr, 1 tbn, 1 tbc [libx264 @ 0x1fb63c0] using cpu capabilities: MMX2 SSE Cache64 [libx264 @ 0x1fb63c0] profile High, level 3.1 [libx264 @ 0x1fb63c0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, matroska, to 'demo.mkv': Metadata: encoder : Lavf57.56.101 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 400x400, q=-1--1, 25 fps, 1k tbn, 25 tbc Metadata: encoder : Lavc57.64.101 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (png (native) -> h264 (libx264)) Press [q] to stop, [?] for help frame= 75 fps=0.0 q=28.0 size= 1kB time=00:00:00.00 bitrate=5912.0kbits/s speed=0.0011x frame= 100 fps= 54 q=28.0 size= 1kB time=00:00:01.00 bitrate= 5.9kbits/s speed=0.543x frame= 125 fps= 43 q=28.0 size= 1kB time=00:00:02.00 bitrate= 3.0kbits/s speed=0.687x frame= 150 fps= 35 q=28.0 size= 8kB time=00:00:03.00 bitrate= 23.1kbits/s speed=0.694x frame= 175 fps= 30 q=28.0 size= 8kB time=00:00:04.00 bitrate= 17.3kbits/s speed=0.682x frame= 200 fps= 29 q=28.0 size= 8kB time=00:00:05.00 bitrate= 13.9kbits/s speed=0.725x frame= 225 fps= 27 q=28.0 size= 17kB time=00:00:06.00 bitrate= 22.8kbits/s speed=0.73x frame= 225 fps= 23 q=28.0 size= 17kB time=00:00:06.00 bitrate= 22.8kbits/s speed=0.617x frame= 226 fps= 19 q=-1.0 Lsize= 29kB time=00:00:08.92 bitrate= 26.2kbits/s speed=0.737x video:26kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.342590% [libx264 @ 0x1fb63c0] frame I:4 Avg QP:15.23 size: 2370 [libx264 @ 0x1fb63c0] frame P:27 Avg QP:15.90 size: 403 [libx264 @ 0x1fb63c0] frame B:195 Avg QP:18.88 size: 31 [libx264 @ 0x1fb63c0] consecutive B-frames: 1.8% 1.8% 0.0% 0.0% 2.2% 2.7% 0.0% 0.0% 91.6% [libx264 @ 0x1fb63c0] mb I I16..4: 30.5% 60.7% 8.8% [libx264 @ 0x1fb63c0] mb P I16..4: 0.5% 0.7% 0.8% P16..4: 2.2% 0.7% 2.7% 0.1% 0.0% skip:92.2% [libx264 @ 0x1fb63c0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 2.2% 0.0% 0.0% direct: 0.0% skip:97.8% L0:47.8% L1:52.2% BI: 0.0% [libx264 @ 0x1fb63c0] 8x8 transform intra:57.8% inter:8.3% [libx264 @ 0x1fb63c0] direct mvs spatial:97.9% temporal:2.1% [libx264 @ 0x1fb63c0] coded y,uvDC,uvAC intra: 21.2% 0.8% 0.8% inter: 0.1% 0.0% 0.0% [libx264 @ 0x1fb63c0] i16 v,h,dc,p: 34% 11% 55% 0% [libx264 @ 0x1fb63c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 11% 49% 2% 0% 0% 0% 0% 0% [libx264 @ 0x1fb63c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 14% 37% 9% 3% 3% 3% 5% 4% [libx264 @ 0x1fb63c0] i8c dc,h,v,p: 29% 71% 1% 0% [libx264 @ 0x1fb63c0] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x1fb63c0] ref P L0: 80.2% 0.9% 9.6% 1.8% 0.4% 1.3% 4.8% 0.6% 0.3% [libx264 @ 0x1fb63c0] ref B L0: 69.1% 15.4% 6.6% 3.6% 1.8% 2.1% 0.8% 0.2% 0.2% 0.0% 0.1% 0.1% [libx264 @ 0x1fb63c0] ref B L1: 90.8% 9.2% [libx264 @ 0x1fb63c0] kb/s:23.29
-vf scale=-1:1080
-profile:v baseline -level:v 2.1
To convert a series of images into animated GIF:
# Cygwin: $ bash -x -c "cat ""$@"" | ffmpeg -hide_banner -loglevel error -y -f image2pipe -framerate 1 -i - all.flv && ffmpeg -hide_banner -loglevel error -y -i all.flv all.gif && rm all.flv" -- image_a.png image_b.png # Linux: $ cat image_a.png image_b.png | ffmpeg -hide_banner -loglevel error -y -f image2pipe -framerate 1 -i - all.flv && ffmpeg -hide_banner -loglevel error -y -i all.flv all.gif && rm all.flv
Смотри также:
Программа/функции | AviSynth2 | VirtualDubMod | GordianKnot | SUPER | MeGUI | FairUse | Ghost | AutoMKV | Handbrake | |
---|---|---|---|---|---|---|---|---|---|---|
Поддерживаемые видео кодеки | – | любой vfw установленный в системе | XVid, DivX, X.264 | – | – | – | – | – | – | |
Поддерживаемые аудио кодеки | – | любой установленный в системе | MP3, OGG | – | – | – | – | – | – | |
Поддерживаемые входящие контейнеры | – | AVI, MPG, MKV | AVI, OGM, MKV | – | – | – | – | – | – | |
Поддерживаемые результирующие контейнеры | – | AVI, MPG, MKV | – | – | – | – | – | – | – | |
Задание языка для аудио/видео | – | поддержка есть, но не работает | – | – | – | – | – | – | – | |
Главы | – | – | – | – | – | – | – | – | – | |
Субтитры | – | – | – | – | – | – | – | – | – | |
Просмотр исходного видео | – | + | + | – | – | – | – | – | – | |
Просмотр видео после наложения фильтров/эффектов | – | + | – | – | – | – | – | – | – | |
Задание интервалов для кодирования | – | + | – | – | – | – | – | – | – | |
Cropping | – | + | + | – | – | – | – | – | – | |
Adding borders | – | + | – | – | – | – | – | – | – | |
Наложение простых аудио эффектов (fade-in/fade-out) | – | + | – | – | – | – | – | – | – | |
Наложение простых видео эффектов (fade-in/fade-out) | – | + | – | – | – | – | – | – | – |
"Девица не хочет лезть в Окно" – device not compatible with Windows.