Skip to content

Play Media from a Stream or Byte Array? #284

Answered by SuRGeoNix
elthombre asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 7 comments 21 replies

Comment options

You must be logged in to vote
2 replies
@elthombre
Comment options

@SuRGeoNix
Comment options

Answer selected by SuRGeoNix
Comment options

You must be logged in to vote
1 reply
@SuRGeoNix
Comment options

Comment options

You must be logged in to vote
4 replies
@SuRGeoNix
Comment options

@elthombre
Comment options

@SuRGeoNix
Comment options

@elthombre
Comment options

Comment options

You must be logged in to vote
3 replies
@SuRGeoNix
Comment options

@elthombre
Comment options

@SuRGeoNix
Comment options

Comment options

You must be logged in to vote
6 replies
@elthombre
Comment options

@SuRGeoNix
Comment options

@elthombre
Comment options

@SuRGeoNix
Comment options

@elthombre
Comment options

Comment options

You must be logged in to vote
1 reply
@SuRGeoNix
Comment options

Comment options

You must be logged in to vote
4 replies
@SuRGeoNix
Comment options

@elthombre
Comment options

@SuRGeoNix
Comment options

@elthombre
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants