locked
Audio and video html5 tag RRS feed

  • Question

  • User1256512446 posted

    Hi:

    I am using audio and video tag

    I want to allow avi wav flv wmv files, and they are not allowed by those tags

    Can u tell me a 3rd party component to allow those files and a demo?

    TIA

    Wednesday, December 16, 2015 3:09 PM

All replies

  • User-986267747 posted

    Hi volar5,

    I am using audio and video tag

    You could refer to the following links to show videos with html tag.

    http://joliclic.free.fr/html/object-tag/en/object-video.html

    http://joliclic.free.fr/html/object-tag/en/index.php

    I want to allow avi wav flv wmv files, and they are not allowed by those tags

    Can u tell me a 3rd party component to allow those files and a demo?

    Different file types require different players and their own unique code. You won't be able to get one piece of code to do it all even if your clients happen to have all the necessary players.  You could refer to the following links to get more inforamtion about the discussion.

    http://www.sitepoint.com/forums/showthread.php?506771-Need-Help-for-Embed-Tag-to-playing-all-type-of-video-files-in-any-browser

    In my experience, you'd better use the common file format, is it not better? Otherwise there will be a variety of problems. Of course, you could refer to the following links to learn how to play some video files in asp.net page

    http://forums.asp.net/t/1372131.aspx

    http://alistapart.com/article/byebyeembed

    I hope it's helpful to you.

    Best Regards,

    Klein zhang

    Thursday, December 17, 2015 5:16 AM
  • User1256512446 posted

    Hi all:

    I downloaded the ffmpeg exe to convert videos and audios and use it from asp.net as explained in

    http://www.codeproject.com/Articles/24995/FFMPEG-using-ASP-NET

    I try to convert my avi file to mp4. I do

    ffmpeg -i ejemplo.avi ejemplo.mp4
    

    ejemplo.mp4 is created with 0 bytes. I get the error unsupported codec for input stream #0.0

    Anyone has used ffmpeg? Can u help me to convert my ejemplo.avi to mp4?

    My idea is convert avi, flv,mov,mwv to mp4 and then use the video tag in html5

    Same with audio: convert the wav, mid to mp3 and use the audio tag in html5

    Have u another solution?

    TIA

    Thursday, December 17, 2015 5:51 PM
  • User-986267747 posted

    Hi volar5,

    I try to convert my avi file to mp4. I do

    I downloaded the ffmpeg exe to convert videos and audios and use it from asp.net as explained in

    For your problem about the use of ffmpeg, you could refer to the following links and try to solve it.

    http://stackoverflow.com/questions/14798434/ffmpeg-converting-to-mp4-with-error-unsupported-codec

    Of course, you could ask the ffmpeg forum for help.

    http://trac.ffmpeg.org/report/5?sort=summary&asc=1&page=1

    Besides, you could also refer to the following links to convert video in asp.net.

    http://www.nrecosite.com/video_converter_net.aspx

    Best Regards,

    Klein zhang

    Friday, December 18, 2015 9:18 AM
  • User1256512446 posted

    Hi again:

    At last my ffmpeg is running ok

    I convert my audio files into mp3 and I can listen to them with the audio tag of html5

    I convert my video files into mp4. But I can't view them with the video tal of html5. Why? Do I need anymore? I'd like to view them as in youtube

    TIA

    Saturday, December 19, 2015 7:01 PM
  • User465171450 posted

    What is your video encoding? H.264? Which browser as video format support varies?

    Saturday, December 19, 2015 10:43 PM
  • User-1617567259 posted
    It is because you will need a third party. However, I don't believe you will be able to playback .wmv files. HTML5 tag supports some video formats, not all.
    Sunday, December 20, 2015 12:37 AM
  • User1256512446 posted

    Hi again:

    I have IE, Opera, Safari, Chrome, Firefox. All the lastest version

    I can't view the videos mp4 with the video tag

    Songs are listened without any problem

    What happens with the videos? I don't know the encoding I use

    TIA

    Sunday, December 20, 2015 12:53 PM
  • User1256512446 posted

    Hi again:

    I do to view the videos

        Sub ver_video_ffmpeg(fichero As String)
            Dim dproc As New Diagnostics.Process()
            Dim intobra As Integer = Request.QueryString("obra")
            Dim strcarpeta As String
            dproc.StartInfo.FileName = Server.MapPath("Comun/Ffmpeg/ffplay.exe")
            If intobra = 1 Then
                strcarpeta = "Anuncios"
            ElseIf intobra = 9 Then
                strcarpeta = "Documentales"
            Else
                strcarpeta = "Peliculas"
            End If
            dproc.StartInfo.Arguments = strcarpeta & " publico/" & fichero
            dproc.StartInfo.UseShellExecute = False
            dproc.StartInfo.CreateNoWindow = False
            dproc.StartInfo.RedirectStandardOutput = False
            dproc.Start()
        End Sub
    

    But I can't view them. What is the problem?

    TIA

    Sunday, December 20, 2015 1:36 PM
  • User465171450 posted

    You have to specify the encoding. Video formats are much more complicated than you think. MP4 is a specific container where videos and audio of different encodings can be put inside.

    Can you show the <video> element definition you are using? Keep in mind, your audience for the videos doesn't necessarily have the latest of each browser, and not all browsers support MP4, some support WEBM or Ogg/Vorbis. 

    You might want to try Miro Converter. It's a free converter app that does a fantastic job and is easier to use the ffmpeg since you don't need to know all the various parameters.

    Sunday, December 20, 2015 2:37 PM
  • User1256512446 posted

    Hi all:

    I put the video tag. I see the window of the video. But it doesn't play. 

    I am looking for a solution

    TIA

    Sunday, December 20, 2015 5:35 PM
  • User465171450 posted

    Again, please post the code so we can how it is defined, that is how we can give you a solution. There lots of ways to define the video element and it's easy to get it wrong is the main reason for asking.

    Have you tried browsing directly to the file through the web browser? It's very possible that the link to the file is good, and that the video element would work, but the web server is not serving the .mp4 file due to it not knowing the MIME type. IIS will not serve files for unknown mime types. Good instructions on adding the mime type are located here: http://forums.asp.net/t/1470612.aspx?How+to+enable+IIS+to+play+MP4+files

    Sunday, December 20, 2015 6:09 PM
  • User1256512446 posted

    Hi again:

    If I try to view the video in

    http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video

    it is ok. I see it.

    But I can't view my videos. Why?

    TIA

    Sunday, December 20, 2015 6:29 PM
  • User1256512446 posted

    Hi:

    markfitme, I run my aspx pages in visual studio server, not IIS.

    I don't know the problem. It seems, as u mention, the visual studio server doesn't recognize the mp4 files. How to do in order mp4 files are recognized?

    TIA

    Sunday, December 20, 2015 8:48 PM
  • User1686483761 posted

    Hi

    But I can't view my videos. Why?

    I suspect that your MP4 file is not legal, could you play this file directly?

    Tuesday, December 22, 2015 7:16 AM