diplay length (time length) of mp4 files on webpage

Posted on 2011-10-02
Last Modified: 2012-06-21
I am using flowplayer and have videos on my site. Does anyone know how I can display the length of the video next to its name?

Thank you.
Question by:onyourmark
    LVL 69

    Expert Comment

    Does this assist you, when I use the seek bar to any position it shows the length
    Streaming plugin: pseudostreaming
    The player sends a HTTP request to the server with a start time parameter in the request URL's query string and the server script responds with the video stream so that its start position corresponds to the requested parameter.

    Author Comment

    Hi Thank you. I don't think that is what I mean. I think I wanted something simpler than that. I just want to have something under the name of the video that tells how long it is. I posted my code below. So for example, next to the phrase "HOW TO Register at the WileyPlus website" I would like it to say 05:24 or something like that

    HOW TO Register at the WileyPlus website. 05:24 mins.

    I think that the length of the video is available but I don't know how to access it and display it on the webpage.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">
    	<title>Statistics 2011</title>
    	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    	<meta name="keywords" content="data mining, text mining, weka, neural network, classification, clustering, weka tutorial, weka video, knowledge explorer, sentiment mining">
    	<meta name="description" content="A series of Weka screencasts that show you how to use Weka for text mining.">
    	<link rel="stylesheet" type="text/css" href="css/reset-min.css" media="all">
    	<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
    	<link rel="stylesheet" type="text/css" href="css/fancybox/jquery.fancybox-1.2.6.css" media="all">
    	<!--[if IE]>
    	<link rel="stylesheet" type="text/css" href="css/ie.css" media="all">
    	<script type="text/javascript" src="js/swfobject.js"></script>
    	<script type="text/javascript" src="js/jquery-1.4.min.js"></script>
    	<script type="text/javascript" src="js/jquery.fancybox-1.2.6.pack.js"></script>
    	<script type="text/javascript" src="js/flowplayer-3.1.4.min.js"></script>
    	<script type="text/javascript" src="js/weka.js"></script>
    <body><div class="sentimentcss">
    A series of  screencasts .</div>
    <div style="float:right;">
      <script type="text/javascript"><!--
    google_ad_client = "pub-8152624590362711";
    /* 300x250, created 2/12/10 */
    google_ad_slot = "9660156087";
    google_ad_width = 300;
    google_ad_height = 250;
    <script type="text/javascript"
    <div class="wrapper">
      <h1><a href="index.php">Statistics for Fall 2011</a></h1>
    		 Some basic Statistics videos are at <a href=""></a>
    Some videos on the R programming language for Statistical Computing are at <a href=""></a>	
      <ul id="videos">
    			<li id="video-1">
    				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
    				<div class="details">
    					<h2>HOW TO Register at the WileyPlus website</h2>
    					<a href="#" class="watch">Watch</a>
    					<a href="mp4/RegisterForWileyPlus.mp4" class="download">Download</a>
    	<li id="video-2">
    				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
    				<div class="details">
    					<h2>Chapter 2 Statistics Qualitative Frequency Distributions</h2>
    					<a href="#" class="watch">Watch</a>
    					<a href="mp4/Chapter 2 Statistics Qualitative Frequency Distributions.mp4" class="download">Download</a>
    			<li id="video-3">
    				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
    				<div class="details">
    					<h2>Chapter 2 Stem-and-Leaf  Dotplots Outliers</h2>
    					<a href="#" class="watch">Watch</a>
    					<a href="mp4/Chapter 2 Stem-and-Leaf  Dotplots Outliers.mp4" class="download">Download</a>
    						<li id="video-3">
    				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
    				<div class="details">
    					<h2>Chapter 2 Uses and Misuses of Graphs</h2>
    					<a href="#" class="watch">Watch</a>
    					<a href="mp4/Chapter 2 Uses and Misuses of Graphs.mp4" class="download">Download</a>
    						<li id="video-3">
    				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
    				<div class="details">
    					<h2>Chapter 3 Box-and-Whisker Plot</h2>
    					<a href="#" class="watch">Watch</a>
    					<a href="mp4/Chapter 3 Box-and-Whisker Plot.mp4" class="download">Download</a>

    Open in new window

    LVL 23

    Accepted Solution

    This is more of a Javascript question than excel so you would be served changing the zone but you may be able to get what you are after using

       seconds = document.mediaobject.GetDuration() / document.mediaobject.GetTimeScale()


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    You may or may not be familiar with Kodi ( the open source software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS, and Android.  Kodi which started off as X-Box Media Center (XBMC) many years…
    Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
    Viewers will learn how to include realistic velocity sensitivity to their Sampler instruments. Set the Vol<Vel parameter in the Filter/Global tab to your desired setting: Gather samples of hits of various intensity, and drag/drop into Velocity zon…
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now