[FFmpeg-user] need help with making an "in sync" screen recording.

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Sep 25 20:55:09 EEST 2020


Am Fr., 25. Sept. 2020 um 02:06 Uhr schrieb Amon Gibson Albuquerque
Nunes <amon.nunes at hotmail.com>:
>
> i'm confused, why does it (the old documentation) say that -q 1 should not be used?

Because you should use -q 2 instead.

> and what am i actually supposed to use instead of -bitrate?

I don't know what you want to achieve...

> anyway, here's the complete uncut console output. from today.
> ---
> Z:\ffmpeg\bin>ffmpeg -thread_queue_size 2048 -f gdigrab -draw_mouse 0 -framerate 30 -show_region 0 -i desktop -thread_queue_size 2048 -f dshow -i audio="Mixagem estéreo (Conexant SmartAudio HD)" -vf "crop=512:303:0:40,scale=1024:606" -af "adelay=1000|1000" -f vob -codec:v mpeg2video -q 1 -g 1 -bitrate 40000000 -maxrate 50000000 -codec:a pcm_s16be gameplay_footage_01.mpg

I missed this originally:
Are you sure that you want to use pcm_s16be?
It might reduce compatibility of your output file.

Just to make sure this doesn't get lost:
Use -q 2 instead of -q 1, -bitrate has no effect afaict.

> ffmpeg version N-99357-g14d6838638 Copyright (c) 2000-2020 the FFmpeg developers
>   built with gcc 9.3-win32 (GCC) 20200320
>   configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libvidstab --disable-libwavpack --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
>   libavutil      56. 59.100 / 56. 59.100
>   libavcodec     58.107.100 / 58.107.100
>   libavformat    58. 59.100 / 58. 59.100
>   libavdevice    58. 11.102 / 58. 11.102
>   libavfilter     7. 87.100 /  7. 87.100
>   libswscale      5.  8.100 /  5.  8.100
>   libswresample   3.  8.100 /  3.  8.100
>   libpostproc    55.  8.100 / 55.  8.100
> [gdigrab @ 0000019b06e760c0] Capturing whole desktop as 1366x768x32 at (0,0)
> [gdigrab @ 0000019b06e760c0] Stream #0: not enough frames to estimate rate; consider increasing probesize
> Input #0, gdigrab, from 'desktop':
>   Duration: N/A, start: 1600991758.933570, bitrate: 1007137 kb/s
>     Stream #0:0: Video: bmp, bgra, 1366x768, 1007137 kb/s, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
> Guessed Channel Layout for Input Stream #1.0 : stereo
> Input #1, dshow, from 'audio=Mixagem estéreo (Conexant SmartAudio HD)':
>   Duration: N/A, start: 134632.817000, bitrate: 1411 kb/s
>     Stream #1:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s

It is not possible to synchronize these two streams as they have very
different start-times.

I don't know if "use_wallclock_as_timestamps 1" helps in your case.

Carl Eugen


More information about the ffmpeg-user mailing list