[FFmpeg-trac] #3989(undetermined:new): "Overwrite?" dialog causes frozen video when capturing desktop video
FFmpeg
trac at avcodec.org
Mon Sep 29 23:57:00 CEST 2014
#3989: "Overwrite?" dialog causes frozen video when capturing desktop video
-------------------------------------+-------------------------------------
Reporter: oconnor663 | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: git-master | undetermined
Keywords: x11grab | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by oconnor663):
I can't speak to the expectations of an expert, but as an ordinary user,
the experience feels broken. Let's say I fire up glxgears, start an ffmpeg
recording of my desktop, wait at the prompt for 2 seconds, and then record
for 2 seconds. (Like in my example video attached.) I would expect one of
two behaviors:
1) I get 4 seconds of video of glxgears moving, because ffmpeg started
recording immediately.
2) I get 2 seconds of video of glxgears moving, because ffmpeg only
started recording after I agreed to overwrite the existing file.
But what actually happens is:
3) I get 4 seconds of video, but for the first 2 seconds the picture is
frozen.
I can't use that video. I must've done something wrong. I spend a lot of
time fiddling with all the flags I'm using. The problem seems to come and
go when I change container types (but actually, it goes away whenever I
used a new filename).
The workaround of course is to delete the preexisting video file before
re-recording it, so that I don't get prompted. What sucks is that it's not
at all obvious *why* it's happening, at least to a beginner like me.
Console output from my git master build:
{{{
# The first run, no prompt:
$ /var/tmp/ffmpeg/ffmpeg -f x11grab -i $DISPLAY test.mkv
ffmpeg version N-66543-g1441641 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 29 2014 13:46:22 with gcc 4.9.1 (GCC) 20140903 (prerelease)
configuration: --enable-x11grab --enable-gpl
libavutil 54. 7.101 / 54. 7.101
libavcodec 56. 1.101 / 56. 1.101
libavformat 56. 7.101 / 56. 7.101
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.102 / 5. 1.102
libswscale 3. 1.100 / 3. 1.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 1.100 / 53. 1.100
[x11grab @ 0x2f90c20] device: :0 -> display: :0 x: 0 y: 0 width: 640
height: 480
[x11grab @ 0x2f90c20] shared memory extension found
Input #0, x11grab, from ':0':
Duration: N/A, start: 1412025598.375747, bitrate: 294617 kb/s
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 640x480,
294617 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
Output #0, matroska, to 'test.mkv':
Metadata:
encoder : Lavf56.7.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480,
q=2-31, 200 kb/s, 29.97 fps, 1k tbn, 29.97 tbc
Metadata:
encoder : Lavc56.1.101 mpeg4
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame= 70 fps= 30 q=2.0 Lsize= 263kB time=00:00:02.33 bitrate=
923.6kbits/s
video:262kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.498994%
Received signal 2: terminating.
# The second run, with the overwrite prompt:
$ /var/tmp/ffmpeg/ffmpeg -f x11grab -i $DISPLAY test.mkv
ffmpeg version N-66543-g1441641 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 29 2014 13:46:22 with gcc 4.9.1 (GCC) 20140903 (prerelease)
configuration: --enable-x11grab --enable-gpl
libavutil 54. 7.101 / 54. 7.101
libavcodec 56. 1.101 / 56. 1.101
libavformat 56. 7.101 / 56. 7.101
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.102 / 5. 1.102
libswscale 3. 1.100 / 3. 1.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 1.100 / 53. 1.100
[x11grab @ 0x36c9c20] device: :0 -> display: :0 x: 0 y: 0 width: 640
height: 480
[x11grab @ 0x36c9c20] shared memory extension found
Input #0, x11grab, from ':0':
Duration: N/A, start: 1412025603.853949, bitrate: 294617 kb/s
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 640x480,
294617 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
File 'test.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to 'test.mkv':
Metadata:
encoder : Lavf56.7.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480,
q=2-31, 200 kb/s, 29.97 fps, 1k tbn, 29.97 tbc
Metadata:
encoder : Lavc56.1.101 mpeg4
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame= 19 fps=0.0 q=2.0 size= 103kB time=00:00:02.66 bitrate=
315.4kbits/s dupframe= 34 fps= 34 q=2.0 size= 167kB time=00:00:03.16
bitrate= 432.3kbits/s dupframe= 49 fps= 32 q=1.6 size= 265kB
time=00:00:03.67 bitrate= 592.5kbits/s dupframe= 65 fps= 32 q=2.0 size=
320kB time=00:00:04.20 bitrate= 623.1kbits/s dupframe= 67 fps= 31 q=2.4
Lsize= 326kB time=00:00:04.27 bitrate= 625.2kbits/s dup=0 drop=28
video:325kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.396367%
Received signal 2: terminating.
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3989#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list