@@ -11,7 +11,6 @@ import 'package:path/path.dart' as path;
1111void main () {
1212 late String depsDir;
1313 late String vspipePath;
14- late String testVideoPath;
1514
1615 setUpAll (() async {
1716 // Find the deps directory relative to the test file
@@ -46,21 +45,7 @@ void main() {
4645 }
4746 }
4847
49- vspipePath = Platform .isWindows
50- ? path.join (depsDir, 'vapoursynth' , vspipeExe)
51- : path.join (depsDir, 'vapoursynth' , vspipeExe);
52-
53- // Create a simple test video (Y4M format - raw YUV)
54- testVideoPath = path.join (Directory .systemTemp.path, 'vapourbox_test.y4m' );
55- await _createTestVideo (testVideoPath);
56- });
57-
58- tearDownAll (() async {
59- // Clean up test video
60- final testFile = File (testVideoPath);
61- if (await testFile.exists ()) {
62- await testFile.delete ();
63- }
48+ vspipePath = path.join (depsDir, 'vapoursynth' , vspipeExe);
6449 });
6550
6651 group ('VapourSynth Plugin Loading' , () {
@@ -76,7 +61,7 @@ import vapoursynth as vs
7661core = vs.core
7762
7863# List all required plugins (core set that works on both Windows and macOS)
79- required = ['std', 'resize', 'bs', ' mv', 'znedi3', 'eedi3m', 'fmtc',
64+ required = ['std', 'resize', 'mv', 'znedi3', 'eedi3m', 'fmtc',
8065 'dfttest', 'neo_f3kdb', 'cas', 'dctf', 'deblock', 'rgvs',
8166 'ctmf', 'warp', 'misc', 'grain', 'tcanny']
8267
@@ -97,33 +82,13 @@ else:
9782 });
9883 });
9984
100- group ('FFMS2 Video Loading' , () {
101- test ('loads video with FFMS2' , () async {
102- final script = '''
103- import vapoursynth as vs
104- core = vs.core
105-
106- clip = core.ffms2.Source(source=r"$testVideoPath ")
107- print(f"Loaded: {clip.width}x{clip.height}, {clip.num_frames} frames")
108-
109- # Output a single frame to verify it works
110- clip = clip[0]
111- clip.set_output()
112- ''' ;
113-
114- final result = await _runVspipeScript (vspipePath, script, outputFrames: true );
115- expect (result.exitCode, 0 , reason: 'stderr: ${result .stderr }' );
116- expect (result.stdout.toString (), contains ('Loaded:' ));
117- });
118- });
119-
12085 group ('Filter Tests' , () {
12186 test ('Deband (neo_f3kdb) works' , () async {
12287 final script = '''
12388import vapoursynth as vs
12489core = vs.core
12590
126- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
91+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
12792clip = core.neo_f3kdb.Deband(clip, y=64, cb=64, cr=64)
12893print("Deband applied successfully")
12994clip = clip[0]
@@ -139,7 +104,7 @@ clip.set_output()
139104import vapoursynth as vs
140105core = vs.core
141106
142- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
107+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
143108clip = core.dfttest.DFTTest(clip, sigma=10.0)
144109print("DFTTest applied successfully")
145110clip = clip[0]
@@ -155,7 +120,7 @@ clip.set_output()
155120import vapoursynth as vs
156121core = vs.core
157122
158- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
123+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
159124clip = core.cas.CAS(clip, sharpness=0.5)
160125print("CAS applied successfully")
161126clip = clip[0]
@@ -171,8 +136,7 @@ clip.set_output()
171136import vapoursynth as vs
172137core = vs.core
173138
174- clip = core.bs.VideoSource(source=r"$testVideoPath ")
175- # Simple MVTools test - analyze motion
139+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1)
176140sup = core.mv.Super(clip)
177141vectors = core.mv.Analyse(sup, isb=False)
178142print("MVTools applied successfully")
@@ -189,8 +153,7 @@ clip.set_output()
189153import vapoursynth as vs
190154core = vs.core
191155
192- clip = core.bs.VideoSource(source=r"$testVideoPath ")
193- # ZNEDI3 for field interpolation
156+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1)
194157clip = core.znedi3.nnedi3(clip, field=1)
195158print("ZNEDI3 applied successfully")
196159clip = clip[0]
@@ -206,7 +169,7 @@ clip.set_output()
206169import vapoursynth as vs
207170core = vs.core
208171
209- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
172+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
210173clip = core.eedi3m.EEDI3(clip, field=1)
211174print("EEDI3 applied successfully")
212175clip = clip[0]
@@ -222,7 +185,7 @@ clip.set_output()
222185import vapoursynth as vs
223186core = vs.core
224187
225- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
188+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
226189clip = core.deblock.Deblock(clip, quant=25)
227190print("Deblock applied successfully")
228191clip = clip[0]
@@ -238,7 +201,7 @@ clip.set_output()
238201import vapoursynth as vs
239202core = vs.core
240203
241- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
204+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
242205clip = core.tcanny.TCanny(clip, sigma=1.5, mode=0)
243206print("TCanny applied successfully")
244207clip = clip[0]
@@ -272,7 +235,7 @@ import vapoursynth as vs
272235import havsfunc as haf
273236core = vs.core
274237
275- clip = core.bs.VideoSource(source=r"$ testVideoPath " )
238+ clip = core.std.BlankClip(width=64, height=64, format=vs.YUV420P8, length=10, fpsnum=25, fpsden=1 )
276239clip = haf.SMDegrain(clip, tr=1, thSAD=300)
277240print("SMDegrain applied successfully")
278241clip = clip[0]
@@ -285,28 +248,6 @@ clip.set_output()
285248 });
286249}
287250
288- /// Creates a simple Y4M test video (10 frames of 64x64 gray)
289- Future <void > _createTestVideo (String outputPath) async {
290- final file = File (outputPath);
291- final sink = file.openWrite ();
292-
293- // Y4M header
294- sink.write ('YUV4MPEG2 W64 H64 F25:1 Ip A1:1 C420\n ' );
295-
296- // 10 frames of gray
297- for (int frame = 0 ; frame < 10 ; frame++ ) {
298- sink.write ('FRAME\n ' );
299- // Y plane (64x64 = 4096 bytes) - gray value 128
300- sink.add (List .filled (64 * 64 , 128 ));
301- // U plane (32x32 = 1024 bytes) - neutral chroma
302- sink.add (List .filled (32 * 32 , 128 ));
303- // V plane (32x32 = 1024 bytes) - neutral chroma
304- sink.add (List .filled (32 * 32 , 128 ));
305- }
306-
307- await sink.close ();
308- }
309-
310251/// Runs a VapourSynth script via vspipe
311252Future <ProcessResult > _runVspipeScript (
312253 String vspipePath,
0 commit comments