473,327 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

get Lengh video. as HH:MM:SS:FF

Hi all, i am new babie in vb.net.I use mediainfo to get lengh video and display as HH:MM:SS, so can i display it as HH:MM:SS:FF, thanks all advance.
Sep 15 '16 #1
2 1300
IronRazer
83 64KB
You could use an axWindowsMediaPlayer control to get the length of a video as a Double type value. Then use the TimeSpan class to get a String formatted as "HH:MM:SS". You could modify the example to format it to include milliseconds too if needed.

I am not sure what the "FF" stands for in your post so, i`m not sure what to tell you for that.

Also, you will want to test any video formats that you want to use this for. The axWindowsMediaPlayer control may not support some video formats.

Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  3.         AxWindowsMediaPlayer1.URL = "C:\test\vids\cc.avi"
  4.     End Sub
  5.  
  6.     Private Sub AxWindowsMediaPlayer1_StatusChange(sender As Object, e As EventArgs) Handles AxWindowsMediaPlayer1.StatusChange
  7.         If AxWindowsMediaPlayer1.status.ToLower.Contains("playing") Then
  8.             AxWindowsMediaPlayer1.Ctlcontrols.stop()
  9.             Dim ts As TimeSpan = TimeSpan.FromSeconds(AxWindowsMediaPlayer1.currentMedia.duration)
  10.             Me.Text = If(ts.ToString.Contains("."), ts.ToString.Remove(ts.ToString.IndexOf(".")), ts.ToString).ToString
  11.         End If
  12.     End Sub
  13. End Class
  14.  
Oct 10 '16 #2
!NoItAll
297 100+
FF is Frames and will vary depending upon the frame-rate of the video. Also - if working with 59.94 don't forget to account for drop-frame.
Oct 11 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Thomas | last post by:
Hi! How can i get the optimal richtext width size, when depending on the variable text lengh. The text can be colored or with some differnt fontsizes. I dont want use scrollbars. Is there a...
1
by: Lonewolf | last post by:
Hi everyone, pls forgive me for my lack of knowledge and skills if my question sounds very stupid. I am trying to implement a video conferencing software and I am currently looking at a few set of...
5
by: $hiv..... | last post by:
hi, How to use Zero lengh Arrays.. I searched but could not get much information regarding this where Do i get links abt this
12
by: Pallas | last post by:
Hi all, I've produced some high-def videos and I want people to be able to watch them on my website, but I may want to prevent downloads and I certainly want to prevent them from editing them....
8
by: Oscar Arreyano | last post by:
I did a website for a friend's company where they wanted a 'downloads' section similar to standard file sharing you see all over the place. Everything works great except for video. I know there are...
1
by: Fuzz13 | last post by:
I have a project that has 4 radio buttons labeled with different animals. There are then 6 buttons and when a button is pressed based off of the radio button selected a picture will display and...
0
by: tdrsam | last post by:
I'm using Ken Wheeler's Slick Slider with some videos but for some reason the first video in the cue doesn't play. It plays after the list has played through and it goes back to the first video,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.