Hi all,
I 'm New to asp...I have attached jw FLV Player 4.3 to my website...i want to get total duration of videos..Please help me..
Hi all,
I 'm New to asp...I have attached jw FLV Player 4.3 to my website...i want to get total duration of videos..Please help me..
For each video file i want to get the duration and store in database and will get the duration at runtime....
There are many tools for getting the duration of a FLV video.
If your files have metadata, you could use flvdump from Google Code.
If your files don't have metadata, you could use ffmpeg or FLVMDI (dump the XML) to get the duration.
ffmpeg -i video1.flv returns this:
C:\Program Files\LightTPD-1.4.19\htdocs>"Movies/ffmpeg" -i video1.flv
FFmpeg version SVN-r16043-Sherpya, Copyright (c) 2000-2008 Fabrice Bellard, et a
l.
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 6. 1 / 52. 6. 1
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 1. 0 / 0. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Dec 10 2008 18:25:26, gcc: 4.2.5 20080919 (prerelease) [Sherpya]Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000
/1) -> 25.00 (25/1)
Input #0, flv, from 'video1.flv':
<strong>Duration: 00:00:14.23</strong>, start: 0.000000, bitrate: 96 kb/s
Stream #0.0: Video: vp6f, yuv420p, 480x270, 25.00 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 96 kb/s
Thanx a lot...
You're welcome.
Good Luck! :D
hey,
how should i add that to my asp code?
Example of ffmpeg being used to get the duration of a FLV file in a PHP playlist generator.
I'm using FLVmdi ,
""
<%
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec(server.MapPath("flvmdi.exe") & " " & Server.MapPath(".") & "movie10000008.flv" & "/x")
Response.Write(Server.MapPath("videos\movie10000008.flv"))
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
response.write(strPResult)
%>
Im getting Error No as 2..that is Error with parameters Supplied....
Are you trying to create an XML file of the metadata?
FLVMDI /x movie10000008.flvCreates movie10000008.xml
Hi there,
may i add a question of my own ? i think it relates to the same issue...
i am trying to have .mp4 files (created and exported from Final Cut Pro), playable on my website, using the JW player. But the player 'thinks' that the file is 9 minute long, instead of 2, and therefore once it finishes palying the clip it gets stuck in "downloading" mode (the revolving thing..).
does that mean that he .mp4 clip doesn't have metadata (like the clip's accurate length) ? and if so, how to i solve this problem ?
thanks a lot !
Aylam
What version and release of the JW FLV Player are you using?
Right-click on the player to see the version.
I have seen some v4.6 players that don't get the correct duraton of some MP4 files, then the scrubbar just keeps going to the right, right through the volume control.
Try a v4.7 player from here:
http://developer.longtailvideo.com/trac/log/trunk/as3/player.swf
Click on the release that you want in the Rev column.
Thanks !! the version my designer is using is 4.1.60 (i can't right click, have a mac, so i did Ctrl+click, and that's what it gave me).
but i'll try V4.7 as you suggest !
so you're saying those .mp4 clips are good to go, with the necessary metadata in them and all ? it's just a problem of the player ?
thanks again,
aylam
hello again,
we tried the newest version of the JW player (4.7.581), and it still gives us the same problem. we even tried it with a .mov clip, instead of .mp4, but to no avail....
any ideas whats wrong now ?
thanks !
Please provide a link to a page demonstrating the error.
as you can see, the player thinks the clip is 9:50 long, instead of 4:48, and when its gets to 4:48, it gets stuck in "loading" mode...
thanks !
btw, it seems like i am having the exact problem of the guy here, only with video files:
http://www.longtailvideo.com/support/forum/Bug-Reports/20227/Wrong-Duration-of-MP3-displayed-
so how do i set the duration in my (i guess improperly encoded) video files ?
thanks!
Please explain what you mean by "get total duration of videos".
Do you mean get the duration of the video file from each file?
Or do you mean get the total duration of all video files in a list of video files?