-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download (stream) not raising events / closing file #344
Comments
@fabricedupre I cannot help without seeing your code. Did you check the downloader sample which works fine? |
Here it is... Please note that Videostream is similar to the one I use (without issue) in Player.OpenAsync(Videostream);
|
What about logs? Do you see anything there? (What is the Videostream? oh the new System.IO.Stream you asked ok) try to use this:- string filename = "test1";
Downloader.Download(ref filename, true); Does the Videostream contain valid media data? You will need to manually close it at the end. |
1- trying with 2- debug content 11.46.24.650 | Info | [FlyleafEngine] FlyleafLib 3.7.22 11.46.25.492 | Info | [FlyleafEngine] Plugin loaded (OpenDefault - 3.7.22.0) 3- I can only close the stream when I get the DownloadCompleted event :-) |
For some reason it seems that it does not open/add the stream(s). Try this, before Downloader.Download:-
|
Not any better: 12.28.19.133 | Info | [FlyleafEngine] FlyleafLib 3.7.22 12.28.19.513 | Info | [FlyleafEngine] Plugin loaded (OpenDefault - 3.7.22.0) 12.29.22.008 | Debug | [#1] [Demuxer: Main] Opening -> Stopped |
Forgot to mention that file is created and video properly exported, only events are not raised |
The problem seems to be the bgr0 which is raw format (this is not an avi). The downloader currently works only with proper formats (no raw data) as it will require to transcode/transmux which is not currently implemented. |
But file is properly generated, only it is not properly closed and no event is sent. |
The file that it creates is just the file with the headers and not the data as it does not enable any stream and does not write any packets. Unfortunately there is no workaround for that, input format should be able to transmux to output format (so codecs should be supported by the output format). Maybe you could try with .raw extension or check FFmpeg which format supports bgr0 (if any). Still not sure why you don't see any errors though. You should also see that the demuxer opens the video stream (0) ... you will need to debug it. Maybe something else is the issue. |
Then, how can it be that I can play the file properly ? |
which file, the output file? Can you give me anydesk access to debug it quickly? :) Try trace log |
Couple things: |
@fabricedupre No worries, probably is the reason that I've mention already. But if you want to debug it you could download the code from here and include FlyleafLib project to your solution and instead of pointing the NuGet you can point the project. |
Here is what I managed to achieve by breaking on Downloader.cs line 307 and pressing F5 couple times: As soon as I remove the breakpoint on line 307 and set it on line 309... nothing happens anymore ! And log file: |
sry @fabricedupre, that does not really help |
In fact, once Demuxer.Packets.Count == 0, the while loop at line 207 never ends |
Check the threads (and mainly the Demuxer) when it freezes to see why the demuxer waits |
@fabricedupre Just had another look, trying to guess your issue... Try to replace in this line the AVERROR_EXIT with AVERROR_EOF Update: Actually more important change the < 0 to <= 0 (I will do more testing tomorrow as I think that this is indeed an issue with the custom IO streams) |
Same behavior :-( |
…tical flipping CustomIOContext: Fixes a critical issue with the EOF (read bytes = 0) which could cause the demuxer to freeze (Fixes #344)
@fabricedupre it should be fixed with master now, I was able to find a SCPR sample and reproduce the issue. Found also another one with negative linesizes which could crash the player. If you can't tested from master I will have soon an update NuGet package. |
Great ! |
I've some progress with FlyleafLib v4 which will support those but to be honest I was planning it by the end of the year, not sure if I will manage this. |
Good luck ! |
Hello,
Only event I receive is PropertyChanged with Duration.
I never get any PropertyChanged with DownloadPercentage or CurTime, or any DownloadCompleted.
And BTW, target file is created but not closed until I close the window.
The text was updated successfully, but these errors were encountered: