Music Fan
8th July 2022, 22:32
Hi,
I generally use this command to get txt files (including keyframe's numbers and their resolution) adding the word "reso" after original's video names ;
for %a in ("L:\vid\*.mp4") do ffprobe -v error -show_entries frame=pkt_pts_time,width,height -select_streams v -skip_frame nokey -of csv=p=0 "%a" > "L:\vid\%~na reso.txt"
This time I need to include subfolders but I can't make it work. I read this page ;
https://ss64.com/nt/for_r.html
and tried to adpat the command as this ;
For /R "L:\vid\" %a in (*.mp4) do ffprobe -v error -show_entries frame=pkt_pts_time,width,height -select_streams v -skip_frame nokey -of csv=p=0 "%a" > "%~na reso.txt"
There is no error message but no file is created while I see the names of txt files in the command prompt :confused:
Do I forget anything ?
Each txt file has to be written in the same directory than each video.
edit ;
If I specify an output folder, it works but txt files are all written in this folder, which is not what I want (they should be in the respective subfolders) ;
For /R "L:\vid\" %a in (*.mp4) do ffprobe -v error -show_entries frame=pkt_pts_time,width,height -select_streams v -skip_frame nokey -of csv=p=0 "%a" > "L:\vid\%~na reso.txt"
I generally use this command to get txt files (including keyframe's numbers and their resolution) adding the word "reso" after original's video names ;
for %a in ("L:\vid\*.mp4") do ffprobe -v error -show_entries frame=pkt_pts_time,width,height -select_streams v -skip_frame nokey -of csv=p=0 "%a" > "L:\vid\%~na reso.txt"
This time I need to include subfolders but I can't make it work. I read this page ;
https://ss64.com/nt/for_r.html
and tried to adpat the command as this ;
For /R "L:\vid\" %a in (*.mp4) do ffprobe -v error -show_entries frame=pkt_pts_time,width,height -select_streams v -skip_frame nokey -of csv=p=0 "%a" > "%~na reso.txt"
There is no error message but no file is created while I see the names of txt files in the command prompt :confused:
Do I forget anything ?
Each txt file has to be written in the same directory than each video.
edit ;
If I specify an output folder, it works but txt files are all written in this folder, which is not what I want (they should be in the respective subfolders) ;
For /R "L:\vid\" %a in (*.mp4) do ffprobe -v error -show_entries frame=pkt_pts_time,width,height -select_streams v -skip_frame nokey -of csv=p=0 "%a" > "L:\vid\%~na reso.txt"