-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Screen recording problem #702
Comments
Thank you for your report. Does the problem occur on both mkv and mp4 files? |
Write the whole first data packet along with the config packet in the codec extradata to write the header.
Could you test if 8d75422 fixes the problem, please? Here is a win64 binary (to replace in your v1.10): |
[8d75422] scrcpy.exe still presents the same problems. |
And if you retry v1.9 now, it works correctly? |
yes, v1.9 records correctly. |
Oh, in v1.10, I upgraded FFmpeg. Could you just replace |
same issues after replacing dlls. It could be something to do with asynchronous recording? |
Let's do the reverse: take v1.9, and replace the dll by those from v1.10. Does it still work?
Once we eliminate all others possibilities… but for now, I don't know how asynchronous recording could produce this bug: the file is expected to be the same. |
How do you stop recording? By closing the window? Does it say that the recording is complete in the logs? |
I close the window, here is the log:
|
Yes, it works. I've found a quick fix by copying with FFmpeg. |
Let's bisect manually (if you know how to build, you could do it faster on your side). Here is a binary for 63af7fb: And for 35d9185: |
They don't work |
Thank you for the details. Could you test with this patch, please (of course I will not commit it as is): diff --git a/app/src/recorder.c b/app/src/recorder.c
index 402f253..e14599c 100644
--- a/app/src/recorder.c
+++ b/app/src/recorder.c
@@ -237,6 +237,7 @@ recorder_write(struct recorder *recorder, AVPacket *packet) {
return true;
}
+ packet->duration = 96000;
recorder_rescale_packet(recorder, packet);
return av_write_frame(recorder->ctx, packet) >= 0;
} Here is a binary: |
Record a packet only once the following has been received, so that we can set its duration before muxing it. Fixes <#702>
And if it works, here is a proper fix: 8507fea (not merged yet) Here is a binary: |
I've just tried this binary and it's working great! Thank you! |
Cool, thank you for the report and the tests. I just merged it in master. |
The new video files (v1.10) now crash Adobe Premiere. The videos reproduce correctly on vlc, however Movies (windows 10 video player) presents some small freezing.
I've fixed the files by transcoding them with Handbrake. The transcoded videos work normally on all programs.
The text was updated successfully, but these errors were encountered: