[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2201
  • Last Modified:

FFMPEG, getting length of flv on conversion

Hey all, i'm using ffmpeg to convert flv files on the fly. I need to grab the running time of each video being converted. How do i do this? Thanx all

er
0
engineroom
Asked:
engineroom
  • 5
  • 3
  • 2
  • +2
1 Solution
 
MereteCommented:
lame answer
drop it onto media player  and it will show the duration, write it down how hard is that :)
there is also Gspot which will analyze the avi shows what codecs audio is used if you need to know the audio sampling aspects
Media player classic
http://www.softpedia.com/get/Multimedia/Video/Video-Players/Media-Player-Classic-for-Win2kXP.shtml
Gspot
http://www.afterdawn.com/guides/archive/find_what_video_and_audio_codecs_to_use.cfm
0
 
MereteCommented:
If the Metadata is there it should work in MPC if not try this flash player
http://www.snapfiles.com/get/swiffplayer.html
0
 
engineroomAuthor Commented:
Lame answer indeed. I'm converting to FLV file on the fly. I'll never see the videos, so i need to somehow grab the time on conversion.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
twdoCommented:
engineroom, did you figure this out? I am writing code to upload movies to a website. I am using FFMPEG to handle the videos. I have the conversion to FLV completed, the thumbnail created, and now I need to get the video length. Any luck? Anyone?
0
 
engineroomAuthor Commented:
no dude. Nothing. I'll keep you updated. hopefully i find this out. If you find out how, let me know as well. Thanx
0
 
twdoCommented:
Will do. That sucks. I have everything else accomplished. Creating thumbnail, Converting to FLV, etc. The only thing left is to get the length of the movie. I found one posting on another forum that said that getting the metadata or the file info would return the length of the FLV file, but using he parameters he had posted, it does not. If I was able to have the info displayed to a command window, I could parse it for the length.

Keep me posted. Thanks.
0
 
engineroomAuthor Commented:
no prob. I'll keep you updated if anything new arises.
0
 
CWS (haripriya)Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
  Delete with points refunded

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

cyberwebservice
Experts Exchange Cleanup Volunteer
0
 
engineroomAuthor Commented:
It hasn't been abandoned. I'm just waiting for a solution.
0
 
MereteCommented:
I know links well :)
I found a post here in the
FLV GALLERY blog
Is there a way to determine the size of the video using PHP?
http://www.jeroenwijering.com/?thread=7395

 Retrieving the length a streamed flv through PHP
http://www.actionscript.org/forums/archive/index.php3/t-57940.html
0
 
marcparilloCommented:
I was looking for the same solution and I ran across this code.  It works for me:

ffmpeg -i <infile> 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//

(note that's a space between the single quotes after -d and before -f )

0
 
engineroomAuthor Commented:
Thank you. I'll give that a shot!
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now