Main Window Mockup

It's been a while since my last post.
So I've decided to carry on experimenting different ways I can present the video preview component in the main window. At first I thought of it as a limited-functionality. Where only 1 file can initiate the video preview. This rule still applies for the actual preview, but, I worked out that you can do all the metadata processing in one go.

This is a screenshot of a running main window with the video preview component inside of it. I'll talk through how I achieved this.



So batch drag-and-drop will add a preview controller for each item. This will also process the metadata and add it into a ListView in WPF. The code actually remains exactly the same as in the previous post, with one exception that I've created a UserController in WPF for the component inside the main window.

So to show you how I've stacked the UI, I've done a simple paint diagram.
It's a lot of stacks, but it's the only way i could actually align those components properly.

Probe File
The metadata populated inside the custom user control's list view is retrieved inside a method called "ProbeFile". For this example, I grabbed an open source FFProbe and just passed in the file. An FFProbe window would look like this.

Note that line Stream #0:0 contains all the information required for the media. At least the video information.
To extract this, I simply ran a stream reader and catch all the strings inside the output window(hidden from the main program of course). I then added an if statement where the program catches the line "Stream #0:0" and adds the contents into an array, separated by ",".

Here's how I achieved this (this is just a snippet of the relevant parts for this post):


Here, I create a do-while loop. There is a better way to achieve this, but I wanted something quick and easy to test if my idea actually works.
Seems like it does. So now. I test a bunch of clips. Bad idea actually, I havent threaded any of this. So it kind of halts the program when you add say... 150 media files.

Comments