diff --git a/auto2.py b/auto2.py new file mode 100644 index 0000000..5cd4737 --- /dev/null +++ b/auto2.py @@ -0,0 +1,21 @@ +import os +import sys +import convert2 + +if __name__ == "__main__": + if len(sys.argv) == 2: + videofile = sys.argv[1] + else: + print("ERROR: invalid command line. example: python auto.py inputvideo.264") + exit() + + dump_log = 'dump.log' + #dec_cmd = 'ffmpeg -i ' + videofile + ' out_%04d.bmp -y' + #os.system(dec_cmd) + + dump_cmd = ' ldecod.exe ' + '>' + dump_log + os.system(dump_cmd) + + convert2.execute(dump_log) + + print('done') \ No newline at end of file diff --git a/convert2.py b/convert2.py index dc70d58..1bcfb42 100644 --- a/convert2.py +++ b/convert2.py @@ -58,8 +58,8 @@ def calc_skip_zeromv(skipflag, zeromv): def execute(dumpfile): w, h = get_size(dumpfile) skipflag, zeromv = parse_dump(dumpfile, w, h) - dump_to_file(skipflag, 'skip') - dump_to_file(zeromv, 'mvinfo') + #dump_to_file(skipflag, 'skip') + #dump_to_file(zeromv, 'mvinfo') skip_zeromv = calc_skip_zeromv(skipflag, zeromv) dump_to_file(skip_zeromv, 'skip_zeromv') return