Package: vssource
vs-sourceDVDs were an error, but can be nice to use with this package.A wrapper for DVD file structure and ISO files.For support you can check out theJET Discord server.How to installInstallvssourcewith the following command:pipinstallvssourceOr if you want the latest git version, install it with this command:pipinstallgit+https://github.com/Jaded-Encoding-Thaumaturgy/vs-source.gitOne of these plugins is required:dvdsrc2d2vSource and either DGIndex orpatched d2vwitchDGIndex is recommended over d2vwitch as the latter has various problems.It can also be used under linux with wine; notice that doing it requiresbinfmtanddgindexin PATH.chmod+xDGIndex.exe
sudoln-s$(pwd)/DGIndex.exe/usr/bin/dgindexOptional dependecies:dvdsrc_dvdnav_title_ptt_testto automatically check the chapters againstlibdvdnav.dvdsrcto automatically double-check the determined dvdstrucut agaist libdvdread.mpvto determine chapter splits by loading the DVD and hitting I or using it like this:mpv--dvd-device=<iso>dvd://<title># mpv titles are zero-indexed# vssource titles indices start from 1# sometimes it is useful to to scale the osc down# --script-opts=osc-scalewindowed=0.4,osc-scalefullscreen=0.4Related to mpv, thempv-dvd-browserplugin can be useful for this too.Getting a vs.AudioNode and demuxing AC3requiresdvdsrc2The only codecs offically supported are: stereo 16bit LPCM and AC3UsageAfter installation, functions can be loaded and used as follows:fromvssourceimportIsoFile,D2VWitch,DGIndexfromvstoolsimportset_output# Autodetect what to index withiso=IsoFile('.\DVD_VIDEOS\Suzumiya_2009_DVD\KABA_6001.ISO')# Force index with dgindexiso=IsoFile('.\SOME_DVD_FOLDER\HARUHI',indexer=DGIndex)title1=iso.get_title(1)# prints audio and chapter informationprint(title1)title1.video.set_output(0)title1.audios[0].set_output(1)title1.dump_ac3('full_title.ac3',0)# -1 is replace with end i.e 15ep1,ep2,ep3=title1.split_at([6,11])ep1,ep2,ep3=title1.split_ranges([(1,5),(6,10),(11,15)])ep1=title1.split_range(1,5)ep2=title1.split_range(6,10)ep3=title1.split_range(11,-1)# preview your splitstitle1.preview(title1.split_at([6,11]))ep1=title1.split_range(1,5,audio=0)print(ep1.chapters[:-1])set_output([ep1.video,ep1.audio,])a=ep1.ac3('/tmp/ep1.ac3',0)# a is in seconds of how much samples are there too much at the start## Advanced Usage# Remove junk from the endtitle1=iso.get_title(1)title1.chapters[-1]-=609title1.preview(title1.split_at([7,12]))#--------splits=[]# title 2 through 5 containe episodes# remove 'junk' from beginning# you can quickly check with previewforainrange(2,6):t=iso.get_title(a)t.chapters[0]+=180splits+=[t.split_at([])]t.preview(splits[-1])print(splits[0].ac3('/tmp/ep1.ac3'))# 0.019955555555555556#--------# multi angle + multi audio + rff mode# japanesea=iso.get_title(4,angle_nr=1,rff_mode=2).split_at([5,10,15],audio=1)# EP 1 japanesea[0].video.set_output(0)a[0].audio.set_output(1)# italianb=iso.get_title(4,angle_nr=2,rff_mode=2).split_at([5,10,15],audio=0)# ep 2 italianb[1].video.set_output(0)b[1].audios[0].set_output(1)TheTitle.split_atmethod should behave just like mkvmerge chapter splits (split before the chapter, first chapter is 1), so if you want the (first chapter, all other chapters after).Output chapters always start with frame zero and end at last frame.