Open seahawk1986 opened 4 years ago
Maybe due to software scaling. You can try to remove scaling and bits converting, and see the result.
Try now. No old frames for me.
I still get old frames with german DVB-T2 - unfortunately my main VDR has an unstable network connection which I still need to debug, so I won't be able to test DVB-C material until this issue is resolved.
so it's h264 vs h265
In general it is very strange, screenshots are taken, they cannot be old in any way. I had to change the script, otherwise there was an error.
try: t_start = time.perf_counter() delta = t_start - t_last if delta < t_sleep:
The walrus operator (:=
) was introduced in Python 3.8, you python version is probably older.
I tried a better reproducible approach to verify my suspicion - this script (based on https://bytefreaks.net/gnulinux/bash/ffmpeg-create-a-video-countdown) produces a h264 TS 720p50 video with a count-down/count-up timer (the freesoftwaresong ogg file is from https://archive.org/download/M00GNU/Moognucc-by-sa-3point0.zip, without an audio track softhddevice begins to slow down after a while during playback):
fps=50;
seconds=30;
mantissaDigits=2;
upperFont=300;
lowerFont=100;
ffmpeg -loop 1 -i black_bg_1280x720.png -i freesoftwaresong\ \(8bit\).ogg -c:v libx264 -r $fps -t $seconds -pix_fmt yuv420p -vf "fps=$fps,drawtext=fontfile='/usr/share/fonts/urw-base35/C059-Bold.otf':fontcolor=yellow:fontsize=$upperFont:x=(w-text_w)/2:y=(h-text_h)/2:text='%{eif\:($seconds-t)\:d}.%{eif\:(mod($seconds-t, 1)*pow(10,$mantissaDigits))\:d\:$mantissaDigits}',drawtext=fontfile='/usr/share/fonts/urw-base35/C059-Bold.otf':fontcolor=yellow:fontsize=$lowerFont:x=(w-text_w)/2:y=((h-text_h)/2)+$upperFont:text='Elapsed\: %{eif\:(t)\:d}.%{eif\:(mod(t, 1)*pow(10,$mantissaDigits))\:d\:$mantissaDigits}'" -c:a aac -shortest "00001.ts";
I copied the created file into the vdr recording directory ( /srv/vdr/video/local/Test/2020-10-30.12.00.4-0.rec/00001.ts
) played it back and ran the python script in a tight loop to capture as many frames as possible on my machine:
with SVDRPClient('localhost', 6419) as s:
for n in range(1000):
try:
print(*s.send_cmd_and_get_response(f'grab frame{n:04d}.pnm')) # 50 1280 720'))
except KeyboardInterrupt:
sys.exit()
In the resulting files (which i converted to jpeg for easier uploading) the frame sequence is out of order on multiple occasions, e.g.:
Frame 194 Frame 195 Frame 196 Frame 197
I can assume that this is how the softhddevice outputs, and not the problem of capturing frames with grab. Because there is nothing in the code of grab, that could create such a problem. I'll think about it.
Perhaps this is due to AV synchronization. Try last commit, and if nothing has changed, comment line 13292: AudioDelayms(-diff / 90);
Can you reproduce this now? For me, all works correct.
I hope I will find some time to try this within the next few days.
I built the most recent version and I am still getting old frames from time to time:
https://user-images.githubusercontent.com/935408/103479184-474fa080-4dcc-11eb-9c99-74bf899233e8.mp4
I am not sure if cuvid works correctly on my machine - building with cuvid supports looks ok:
$ dpkg-buildpackage -us -uc -b
dpkg-buildpackage: Information: Quellpaket vdr-plugin-softhddevice-cuvid
dpkg-buildpackage: Information: Quellversion 1.0.10-0yavdr0~focal
dpkg-buildpackage: Information: Quelldistribution focal
dpkg-buildpackage: Information: Quelle geändert durch Alexander Grothe <seahawk1986@gmx.de>
dpkg-buildpackage: Information: Host-Architektur amd64
dpkg-source --before-build .
fakeroot debian/rules clean
dh clean --with vdrplugin
dh_auto_clean
make -j1 clean
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird betreten
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird verlassen
dh_clean
debian/rules build
dh build --with vdrplugin
dh_update_autotools_config
dh_auto_configure
dh_auto_build
make -j1
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird betreten
CXX softhddevice.o
g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Werror=overloaded-virtual -Wno-unused-parameter -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o softhddevice.o softhddevice.cpp
CC softhddev.o
cc -g -O3 -Wall -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o softhddev.o softhddev.c
CC video.o
cc -g -O3 -Wall -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o video.o video.c
CC audio.o
cc -g -O3 -Wall -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o audio.o audio.c
CC codec.o
cc -g -O3 -Wall -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o codec.o codec.c
CC ringbuffer.o
cc -g -O3 -Wall -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o ringbuffer.o ringbuffer.c
CXX openglosd.o
g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Werror=overloaded-virtual -Wno-unused-parameter -c -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP
-DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -o openglosd.o openglosd.cpp
LD libvdr-softhddevice.so
g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"softhddevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_PIP -DHAVE_PTHREAD_NAME -DUSE_TS -DUSE_MPEG_COMPLETE -DH264_EOS_TRICKSPEED -DUSE_VDR_SPU -DUSE_ALSA -DUSE_OSS -DUSE_VDPAU -DUSE_VAAPI -DUSE_GLX -DUSE_SCREENSAVER -DUSE_SWSCALE -DUSE_SWRESAMPLE -DUSE_CUVID -DUSE_OPENGLOSD -g -W -Wall -Wextra -Winit-self -Werror=overloaded-virtual -Wno-unused-parameter -Wl,-Bsymbolic-functions -Wl,-z,relro -shared softhddevice.o softhddev.o video.o audio.o codec.o ringbuffer.o openglosd.o -lasound -lvdpau -lva-x11 -lva -lva-glx -lva -lGLU -lGL -lxcb-screensaver -lxcb-dpms -lswscale -lswresample -lGLEW -lGLU -lGL -lglut -lfreetype -lrt -lavcodec -lX11-xcb -lX11 -lxcb-icccm -lxcb -o libvdr-softhddevice.so
GT po/softhddevice.pot
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \
-k_ -k_N --package-name=vdr-softhddevice --package-version=1.0.10 \
--msgid-bugs-address='<see README>' -o po/softhddevice.pot `ls softhddev.c video.c audio.c codec.c ringbuffer.c softhddevice.cpp`
PO po/ru_RU.po
msgmerge -U --no-wrap --no-location --backup=none -q -N po/ru_RU.po po/softhddevice.pot
MO po/ru_RU.mo
msgfmt -c -o po/ru_RU.mo po/ru_RU.po
PO po/de_DE.po
msgmerge -U --no-wrap --no-location --backup=none -q -N po/de_DE.po po/softhddevice.pot
MO po/de_DE.mo
msgfmt -c -o po/de_DE.mo po/de_DE.po
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird verlassen
dh_auto_test
fakeroot debian/rules binary
dh binary --with vdrplugin
dh_testroot
dh_prep
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird verlassen
dh_vdrplugin_migrate
dh_installdocs
dh_installchangelogs
dh_perl
dh_link
dh_strip_nondeterminism
Normalized debian/vdr-plugin-softhddevice-cuvid/usr/share/locale/de_DE/LC_MESSAGES/vdr-softhddevice.mo
Normalized debian/vdr-plugin-softhddevice-cuvid/usr/share/locale/ru_RU/LC_MESSAGES/vdr-softhddevice.mo
dh_compress
dh_fixperms
dh_missing
debian/rules override_dh_strip
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird betreten
dh_strip --dbg-package=vdr-plugin-softhddevice-cuvid-dbg
make[1]: Verzeichnis „/home/alexander/src/vdr-plugin-softhddevice-cuvid-1.0.10“ wird verlassen
dh_makeshlibs
dh_shlibdeps
dh_vdrplugin_depends
dh_installdeb
dh_gencontrol
dpkg-gencontrol: Warnung: Paket vdr-plugin-softhddevice-cuvid-dbg: Substitutionsvariable ${vdr:Depends} unbenutzt, aber definiert
dh_md5sums
dh_builddeb
dpkg-deb: Paket »vdr-plugin-softhddevice-cuvid« wird in »../vdr-plugin-softhddevice-cuvid_1.0.10-0yavdr0~focal_amd64.deb« gebaut.
dpkg-deb: Paket »vdr-plugin-softhddevice-cuvid-dbg« wird in »../vdr-plugin-softhddevice-cuvid-dbg_1.0.10-0yavdr0~focal_amd64.deb« gebaut.
dpkg-genbuildinfo --build=binary
dpkg-genchanges --build=binary >../vdr-plugin-softhddevice-cuvid_1.0.10-0yavdr0~focal_amd64.changes
dpkg-genchanges: Information: Binärpaket(e) hochzuladen (kein Quellcode enthalten)
dpkg-source --after-build .
dpkg-buildpackage: Information: Binärpaket(e) hochzuladen (keine Quelle enthalten)
softhddevice is started with those arguments:
[softhddevice]
-D
-w alsa-driver-broken
-w also-no-close-open
-v cuvid
But only vdpau is mentioned in the log:
Jan 03 13:44:59 yavdr08 vdr[1193]: audio: 'alsa' output module used
Jan 03 13:45:00 yavdr08 vdr[1193]: [1294] VNSI: Requesting clients to reload recordings list
Jan 03 13:45:00 yavdr08 vdr[1193]: audio/alsa: supports pause: yes
Jan 03 13:45:03 yavdr08 vdr[1193]: [1294] VNSI: Requesting clients to reload timers
Jan 03 13:45:03 yavdr08 vdr[1193]: audio: 44100Hz supports 1 2 3 4 5 6 7 8 channels
Jan 03 13:45:03 yavdr08 vdr[1193]: audio: 48000Hz supports 1 2 3 4 5 6 7 8 channels
Jan 03 13:45:03 yavdr08 vdr[1193]: audio: 192000Hz supports 1 2 3 4 5 6 7 8 channels
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: VDPAU API version: 1
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: VDPAU information: NVIDIA VDPAU Driver Shared Library 450.80.02 Wed Sep 23 00:46:46 UTC 2020
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: highest supported high quality scaling 1
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: feature deinterlace temporal supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: feature deinterlace temporal spatial supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: attribute skip chroma deinterlace supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: 4:2:0 chroma format with 8192x8192 supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: 4:2:2 chroma format with 8192x8192 supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: 4:4:4 chroma format with 8192x8192 supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: 8bit BGRA format with 32768x32768 supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: 10bit RGBA format with 32768x32768 supported
Jan 03 13:45:03 yavdr08 vdr[1193]: video/vdpau: created osd output surface 1920x1080 with id 0x00000009
Jan 03 13:45:03 yavdr08 vdr[1193]: video: get hwaccel context, not supported
Jan 03 13:45:03 yavdr08 vdr[1193]: audio/alsa: using device 'default'
Jan 03 13:45:03 yavdr08 vdr[1193]: audio/alsa: start delay 336ms
Jan 03 13:45:04 yavdr08 vdr[1193]: video/vdpau: can't render mixer: An invalid handle value was provided.
Jan 03 13:45:04 yavdr08 vdr[1193]: video/vdpau: missed frame (1/2)
Jan 03 13:45:04 yavdr08 vdr[1193]: [1193] skindesigner: w 1920 h 1080 mode changed to 0
Jan 03 13:45:05 yavdr08 vdr[1193]: [1239] video directory scanner thread ended (pid=1193, tid=1239)
Jan 03 13:45:05 yavdr08 vdr[1193]: video/vdpau: synced after 87 frames
If you watch the picture directly, without a grab, maybe there will be the same frame jumps? This is very similar to how video/audio synchronization works, it happens to me when watching iptv. This can be disabled by commenting out line 13291 "AudioDelayms (-diff / 90);" in the video.c, for cuvid.
Live-TV and replaying recordings seems to be working fine, regardless if I am grabbing frames or not at the same time (although I don't own a HDMI-Capture device that would allow me to check single frames on the output).
Commenting out the line 13291 in video.c does not help - I don't see any messages from https://github.com/ua0lnj/vdr-plugin-softhddevice/blob/vdpau%2Bvaapi%2Bcuvid/video.c#L13290 in the syslog, so I doubt that this branch of the if-statement is reached in my case.
Then this is not what I thought, I will do more tests.
I seem to have found the reason. Screen capture loads the processor at 100%, so the synchronization breaks down and there may be a jump to the old frame. Check the CPU usage during the capture. I need to redo the screen capture.
Hello,
since it is not easy to capture the softhddevice output with tools like OBS, I tried to use the GRAB command (see example script below) to demonstrate movements in the VDR OSD - after grabbing the frames, I use
ffmpeg -r 25 -i /tmp/frame%04d.pnm -c:v libx264 -crf 25 -pix_fmt yuv420p capture.mp4
to convert the image sequence into a video.While I don't expect the resulting video to be perfectly smooth (there is no frame-based sync mechanism), I noticed that sometimes GRAB apparently writes an older frame into a file, so the video looks quite jerky due to the occasionally inserted older frames. I tried the same with softhdcuvid, where the GRAB command was a little slower, but lead to a smoother output without noticably inserting older frames in between.
Do you have an idea why grab with softhddevice using CUVID occasionally returns older frames?