Package: akashi-engine
AkashiA Next-Generation Video EditorAkashiis a next-generation video editor.You can edit your videos only by programs without being bothered with complex GUI.Akashi is still in the very early stages of development, andnot ready for productionin any sense.Examplefromakashi_coreimportak,gl...@ak.entry()defmain():withak.atom()asa1:withak.lane()as_:ak.text('Sample Text').fit_to(a1).poly(lambdae,b,p:e(p.x)<<e(p.x+300)|e(p.y)<<e(p.y+300))withak.lane()as_:@gl.entry(ak.frag)defblue_filter(buffer:ak.frag,color:gl.frag_color)->None:color.b*=2.0ak.video('./dog.mp4').ap(lambdah:h.duration(10).stretch(True),lambdah:h.frag(blue_filter))Installationpipinstallakashi-engineRequirementsSystem RequirementsLinux (tested on Debian 11)OpenGL core profile 4.2 or laterPython 3.10 or laterRuntime DependenciesFFmpeg 4.xSDL2, SDL_ttf, SDL_imageQt5If you use Debian, you can install these dependencies by the command below.aptinstallffmpegqtbase5-devlibsdl2-2.0-0libsdl2-image-2.0-0libsdl2-ttf-2.0-0Note: Windows support is planned for a future release.Getting StartedTBDFeaturesCode Driven DevelopmentVideo Editing in Akashi is completely code driven.You no longer need complex GUIs like timeline and inspectors.Rich and Fast Visual Effects by GPU ShadersIn Akashi, every step of the video editing process is dominated in Python.The Python codes on visual effects are compiled to shaders by the JIT compiler.This gives Python a super power which shaders have; performance far beyond any other languages and non-comparable expressions.Modern PythonType hinting is mandatory in Akashi, and we require you to do so.Basically, all errors are detected before runtime, and you will have a nice Python IntelliSense experience.This helps you write your codes more secure and easier.New-Fashioned User InterfaceBuilt-in Hot ReloadSeamless Editing by ASP🚧 Smart GUIBasic Video Editing FeaturesHardware Accerated Video Playback (VA-API)Audio Playback (PulseAudio)Image RenderingText Rendering (ttf/otf, outline, shadow, etc.)Basic 2D shapes (Rectangle, Circle, Round Rectangle, Triangle, Line, etc.)Rich Codec Backend (FFmpeg)Video EncodingGalleryTwo Videos With Subtitleshttps://user-images.githubusercontent.com/70841910/148137328-02665a2e-962a-4d82-9414-66fa94cc196e.mp4fromakashi_coreimportak,glfrom.configimportakconfigWIDTH=akconfig().video.resolution[0]HEIGHT=akconfig().video.resolution[1]VRES=list(map(lambdax:x//2,akconfig().video.resolution))defsubtitle(msg:str,dur:float):ak.text(msg).ap(lambdah:h.pos(VRES[0],VRES[1]+495),lambdah:h.duration(ak.sec(dur)),lambdah:h.fg(ak.Color.White,40),lambdah:h.font_path('./myfont.ttf'),)@ak.entry()defmain():withak.atom()asa1:withak.lane()as_:subtitle('Lorem ipsum dolor sit amet',3)subtitle('At magnam natus ut mollitia reprehenderit',3)withak.lane()as_:ak.line(100).ap(lambdah:h.begin(0,VRES[1]+500).end(VRES[0]*2,VRES[1]+500),lambdah:h.fit_to(a1),)withak.lane()as_:ak.video('./blue_city.mp4').duration(3).pos(*VRES).stretch(True)ak.video('./cherry.mp4').duration(3).pos(*VRES).stretch(True)Circle Animationhttps://user-images.githubusercontent.com/70841910/148137358-bd784005-84e2-48c7-9552-abeb638e73f1.mp4fromakashi_coreimportak,glfrom.configimportakconfigimportrandomrandom.seed(102)WIDTH=akconfig().video.resolution[0]HEIGHT=akconfig().video.resolution[1]VRES=list(map(lambdax:x//2,akconfig().video.resolution))defrandom_radius()->float:returnrandom.choice([10,20,40,80,120])defrandom_pos()->tuple[int,int]:return(random.randrange(0,WIDTH),random.randrange(0,HEIGHT*2))defrandom_color()->str:returnak.hsv(random.randrange(0,360),50,100)defcircle_lane(radius:float,pos:tuple[int,int],color:str):withak.lane()as_:@gl.entry(ak.poly)deffly(buffer:ak.poly,pos:gl.poly_pos)->None:pos.y+=buffer.time*50ak.circle(radius).ap(lambdah:h.pos(*pos),lambdah:h.color(color),lambdah:h.poly(fly))@ak.entry()defmain():withak.atom()asa1:foriinrange(100):circle_lane(random_radius(),random_pos(),random_color())withak.lane()as_:ak.rect(WIDTH,HEIGHT).fit_to(a1).pos(*VRES).color(ak.Color.White)