mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
mtp/vidchk: grab some frames at the start too
This commit is contained in:
parent
204bfac3fa
commit
095bd17d10
|
@ -71,8 +71,8 @@ def main():
|
||||||
except:
|
except:
|
||||||
return "could not determine resolution"
|
return "could not determine resolution"
|
||||||
|
|
||||||
# grab streams/format metadata + the final keyframe (and the next 2 seconds of frames after it)
|
# grab streams/format metadata + 2 seconds of frames at the start and end
|
||||||
zs = "ffprobe -hide_banner -v warning -of json -show_streams -show_format -show_packets -show_data_hash crc32 -read_intervals 999999%+2"
|
zs = "ffprobe -hide_banner -v warning -of json -show_streams -show_format -show_packets -show_data_hash crc32 -read_intervals %+2,999999%+2"
|
||||||
cmd = zs.encode("ascii").split(b" ") + [fsenc(fp)]
|
cmd = zs.encode("ascii").split(b" ") + [fsenc(fp)]
|
||||||
p = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
|
p = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
|
||||||
so, se = p.communicate()
|
so, se = p.communicate()
|
||||||
|
|
Loading…
Reference in a new issue