I have a some YUV videos I want to run tests on but the test_video script fails with the following error:
FileNotFoundError: [Errno 2] No such file or directory: 'out_bin\\clic_mini\2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4/out.yuv'
What I think is happening:
- Line 466 in test_video.py:
args['curr_rec_path'] = args['curr_bin_path'].replace('.bin', '.mp4')
- Line 291 in test_video.py:
output_yuv_path = args['curr_rec_path'].replace('.yuv', f'_{total_kbps}kbps.yuv')
This two lines cause the output path to look like: out_bin\\clic_mini\2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4
However, inside YUV420Writer:
class YUV420Writer():
def __init__(self, dst_path, width, height):
if not dst_path.endswith('.yuv'):
dst_path = dst_path + '/out.yuv'
self.dst_path = dst_path
self.width = width
self.height = height
self.file = open(dst_path, 'wb')
Since output_yuv_path end with .mp4, dst_path will end up as: out_bin\clic_mini\2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4/out.yuv'.
This create a path that goes through a directory that does not exist - 2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4, and as a result the line self.file = open(dst_path, 'wb') fails.
I currently don't see any mistake in the way I invoked the script, so any help would be appreciated.
I have a some YUV videos I want to run tests on but the test_video script fails with the following error:
FileNotFoundError: [Errno 2] No such file or directory: 'out_bin\\clic_mini\2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4/out.yuv'What I think is happening:
args['curr_rec_path'] = args['curr_bin_path'].replace('.bin', '.mp4')output_yuv_path = args['curr_rec_path'].replace('.yuv', f'_{total_kbps}kbps.yuv')This two lines cause the output path to look like:
out_bin\\clic_mini\2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4However, inside YUV420Writer:
Since
output_yuv_pathend with.mp4,dst_pathwill end up as:out_bin\clic_mini\2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4/out.yuv'.This create a path that goes through a directory that does not exist -
2b2883e1147e879ed7c423e0beccf3edde46d98462c26c965f1286086aba7df5_1922x1080_30fps_yuv420p_299frames_56kbps.yuv_q0.mp4, and as a result the lineself.file = open(dst_path, 'wb')fails.I currently don't see any mistake in the way I invoked the script, so any help would be appreciated.