Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using C#, I have created video with WindowsMediaRenderer's Render() method as mentioned in below code, the created video is not working in web browser, it runs only in windows media player.

Can you please help me to resolve this issue ?

 using (WindowsMediaRenderer renderer = new WindowsMediaRenderer(timeline, resultMobileVideoFile, WindowsMediaProfiles.HighQualityVideo, null, null))
{
    renderer.Render();
}


What I have tried:

using (ITimeline timeline = new DefaultTimeline())
                    {
                        IGroup groupV = timeline.AddVideoGroup("groupV", 25, 32, 1280, 720);
                        IGroup groupA = timeline.AddAudioGroup("groupA", 25);

                        var firstClip = groupV.AddTrack().AddVideo(startingVideoFile);

                        groupA.AddTrack().AddAudio(audioFile, 0, 0, 5);
                        var secondClip = groupV.AddTrack().AddVideo(middleVideo, firstClip.Duration);

                        groupA.AddTrack().AddAudio(middleVideo, firstClip.Duration);

                        var fouthClip = groupV.AddTrack().AddVideo(endingVideoFile, firstClip.Duration + secondClip.Duration);
                        groupA.AddTrack().AddAudio(audioFile, firstClip.Duration + secondClip.Duration, 0, 5);


                        using (WindowsMediaRenderer renderer = new WindowsMediaRenderer(timeline, resultMobileVideoFile,
                                WindowsMediaProfiles.HighQualityVideo, null, null))
                        {
                            renderer.Render();
                        }
                    }
Posted
Updated 26-Jul-22 22:53pm
Comments
Richard Deeming 27-Jul-22 4:32am    
What codec does it render to, and what web browser are you trying to view it in?

Different browsers support different codecs:
"video format" | Can I use... Support tables for HTML5, CSS3, etc[^]

1 solution

Try encoding the video in .MP4 format, most modern browsers support it.
See: HTML Video[^]
 
Share this answer
 
Comments
Member 15674341 28-Jul-22 2:43am    
@RickZeeland, yes I am using MP4 only, but still it is not working. :(

Please let me know if you have some solutions
RickZeeland 28-Jul-22 3:04am    
Maybe you can use this library: https://github.com/radek-k/FFMediaToolkit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900