Why does ffmpeg batch file not work in run program?

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
I get the message that the program 'is not recognized as an internal or external command'.

The bat file works outside of zenno but not in zenno.
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
because bat file is not an application - it's a script
try run it as cmd /c уour_path_to_bat
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
No didnt work:

The given path's format is not supported:

Код:
cmd /c F:\fftest\fftest.bat
With my original code the batch file would run so I dont think its that, it would just not find the ffmpeg .exe to run that.

I have it in system 32 folder. I also tried showing full path to ffmpeg in the bat file and still doesnt work.

So to clarify the bat file works but the exe file within the bat doesnt work when run within zenno.

EDIT: ok now i get the exe to run with the code:

Код:
F:\ffmpeg\bin\ffmpeg.exe -i F:\fftest\%%01d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p fftest.mp4
pause
but it won't access the ffmpeg libraries. What now?
 
Последнее редактирование:

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
try to run bat file like this:

upload_2015-1-30_15-55-18.png


don't forget to specify "Running timeout" option
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
just to save your time - it will work only in c# snippet and and only with invoking ffmpeg directly.
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Now anyone care to tell me what the c# code would be :D
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
C#:
System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo();
p.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;
string batFile = project.Directory + @"\batfilename.bat";
p.FileName = batFile;
p.UseShellExecute = true;
p.CreateNoWindow = true;
var process = System.Diagnostics.Process.Start(p);
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
C#:
System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo();
p.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;
string batFile = project.Directory + @"\batfilename.bat";
p.FileName = batFile;
p.UseShellExecute = true;
p.CreateNoWindow = true;
var process = System.Diagnostics.Process.Start(p);
Thanks but as the guy above said i need to run the exe directly not thru bat so need code for that.
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
this information was very important only for me so i deleted it
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
don't run any bat if you have process without exit signal or with redirected std' or if your paths contains nonascii characters
@LexxWork As you can see OP is not much experienced therefore if you want to tell something then make sense to that he can understand...

@Harambulus I'm working with this code + bat file with ffmpeg and everything is working fine, you just have to write in bat file path to ffmpeg and call ffmpec command itself, no more spoon feeding. ;-)

Cheers
 
  • Спасибо
Реакции: Harambulus

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
If I don't know the syntax of c# code and the slightest error will cause it not to work I wouldn't call it spoonfeeding...

Ok it runs without errors once i put it into project directory but still just like above it wont use the libraries so the shells shows it running but never actually encodes the video as it would in the normal command. So ffmpeg will run but will not access the libraries to encode with the code you gave above.

Here is my batfile:

Код:
F:\ffmpeg\bin\ffmpeg.exe -i F:\fftest\%%01d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p fftest.mp4
pause
as you see it is already calling ffmpeg from its directory.

It also creates an output but the file is empty.
 
Последнее редактирование:

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
YES YES YES!!!!!

Finally got it working!!!

and ended up running fine in run program.

There was some problem with the ffmpeg command line in the bat not sure what as I confused myself with all my edits.

Lexx not sure why you were giving misinformation, probably to make me buy your code for $20 dollars.
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
I'm not in any way trying to deceive you. I believe that I know whereof I speak. See my posts. Of course, your primitive "solution" can not be worth even 1$.
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Congrats @Harambulus as I said It is possible to get it working.

@LexxWork Really that was not nice to give misleading information to customers just to earn cash, nobody says it is not fair price, but it was not fair way you wanted to earn fair price... :bq: I would understand if you would be newbie, but everybody knows that you know what you are talking about...

Thanks
 
  • Спасибо
Реакции: Harambulus

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Последнее редактирование:

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
i like to finish other people's topics...
in any case you can always feel fee to contact me if your snippet will not satisfy you. In addition, snippet information that i wrote to you in pm, there are others, simpler and cheaper, but also with good tech service and customizations from my own.
 

Кто просматривает тему: (Всего: 3, Пользователи: 0, Гости: 3)