0

I use C# to start and stop 'ffmpeg' process, and I can easily name my output file like this:

"-f image2 -framerate 10 -i " + d + "\\%06d.jpeg -c:v libx264 -r 10
 -crf 37 -pix_fmt yuv420p E:\" + DateTime.Now.ToString("dd_MM_yyyy_h_mm_ss_tt") + ".flv";

but I wonder if I can do it using only ffmpeg to be some thing like this:

 "ffmpeg -f dshow -i video="screen-capture-recorder" -c:v libx264 -r 10
     -crf 37 -pix_fmt yuv420p E:\D_M_Y_H_M_S_T.flv"

this question is very close to what i need, one thing in deffrent i need all of it in cmd

Community
  • 1
  • 1
Maged E William
  • 436
  • 2
  • 9
  • 27
  • possible duplicate of http://stackoverflow.com/questions/22811758/assign-date-and-time-to-output-file/22813968#22813968 (described more precisely there) – Stephan Apr 02 '14 at 17:11

1 Answers1

3

Yes, change the DateTime.Now.ToString() output format:

string filename = "-f image2 -framerate 10 -i " + d + "\%06d.jpeg -c:v libx264 -r 10 -crf 37 -pix_fmt yuv420p E:\" + DateTime.Now.ToString("yyyy_MM_hh_mm_ss") + ".flv";

Note that I missed out days (dd) as you did in your example, but that might be a mistake by you.

Lloyd
  • 29,197
  • 4
  • 84
  • 98