Thread: Tech FFmpeg duration
View Single Post
Old 10-26-2017, 06:35 AM  
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
The field value in your database server should be the result like 45:09:32 or similar. The returned result of your command.

I would use a bash .sh script for this. You can use PHP, Python, or other interrupter language you would prefer also (the devil you know best).
  1. You need to loop a list of the files to process in a script. Then foreach($file){
  2. perform the commands (ffmpeg +)
  3. then get the duration 00:00:00
  4. do your database UPDATE }
  5. then in your cms get that duration value and display the HTML

MyVideo elapsed time 45:09:32

That is what you want to do? NO i read it again LOL

you need to do this in a few processes.

convert the video.
determine the seconds like 2400
the do the math 1200 = the middle
convert that to time 00:20:00 and use that in the command (a separate command to watermark)

nope edited -- that didn't work right

you are going to have to do a script for the math ... but that is the logic to use
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote