1

I saw that here are asked questions related to encoding and ShareX, so I decided to ask in this portal.

Basically I recorded video using ShareX 16.1. ffmpeg version:

ffmpeg version n7.0-14-g2d3ee7c069-20240423 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.26.0.65_ecc5e41)
  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 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --disable-doc --disable-ffplay --disable-ffprobe --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp --extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc --cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar --ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm --extra-version=20240423
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Settings inside ShareX are:

ShareX - Task Settings ShareX - Screen recording options

On last screen you can see, that I copied additional command line arguments for recording with microphone.

I recorded 2h video and was happy to watch the material the next day, but when I opened VLC or Media Player Classic (latest version) and wanted to jump to 1 h 5 min of video it took about ~10 minutes to get there...

Not sure whether this issue is related with NVENC (I have 3770k and GTX1070ti, so I decided to use GPU, this CPU is getting overwhelmed with various programs and stuff) or if it's just ShareX behaviour.

It seems very strange that ShareX recordings do not seek quickly. Basically If I go to 01:05:00 it takes about ~10 minutes. And then I want to go to 01:30:00 and it will take again enourmous amount of time.

Just as if this video was recorded using 'monolythic' block and not in 'chunks' so jumping takes enourmous amount of time.

What do I need to add to make seeking work fast? I am guessing maybe I should add something inside Additional command line arguments, just like for normal YouTube movie or any movie from any service e.g. Netflix? Or, unlikely, maybe I can't do this?

I am also open to other suggestions with encoding and various parameters, but the main culprit is this jumping issue.

Destroy666
  • 12,350

1 Answers1

1

One way to possibly get seeking issues fixed is to ensure there are enough keyframes in the video, as video players often use those to jump to specific time chosen by the user. They first find the closest keyframe, then decode more optimized frames until the time is reached.

To make sure the encoder is including enough keyframes, you can add -g 60 to ShareX ffmpeg additional args option. This param specifies number of frames between 2 keyframes. 60 with 30 FPS means we are adding a keyframe every 2 seconds, so at most less than 2 seconds will need to be decoded.

Of course smaller GOP means bigger file size as more keyframes = more full frames in your video.

Destroy666
  • 12,350