iamtheky Posted March 5, 2015 Share Posted March 5, 2015 (edited) see #38, reset $FFmpeg right after you declare it $FFmpeg = FileGetShortName($FFmpeg) can you also consolewrite(FileGetShortName($FFmpeg)) and copy it into your bat to see if you get the same behavior. Edited March 5, 2015 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
dynamitemedia Posted March 5, 2015 Share Posted March 5, 2015 i had tried that before and thought was a typo ... i am now getting this: C:\Documents and Settings\admin\Desktop\Video App\www\recordings\XTreme4.flv C:\Documents and Settings\admin\Desktop\Video App\www\bin\ffmpeg.exe "C:\DOCUME~1\admin\Desktop\VIDEOA~1\www\bin\ffmpeg.exe" -i "C:\DOCUME~1\admin\Desktop\VIDEOA~1\www\RECORD~1\XTreme4.flv" The filename, directory name, or volume label syntax is incorrect. Link to comment Share on other sites More sharing options...
iamtheky Posted March 5, 2015 Share Posted March 5, 2015 (edited) awesome one step forward, now undo the shortname for the file. Just declare that one normally, the quotes built into the $sCommands will handle the spaces in that path. so as you had it renaming rVideo to sFile should work in the command with no further mod (or of course changing the name in the command to your preference, same same): Global $recordings = @ScriptDir & "\www\recordings" $rName = "World of Martial Arts Television_11_11_02_32_2014.flv" $sFile = $recordings & "\" & $rName Edited March 5, 2015 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
dynamitemedia Posted March 5, 2015 Share Posted March 5, 2015 (edited) awesome one step forward, now undo the shortname for the file. Just declare that one normally, the quotes built into the $sCommands will handle the spaces in that path. yep already did that and same error C:\Documents and Settings\admin\Desktop\Video App\www\recordings\XTreme4.flv C:\Documents and Settings\admin\Desktop\Video App\www\bin\ffmpeg.exe "C:\DOCUME~1\admin\Desktop\VIDEOA~1\www\bin\ffmpeg.exe" -i "C:\Documents and Settings\admin\Desktop\Video App\www\recordings\XTreme4.flv" The filename, directory name, or volume label syntax is incorrect. Edited March 5, 2015 by dynamitemedia Link to comment Share on other sites More sharing options...
dynamitemedia Posted March 5, 2015 Share Posted March 5, 2015 awesome one step forward, now undo the shortname for the file. Just declare that one normally, the quotes built into the $sCommands will handle the spaces in that path. so as you had it renaming rVideo to sFile should work in the command with no further mod (or of course changing the name in the command to your preference, same same): the problem is ffmpeg is i a different directory , i need to be able to leave ffmpeg where it is and call it from there Link to comment Share on other sites More sharing options...
iamtheky Posted March 5, 2015 Share Posted March 5, 2015 its not, you are past the ffmpeg error on on to an error with the argument. here is proof that it works just fine: ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
dynamitemedia Posted March 5, 2015 Share Posted March 5, 2015 its not, you are past the ffmpeg error on on to an error with the argument. here is proof that it works just fine: ffmpegtest.png dang!! send me your code... so i can see it side by side... you have ffmpeg and video file in a folder with spaces too... weird Link to comment Share on other sites More sharing options...
iamtheky Posted March 5, 2015 Share Posted March 5, 2015 maybe this is better: Just declare the directory, and use that as your working dir in the run command Global $FFmpegDir = "C:\Users\Ky\Desktop\DEV\Media\FFMPEG scripts" $sFolder = "C:\Users\Ky\Videos\my test" $sTarget = "20131119_124145_001_output_output.mp4" $sFile = $sFolder & "\" & $sTarget $sCommands = "FFmpeg -i " & '"' & $sFile & '"' $iPID = Run("cmd /c " & $sCommands, $FFmpegDir , @SW_SHOW , $stderr_child + $stdout_child) $sOutput = "" While 1 $sOutput &= StderrRead($iPID) If @error Then ; Exit the loop if the process closes or StderrRead returns an error. ExitLoop EndIf WEnd msgbox(0, '' , $sOutput) msgbox(0, '' , stringregexp($sOutput , "Duration: (\d\d\:\d\d\:\d\d.\d\d)\," , 3)[0]) ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
dynamitemedia Posted March 5, 2015 Share Posted March 5, 2015 maybe this is better: Just declare the directory, and use that as your working dir in the run command Global $FFmpegDir = "C:\Users\Ky\Desktop\DEV\Media\FFMPEG scripts" $sFolder = "C:\Users\Ky\Videos\my test" $sTarget = "20131119_124145_001_output_output.mp4" $sFile = $sFolder & "\" & $sTarget $sCommands = "FFmpeg -i " & '"' & $sFile & '"' $iPID = Run("cmd /c " & $sCommands, $FFmpegDir , @SW_SHOW , $stderr_child + $stdout_child) $sOutput = "" While 1 $sOutput &= StderrRead($iPID) If @error Then ; Exit the loop if the process closes or StderrRead returns an error. ExitLoop EndIf WEnd msgbox(0, '' , $sOutput) msgbox(0, '' , stringregexp($sOutput , "Duration: (\d\d\:\d\d\:\d\d.\d\d)\," , 3)[0]) and we have a winner!! holy moses! thanks so much! hope this helps someone else, any idea this was going this way? i use a very similar ffmpeg command in other scripts with zero issues Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now