ffmpeg generating a blank video as output of a screen capture

0

1

I'm trying to record as video a screen but it's a blank video as output. I'm using this command:

ffmpeg -f gdigrab -framerate 25 -i title=calc fo.flv

How do I fix this?

Jack

Posted 2016-06-19T03:57:19.423

Reputation: 963

Share the full console output. Blind guess is that you need to add -pix_fmt yuv420p before fo.flv Which player are you testing in? – Gyan – 2016-06-19T06:00:15.503

I'm new to ffmpeg, does it record to video players only? I'm not testing with one... the -pix_fmt yuv420p returned not found – Jack – 2016-06-19T18:30:01.810

No, it saves to files. You mentioned "a blank video as output". What did you view the file in? – Gyan – 2016-06-19T18:38:24.637

I'm sorry, I mean, "does it record only video players window?" e.g, can I use it with any kind of Window, such as a calculator? the video output is just a black screen where the only thing that seems to be recorded was the mourse cursor – Jack – 2016-06-19T18:42:08.007

No. it can record any window. Try title=Calculator – Gyan – 2016-06-19T18:45:54.120

I've tried it, the video output is the previously one I mentioned. – Jack – 2016-06-19T18:48:28.677

If I try record for example MS word window, I get: invalid properties, aborting – Jack – 2016-06-19T18:48:58.900

Share the full console output. – Gyan – 2016-06-19T19:33:25.350

Here's: console output http://pastebin.com/t7VURySg and video: https://vid.me/fIPM (I'm clicking on buttons 3, +, and 3 a couple of times but only cursor gets recorded)

– Jack – 2016-06-19T19:40:51.423

[gdigrab @ 02edb100] Failed to capture image (error 8) happens when I close the window. I don't know other way to stop the ffmpeg recording – Jack – 2016-06-19T19:41:53.117

Press q or Ctrl-C to stop recording, when the focus is on the ffmpeg terminal window. Does -i desktop work? – Gyan – 2016-06-19T20:03:37.537

Yes, -i desktop does work fine. – Jack – 2016-06-19T20:06:38.197

@Mulvya It isn't working but thosw WIndows' (some native) programs I tested: calc.exe, notepad.exe, MS word, Firefox, Windows Media Player but it works for k-lite video player. It didn't find much of windows by title that I've tried either. I guess it didn't support unicode too? from that source file (https://github.com/WatchBeam/ftl-ffmpeg/blob/master/libavdevice/gdigrab.c) it seems to be using an ANSI string (if the exe I'm using came from that same source)

– Jack – 2016-06-19T20:21:53.187

@Mulvya: Are you using Windows? do recording the Windows' native calculator program work on your machine? – Jack – 2016-06-20T02:10:34.237

It works here. But the mouse isn't recorded correctly.

– Gyan – 2016-06-20T04:54:31.583

Weird. I see you're on Win7, I'm on win10... I'll try on win7 machine to see if make any difference. ffmepg doesn't accept unicode file names either, I'm almost giving up ffmepg... – Jack – 2016-06-20T04:57:01.467

Since desktop works, you can capture and crop at the same time. – Gyan – 2016-06-20T05:04:40.483

Answers

2

This is a known issue: https://trac.ffmpeg.org/ticket/7718

From the comments on the issue, it has to do with GPU rendering.

Alex Sojda

Posted 2016-06-19T03:57:19.423

Reputation: 21