You are not logged in.

#1 14 Oct 2015 14:42

fury_jin
New Member
Registered: 14 Oct 2015
Posts: 1

how to use ffmpeg command with cmd

Hello,

i am trying to make a .bat file in order to record a ip camera with this command :

ffmpeg -i http://id:pass@ip/video.cgi -an -flags +global_header -pix_fmt yuv420p -codec:v libx264 -minrate 200K -maxrate 500K -bufsize 320k -s 640x480 -r 15 -filter:v "setpts=3.1*PTS" -f ssegment -segment_time 1000 -segment_wrap 480 -reset_timestamps 1 -segment_list_flags +live D:\cam%05d.mp4

I can use D:\cam%%05d.mp4 instead of D:\cam%05d.mp4 to escape the % caractere but i don't know how to do it for the + sign.

I try to escape the + sign with ^ but it's not working...

This commands:

-flags +global_header

and

-segment_list_flags +live

are ignored !

Is there a way to use this command as simple text ?

I don't even know if a should use CMD shell or VBScript or PowerShell...

If you want some info about the ffmpeg command i made this little post explanation :

fmpeg.gusari.org/viewtopic.php?f=11&t=2377

When i past this command in the ff-prompt it is working just fine.

I tried to import et txt file with command < cam.txt but cmd freeze in the middle if the importation and i have to kill the process...

Offline

#2 16 Oct 2015 13:46

foxidrive
Member
Registered: 04 Apr 2013
Posts: 339

Re: how to use ffmpeg command with cmd

Try these: the ^ is an escape character in a batch file and quoted character also work in different programs.

The + in a command line is treated as whitespace, but you can test if it helps or not.

-segment_list_flags ^+live
-flags ^+global_header
-segment_list_flags "+live"
-flags "+global_header"

Offline

Board footer

Powered by