2

I use ffmpeg to convert a video file uploaded via an ASPX web page. ffmpeg conversion works fine.

I want to provide the end-user a progress bar. So I placed an updatPanel on my web page and tried to read the file size ...

  • using fileinfo : ffmpeg freeze
  • using [process.start()] cmd.exe /c dir : ffmpeg freeze
  • using filestream : error ->> file is used by another process
  • using ffmpeg -i X Y 2> log.txt : log is created only when conversion completed

Whats the proper/working way to do this?

Sameera Thilakasiri
  • 9,255
  • 9
  • 53
  • 84
assaf
  • 51
  • 4
  • This may help: http://stackoverflow.com/questions/747982/can-ffmpeg-show-a-progress-bar – xxpor Dec 01 '11 at 22:02
  • Thanks for the insight, I have managed to set the log. a single note for the followers, if you run ffmpeg.exe directly (ie - myprocess.StartInfo.FileName = "ffmpeg.exe") you cant redirect stdoutput. – assaf Dec 02 '11 at 16:10

1 Answers1

7

Use ffprobe command to get video metadada

Only file size:

ffprobe -i video.mp4 -show_entries format=size -v quiet -of csv="p=0"

Complete (return in JSON):

ffprobe -v quiet -print_format json -show_format -show_streams video.mp4