-
Hi, I need a media player that I can embed on a WinForm wherein I can play media (both audio & video) from a stream or byte array. Can this control do that? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 21 replies
-
Hi @elthombre, Flyleaf accepts an System.IO.Stream as input which will pass down to FFmpeg as an AVIOContext. This will be used by FFmpeg to demux the data. In your case you could force a rawvideo for example and from your Stream just pass the raw video data. (which can be done without a custom Stream, this is just an example) To play both audio/video ideally you should use a proper FFmpeg format that contains both audio/video data. But if you can't there is still a solution by creating a second demuxer and adding the audio stream to the main (video) demuxer. I'm doing this with yt-dlp plugin for example (different demux url for audio). I have to check but I think you can do this only with a plugin and not directly. Have a look and when you have a more information on what you want to do, I could help you more as well or write you a sample (eg. for plugin). J |
Beta Was this translation helpful? Give feedback.
-
no. they come in the form of media files. think file extension type but pushing a file up into memory as a byte array or streaming it. And imagine a Play() method which may accept a byte array or a stream. |
Beta Was this translation helpful? Give feedback.
-
Well, an attachment file will not come as two files. |
Beta Was this translation helpful? Give feedback.
-
Hi John,
I have removed the assembly signing for development. It's a project that I inherited.
I've also been looking at VLC which has proven tedious, in my opinion. It seems to require the copying of files & folders to the output folder, etc.
Flyleaf gives the impression that it is easier to use, no?
I have an MS Office add-in. Not an executable. I plan to leverage the player on a WinForm and use a byte array for data so that we do not have to save files to a temp folder (security issue).
Does this sound like something Flyleaf would easily accommodate?
Thanks,
-- Todd
On Wednesday, April 26, 2023 at 09:56:19 AM EDT, John Stamatakis ***@***.***> wrote:
No they are not
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Getting this exception: System.NullReferenceException On this code:
and I've also tried:
|
Beta Was this translation helpful? Give feedback.
-
I suppose I should also ask about the stream. I have the following:
|
Beta Was this translation helpful? Give feedback.
-
working from the samples here: https://github.com/SuRGeoNix/Flyleaf/wiki#quick-player-setup-winui-3 |
Beta Was this translation helpful? Give feedback.
Hi @elthombre,
Flyleaf accepts an System.IO.Stream as input which will pass down to FFmpeg as an AVIOContext. This will be used by FFmpeg to demux the data. In your case you could force a rawvideo for example and from your Stream just pass the raw video data. (which can be done without a custom Stream, this is just an example)
To play both audio/video ideally you should use a proper FFmpeg format that contains both audio/video data. But if you can't there is still a solution by creating a second demuxer and adding the audio stream to the main (video) demuxer. I'm doing this with yt-dlp plugin for example (different demux url for audio). I have to check but I think you can do this only wit…