Log in

View Full Version : VapourSynth fails; can't create '.ffindex' files on read-only disc


markfilipak
8th September 2021, 04:33
VapourSynth fails because it can't create it's '.ffindex' files on 'g:', a read-only virtual disc.
Is there a workaround? The assembly and processing is all done by a 421-line Windows cmd script and I really don't want to have to make it copy all the source files to a read-write disk.

I apologize for being so ignorant. Thanks for your suggestions,
Mark Filipak.

Optional reading follows.
Command line:
VSPIPE --y4m "C:\AVout\02615.210907-225902.35.MKV.vpy" - | FFMPEG -report -thread_queue_size 200000000 -i pipe: -i "concat:'g:\BDMV\STREAM\02615.M2TS'|'g:\BDMV\STREAM\02616.M2TS'|'g:\BDMV\STREAM\02619.M2TS'|'g:\BDMV\STREAM\02620.M2TS'|'g:\BDMV\STREAM\02622.M2TS'|'g:\BDMV\STREAM\02623.M2TS'|'g:\BDMV\STREAM\02624.M2TS'|'g:\BDMV\STREAM\02626.M2TS'|'g:\BDMV\STREAM\02627.M2TS'|'g:\BDMV\STREAM\02629.M2TS'|'g:\BDMV\STREAM\02630.M2TS'|'g:\BDMV\STREAM\02632.M2TS'|'g:\BDMV\STREAM\02633.M2TS'|'g:\BDMV\STREAM\02635.M2TS'|'g:\BDMV\STREAM\02636.M2TS'|'g:\BDMV\STREAM\02637.M2TS'|'g:\BDMV\STREAM\02639.M2TS'|'g:\BDMV\STREAM\02640.M2TS'|'g:\BDMV\STREAM\02642.M2TS'|'g:\BDMV\STREAM\02643.M2TS'|'g:\BDMV\STREAM\02645.M2TS'|'g:\BDMV\STREAM\02646.M2TS'|'g:\BDMV\STREAM\02648.M2TS'|'g:\BDMV\STREAM\02649.M2TS'|'g:\BDMV\STREAM\02651.M2TS'|'g:\BDMV\STREAM\02652.M2TS'|'g:\BDMV\STREAM\02658.M2TS'" -filter_complex "[0:v]settb=expr=1/120,setpts=expr=N,setdar=16/9,setsar=1/1[v];[1:a:0]atempo=1.001[a0];[1:a:1]atempo=1.001[a1];[1:a:2]atempo=1.001[a2];[1:a:3]atempo=1.001[a3];[1:a:4]atempo=1.001[a4];[1:a:5]atempo=1.001[a5]" -map "[v]" -map "[a0]" -map "[a1]" -map "[a2]" -map "[a3]" -map "[a4]" -map "[a5]" -map 1:s -codec:v hevc_nvenc -strict -2 -codec:a:0 dts -codec:a:1 ac3 -codec:a:2 ac3 -codec:a:3 ac3 -codec:a:4 ac3 -codec:a:5 ac3 -codec:s copy -r 120 "C:\AVout\02615.210907-225902.35.MKV"
Console output:
Script evaluation failed:
Python exception: Index: Failed to open 'g:\BDMV\STREAM\02615.m2ts.ffindex'

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2244, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 2245, in vapoursynth.vpy_evaluateScript
File "C:\AVout\02615.210907-215239.22.MKV.vpy", line 3, in <module>
video0=core.ffms2.Source(source=r'g:\BDMV\STREAM\02615.m2ts')
File "src\cython\vapoursynth.pyx", line 2069, in vapoursynth.Function.__call__
vapoursynth.Error: Index: Failed to open 'g:\BDMV\STREAM\02615.m2ts.ffindex'
C:\AVout\02615.210907-225902.35.MKV.vpy:
from vapoursynth import core
import havsfunc as havsfunc
video0=core.ffms2.Source(source=r'g:\BDMV\STREAM\02615.m2ts')
video1=core.ffms2.Source(source=r'g:\BDMV\STREAM\02616.m2ts')
video2=core.ffms2.Source(source=r'g:\BDMV\STREAM\02619.m2ts')
video3=core.ffms2.Source(source=r'g:\BDMV\STREAM\02620.m2ts')
video4=core.ffms2.Source(source=r'g:\BDMV\STREAM\02622.m2ts')
video5=core.ffms2.Source(source=r'g:\BDMV\STREAM\02623.m2ts')
video6=core.ffms2.Source(source=r'g:\BDMV\STREAM\02624.m2ts')
video7=core.ffms2.Source(source=r'g:\BDMV\STREAM\02626.m2ts')
video8=core.ffms2.Source(source=r'g:\BDMV\STREAM\02627.m2ts')
video9=core.ffms2.Source(source=r'g:\BDMV\STREAM\02629.m2ts')
video10=core.ffms2.Source(source=r'g:\BDMV\STREAM\02630.m2ts')
video11=core.ffms2.Source(source=r'g:\BDMV\STREAM\02632.m2ts')
video12=core.ffms2.Source(source=r'g:\BDMV\STREAM\02633.m2ts')
video13=core.ffms2.Source(source=r'g:\BDMV\STREAM\02635.m2ts')
video14=core.ffms2.Source(source=r'g:\BDMV\STREAM\02636.m2ts')
video15=core.ffms2.Source(source=r'g:\BDMV\STREAM\02637.m2ts')
video16=core.ffms2.Source(source=r'g:\BDMV\STREAM\02639.m2ts')
video17=core.ffms2.Source(source=r'g:\BDMV\STREAM\02640.m2ts')
video18=core.ffms2.Source(source=r'g:\BDMV\STREAM\02642.m2ts')
video19=core.ffms2.Source(source=r'g:\BDMV\STREAM\02643.m2ts')
video20=core.ffms2.Source(source=r'g:\BDMV\STREAM\02645.m2ts')
video21=core.ffms2.Source(source=r'g:\BDMV\STREAM\02646.m2ts')
video22=core.ffms2.Source(source=r'g:\BDMV\STREAM\02648.m2ts')
video23=core.ffms2.Source(source=r'g:\BDMV\STREAM\02649.m2ts')
video24=core.ffms2.Source(source=r'g:\BDMV\STREAM\02651.m2ts')
video25=core.ffms2.Source(source=r'g:\BDMV\STREAM\02652.m2ts')
video26=core.ffms2.Source(source=r'g:\BDMV\STREAM\02658.m2ts')
video=video0+video1+video2+video3+video4+video5+video6+video7+video8+video9+video10+video11+video12+video13+video14+video15+video16+video17+video18+video19+video20+video21+video22+video23+video24+video25+video26
video=havsfunc.InterFrame(video,Preset="medium",Tuning="smooth",InputType="2D",NewNum=120000,NewDen=1001,GPU=True)
video=core.std.AssumeFPS(video,fpsnum=120000,fpsden=1001)
video.set_output()

Quadratic
8th September 2021, 05:13
Write your cache file in a temporary location. Since you're dealing with so many files, it would be best to try and automate this.
https://github.com/FFMS/ffms2/blob/master/doc/ffms2-vapoursynth.md#string-cachefile--source--ffindex

core.ffms2.Source('00000.m2ts', cachefile='/foo/bar.ffindex')

ChaosKing
8th September 2021, 07:01
An alternative could be L-SMASH https://github.com/AkarinVS/L-SMASH-Works/releases
The developer added 3 versions with different default save locations of the index file. See Release Variants here https://github.com/AkarinVS/L-SMASH-Works/releases/tag/vA.3e

_Al_
8th September 2021, 14:29
Also you can automatize this using HolyWu's ReadMpls plugin, where it loads by playlist and list of clips is created within for ... in ... : line: then you just splice those clips using that list.
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-ReadMpls

markfilipak
8th September 2021, 14:58
Write your cache file in a temporary location. Since you're dealing with so many files, it would be best to try and automate this.
I'm trying to automate the whole enchilada. I hope to eventually extract directly from '.mpls' and '.ifo' files.

https://github.com/FFMS/ffms2/blob/master/doc/ffms2-vapoursynth.md#string-cachefile--source--ffindex

Thanks! Since the '.vpy' file will always be on read-write media, for simplity, is it possible to change the default
from this: string cachefile = source + ".ffindex",
to this: string cachefile = vpyfolder + sourcename.type + ".ffindex"?

I've been at this for a year now. At age 75, a year is a huge investment. A 241-line cmd script seems a pitiful return.

markfilipak
8th September 2021, 15:11
Also you can automatize this using HolyWu's ReadMpls plugin, where it loads by playlist and list of clips is created within for ... in ... : line: then you just splice those clips using that list.
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-ReadMpls
OHMYGOD! You posted this while I was composing my response to Quadratic.

I have a meta-question. Is it possible to pull all this stuff together in one location? I'd be willing to buy the location and do site development. I'd be willing to pay to establish a foundation to manage and coordinate it. I'd be willing to pay bounties to populate it.

You folks are so much more experienced than me. All I know is video (analog and digital) and ffmpeg (somewhat) and vapoursynth (novice) and python (hardly not at all except that I'm quite experienced with various object languages).

markfilipak
8th September 2021, 15:20
I have a meta-question about doom9. I apologize for posting it here but I see no other way.

I get zero reply notices. And doom9 keeps logging me out. I've not found a way to fix them. Is there a way?

ChaosKing
8th September 2021, 16:38
I'm trying to automate the whole enchilada. I hope to eventually extract directly from '.mpls' and '.ifo' files.



Thanks! Since the '.vpy' file will always be on read-write media, for simplity, is it possible to change the default
from this: string cachefile = source + ".ffindex",
to this: string cachefile = vpyfolder + sourcename.type + ".ffindex"?



Here's a simple wrapper function for that:

import os

# myFolder needs to be created manually!
def ffSource(source, myPath = r"D:\myFolder"):
return core.ffms2.Source(source = source, cachefile = os.path.join(myPath, os.path.basename(source) + ".ffindex"))

# use like this then
clip = ffSource(source=r"F:\VTS_01_CHAPTER_03_1.VOB")


I get zero reply notices. And doom9 keeps logging me out. I've not found a way to fix them. Is there a way?
I would delete all doom9 cookies, restart browser and then it should hopefully work again without logouts. :D

markfilipak
9th September 2021, 21:37
core.ffms2.Source('00000.m2ts', cachefile='/foo/bar.ffindex')

Thanks so much!

After a few stumbles, it now works. I'm writing the '.ffindex' files to the target folder instead of the source folder (which is on read-only media).

markfilipak
10th September 2021, 00:15
I get zero reply notices. And doom9 keeps logging me out. I've not found a way to fix them. Is there a way?
I would delete all doom9 cookies, restart browser and then it should hopefully work again without logouts. :D
Hahaha... I royally screwed up. I deleted the doom9 password by mistake. Fortunately, I run my browser as a portable app, and with a virtual USB drive, so I was able to save the current VUSB and attach my backup VUSB and log in with that and recover the password. Hopefully, deleting the cookies will work. Thanks for the tip.

markfilipak
10th September 2021, 06:14
Also you can automatize this using HolyWu's ReadMpls plugin, where it loads by playlist and list of clips is created within for ... in ... : line: then you just splice those clips using that list.
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-ReadMpls
OHMYGOD! You posted this while I was composing my response to Quadratic. And it's just what I want... almost.

Does anyone have a build that's a plug-in -- DLL? I think so -- for Windows?

kedautinh12
10th September 2021, 06:46
OHMYGOD! You posted this while I was composing my response to Quadratic. And it's just what I want... almost.

Does anyone have a build that's a plug-in -- DLL? I think so -- for Windows?

HolyWu was compiled .dll in version release
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-ReadMpls/releases