Closed liweijian closed 4 years ago
You can only run the module from the same folder where it is located.
We might add an installable (system-wide) executable at some point in the future though.
Regarding the title of your question: You can specify any video file name as a parameter, so you can run:
poetry run p1204_3 /path/to/fast.mp4 /path/to/someotherfile.mp4
Thanks @slhck for your quick reply.
Another question, does p1204_3 run in MacOS?
I got an error when trying to run the script.
$ poetry run p1204_3 fast.mp4
INFO:root:handle the following videos (# 1):
fast.mp4
ERROR:root:video parser is not build correctly, please check
Traceback (most recent call last):
File "/Users/tli/Downloads/toys/bitstream_mode3_p1204_3/p1204_3/bitstream_mode3_videoparser/PythonInterface/parse.py", line 78, in <module>
main()
File "/Users/tli/Downloads/toys/bitstream_mode3_p1204_3/p1204_3/bitstream_mode3_videoparser/PythonInterface/parse.py", line 59, in main
video_parser = videoparser.VideoParser(a["input"], a["dll"])
File "/Users/tli/Downloads/toys/bitstream_mode3_p1204_3/p1204_3/bitstream_mode3_videoparser/PythonInterface/lib/videoparser.py", line 15, in __init__
self.parser = pi.ParserInterface(self.input_file, dll_path)
File "/Users/tli/Downloads/toys/bitstream_mode3_p1204_3/p1204_3/bitstream_mode3_videoparser/PythonInterface/lib/parserinterface.py", line 17, in __init__
raise IOError("DLL file not found")
OSError: DLL file not found
ERROR:root:there was something wrong with fast.mp4
ERROR:root:please check the following command:
/Users/tli/Downloads/toys/bitstream_mode3_p1204_3/p1204_3/bitstream_mode3_videoparser/parser.sh "fast.mp4" --output "./tmp/fast.json.bz2"
ERROR:root:no bitstream stats file for fast.mp4
[
{}
]
I had problems getting the bitstream parser to run under macOS; there is an open PR here: https://github.com/Telecommunication-Telemedia-Assessment/bitstream_mode3_videoparser/pull/2
I think it would be best to run it under Ubuntu or within a Docker container. Sorry for not being able to provide a macOS version yet – it's a bit trickier.
I tried to run p1204_3 in another folder, and got errors as follow:
Just wondering if maybe anything I was missing?