CrypticSignal / video-quality-metrics

Uses FFmpeg to benchmark video encoders to compare VMAF/SSIM/PSNR with different encoder settings.
MIT License
117 stars 18 forks source link

VQM now also works with UNC paths #26

Closed InB4DevOps closed 3 years ago

InB4DevOps commented 3 years ago

eg \\server\share\file.mp4

prior way of getting filename and extension was unreliable and would often cause weird naming issues for the output folder. Fixed now.

>>> filename = '\\server\share\movies\my_super_duper_movie.mp4'
>>> filename.split('/')[-1] #this is the old way
'\\server\\share\\movies\\my_super_duper_movie.mp4'
>>> from pathlib import Path
>>> Path(filename).name
'my_super_duper_movie.mp4'
>>> Path(filename).suffix
'.mp4'

also unified the way we get the file extension