Bug 418346 - Screen capture not working on windows
Summary: Screen capture not working on windows
Status: RESOLVED WORKSFORME
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (show other bugs)
Version: 19.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-01 03:09 UTC by cc.caprani
Modified: 2021-05-02 04:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
fritzibaby: timeline_corruption+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cc.caprani 2020-03-01 03:09:49 UTC
SUMMARY
Screen capture is not working on Windows 10. Does not capture any audio. Tested on 2 machines with fresh installs of latest release (19.12.2).

STEPS TO REPRODUCE
1. Install KdenLive and open
2. View > Screen Recorder
3. Click Record

OBSERVED RESULT
Nothing happens

EXPECTED RESULT
File created and imported into Project Bin

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I've had a look at the code [https://cgit.kde.org/kdenlive.git/tree/src/monitor/recmanager.cpp] (starting L238). It seems that the arguments to ffmpeg ignore any settings in the KdenLive GUI. A previous Qt app has also implemented ffmpeg capturing as detailed here:
https://forum.qt.io/topic/46199/solved-screen-audio-recording-with-ffmpeg-using-qprocess
The arguments to ffmpeg seem different. However, I cannot access the process to determine the actual arguments sent to ffmpeg [my own limitations]. Th arguments that work for me have the structure:
ffmpeg -thread_queue_size 512 -f gdigrab -framerate 10 -i desktop -f dshow -i audio="Microphone (Plantronics Wireless Audio)" -ac 1 -ar 44100 -vcodec libx264 -preset ultrafast -threads 2 -acodec libmp3lame out.mp4
which seems different to that generated in the code - especially the audio, which needs its own "-i" argument.

A useful GUI option could optionally show the arguments sent to ffmpeg. This would allow debugging and for users to see the actual ffmpeg settings used for the capture.

The suggestion inteh other Qt app and forum discussion to use the virtual screen and audio recorder:
https://github.com/rdp/screen-capture-recorder-to-video-windows-free
could make for a cross-platform solution.
Comment 1 cc.caprani 2020-03-01 04:06:21 UTC
In an effort to be helpful (!) I've explored other software that uses ffmpeg to do its captures. One that seems to be robust and could offer a kind of template for how Kdenlive could be updated is ShareX. Its options screen show the ffmpeg options generated from the user selections which is useful:
https://camo.githubusercontent.com/df20b4f2ce163d43fb72f17ab35151ecbee024fd/687474703a2f2f692e696d6775722e636f6d2f56504d706f6e392e706e67
Note here that the cross-platform virtual audio and screen recorder can be installed and used. The form is described here:
https://github.com/ShareX/ShareX/blob/master/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs
Its CLI Manager class seems to be the main engine, finding the devices, and executing the capture:
https://github.com/ShareX/ShareX/blob/master/ShareX.MediaLib/FFmpegCLIManager.cs
Comment 2 emohr 2020-03-08 16:18:51 UTC
goto settings -> configure Kdenlive -> timeline -> Environment -> make sure the FFMPEG paths are set to the same drive as "MLT profiles folder" but pointing to the "bin" folder.
Comment 3 cc.caprani 2020-03-08 23:15:35 UTC
That is the case:
C:/Program Files/kdenlive/bin/ffmpeg.exe
C:/Program Files/kdenlive/share/mlt/profiles

Another Qt app doing goo screen capture is vokoscreenNG [https://github.com/vkohaupt/vokoscreenNG] which uses QAudioDeviceInfo and other Qt classes to do the device search.
Comment 4 emohr 2020-03-09 16:48:30 UTC
Please try the following: help -> reset configuration. 

If this is not helping that you can screen grab: delete "kdenliverc" and "kdenliveui.rc" see here: https://community.kde.org/Kdenlive/Configuration
Comment 5 Julius Künzel 2021-04-02 10:18:05 UTC
Can you please update to the latest version (20.12.3 at the moment, https://kdenlive.org/en/download/) and report here whether this is still happening? Please take also the tips above in to account.
Comment 6 Bug Janitor Service 2021-04-17 04:33:16 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2021-05-02 04:33:32 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!