Good morning. I am trying to obtain a list of I frames from a video and will use it to convert with cutting and joining but the command line hangs after initially opening.
CMD file
Output to ScreenCode:setlocal enabledelayedexpansion for /F "tokens=5,6,16,17 delims=," %%b in ('findstr /I "I" "ffprobe.csv"') do ( set "x=%%b" set "y=%%c" set "z=%%d" set "w=%%e" echo !Number! !x:~0,10! !z:~-8! !w:~0,8! >> "Frames.txt" set /A "Number=!Number!+1" )
It hangs at this point but if I hit control C and answer 'N' to terminating, it continues on to finish. Is there a glitch in the CLI or do I have something missing/wrong?C:\Users\Bud\Desktop\parameters264\New folder>"C:\Users\Bud\Desktop\parameters264\New folder\strip ffprobecsv.cmd"
C:\Users\Bud\Desktop\parameters264\New folder>setlocal enabledelayedexpansion
C:\Users\Bud\Desktop\parameters264\New folder>for /F "tokens=5,6,16,17 delims=," %b in ('findstr /I "I" "ffprobe.csv"') do (
set "x=%b"
set "y=%c"
set "z=%d"
set "w=%e"
echo !Number! !x:~0,10! !z:~-8! !w:~0,8! 1>>"Frames.txt"
set /A "Number=!Number!+1"
)
Any help would be appreciated.
Thanks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 2 of 2
Thread
-
-
In case anyone is interested, (no responses so far) I searched under many many different parameters and finally found a reference to this hang.
I just verified that it's indeed findstr that hangs, if the last input line on stdin does not end with a CR/LF.
It seems crazy that such a bug has remained unfixed for so long!
To reproduce the bug, create a text file with notepad, containing a single line with no end of line. Ex: "notepad t.txt" containing "Line 1"
Then run:
findstr Line <t.txt
Note that find does not have that problem: The following command works:
find "Line" <t.txt
Possible workarounds until Microsoft fixes the bug:
type t.txt | findstr Line
findstr Line t.txt
setlocal enabledelayedexpansion
for /F "tokens=5,6,16,17 delims=," %b in ('find "I" "ffprobe.csv"') do (
set "x=%b"
set "y=%c"
set "z=%d"
set "w=%e"
echo !Number! !x:~0,10! !z:~-8! !w:~0,8! 1>>"Frames.txt"
set /A "Number=!Number!+1"
)Last edited by Budman1; 3rd Mar 2018 at 02:19.
Similar Threads
-
Trying to use CMD line for eac3to
By Lathe in forum AudioReplies: 45Last Post: 14th Feb 2018, 20:40 -
how to convert audio file using sox through cmd
By mv19 in forum AudioReplies: 1Last Post: 7th Jan 2018, 06:00 -
Please help on my 2-pass (Windows) ffmpeg cmd (SOLVED)
By SameSelf in forum Video ConversionReplies: 2Last Post: 26th May 2017, 13:41 -
cmd.exe
By blinky88 in forum Newbie / General discussionsReplies: 10Last Post: 15th Mar 2015, 10:36 -
Windows XP3 - cmd.exe
By blinky88 in forum Newbie / General discussionsReplies: 1Last Post: 10th Mar 2015, 04:36