diff --git a/test/movie/vbam/chapters.txt b/test/movie/vbam/chapters.txt new file mode 100644 index 00000000..088b3fb5 --- /dev/null +++ b/test/movie/vbam/chapters.txt @@ -0,0 +1,2 @@ +XX001 +X0001 diff --git a/test/movie/vbam/chapters.vm0 b/test/movie/vbam/chapters.vm0 new file mode 100644 index 00000000..c33888f2 Binary files /dev/null and b/test/movie/vbam/chapters.vm0 differ diff --git a/test/movie/vbam/chapters.vmv b/test/movie/vbam/chapters.vmv new file mode 100644 index 00000000..d518360c Binary files /dev/null and b/test/movie/vbam/chapters.vmv differ diff --git a/test/movie/vbam/merge.py b/test/movie/vbam/merge.py new file mode 100755 index 00000000..ee6ea0c2 --- /dev/null +++ b/test/movie/vbam/merge.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +import os +import sys +import shutil + +fnIn = os.path.splitext(sys.argv[1])[0] + +with open(fnIn + '.txt', 'r') as fIn, open(fnIn + '.vmv', 'wb') as fOut: + first = True + for fnMovie in [l.strip() for l in fIn.readlines()]: + if fnMovie: + if first: + first = False + shutil.copyfile(fnMovie + '.vm0', fnIn + '.vm0') + with open(fnMovie + '.vmv', 'rb') as f: + fOut.write(f.read()) + continue + with open(fnMovie + '.vmv', 'rb') as f: + f.seek(4) # skip vmv header which specifies movie format version, only version 2 is supported now + fOut.write(f.read())