MP4 play in .NET 8 WPF.

MP4 play in .NET 8 WPF.

ramasamy_thangaperumal
Participant Participant
255 Views
1 Reply
Message 1 of 2

MP4 play in .NET 8 WPF.

ramasamy_thangaperumal
Participant
Participant

Recently i have migrated my project from .NetFramework 4.8 to .Net 8 following Inventor 2025 technology change. This mp4 file playing in UI was working fine earlier. After migration i think Interaction.Behaviors in wpf is supporting to play video in UI. I am getting System.UriFormatException error. But the video file path is correct and it exist. Is anyone facing this issue.? Searched a lot in Google, didnt get any solution. 

0 Likes
256 Views
1 Reply
Reply (1)
Message 2 of 2

ionelechychyx
Observer
Observer

I had a similar issue when I moved a desktop app to .NET 8 and tried to play media files. Everything worked fine before, but after upgrading, video playback started acting up with unexpected exceptions. In my case, it turned out the issue was how I was referencing the media file, the path formatting had to be adjusted, especially when dealing with pack URIs or absolute paths. Also, some behaviors and media rendering APIs behave a bit differently now, so I had to tweak my UI logic. When I didn’t want to deal with codec issues or unsupported formats anymore, I started converting my videos ahead of time to a more universal format like MP4 or even WEBM. For that, I’ve been using this WEBM converter to make sure the videos are clean and compatible before loading them into the app, https://www.movavi.com/video-converter/webm-converter.html. Made testing a lot smoother.

0 Likes