gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
93 stars 34 forks source link

AV1: invalid stream/video codec not found #118

Open ThreeDeeJay opened 1 year ago

ThreeDeeJay commented 1 year ago

I downloaded this video but I'm getting these errors when opening it sView_vcLRNyx3VO sView_2wdx9noz0M I tried updating ffmpeg and ffprobe with the latest version, which work when launched directly. So is there another file I have to overwrite to update ffmpeg or does sview have to be recompiled with it? 🤔

gkv311 commented 1 year ago

sView is dynamically linked to FFmpeg libraries, so that you may replace DLLs within installation folder - like avcodec-58.dll and others.

However, FFmpeg libraries are evolved rapidly and change their ABI (and API) from time to time. You will need putting DLLs of compatible versions (see version prefixes in DLL names).

But then, you end up with using the same FFmpeg release that sView has been built for, and issues could be solved only if they have been backported to an older FFmpeg release (by FFmpeg developers or by you).

Hense, rebuilding sView with newer FFmpeg version might be the most reliable approach to go.

gkv311 commented 1 year ago

I tried updating [ffmpeg and ffprobe with the latest version, which work when launched directly.

Could you reupload screenshot here or share console input as text? Screenshot within the link is displayed blurry to me, with unreadable text.

ThreeDeeJay commented 1 year ago

I see. Indeed, replacing it with a avcodec-59.dll doesn't work so I guess I'm stuck unless there's an updated avcodec-58.dll, which I don't know where to find since it's usually not included in ffmpeg binary packages😅 As for the ffprobe log, here's the command line from the one built into sView:

C:\Programs\sView\amd64>ffprobe "Spherical Recombination VR teaser (4320p_30fps_AV1-128kbit_AAC).mp4"
ffprobe version n4.1-66-g1ec862af8e-sView.ru Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 7.3-win32 (GCC) 20180312
  configuration: --extra-version=sView.ru --enable-swscale --enable-shared --disable-static --enable-avfilter --enable-hardcoded-tables --enable-pthreads --disable-doc --enable-runtime-cpudetect --disable-w32threads --enable-libopenjpeg --extra-ldflags=-static-libgcc --enable-cross-compile --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --extra-cflags='-Dstrtod=__strtod' --disable-debug --enable-version3
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Spherical Recombination VR teaser (4320p_30fps_AV1-128kbit_AAC).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : Recombination VR teaser
    artist          : Julius Horsthuis
    date            : 2023
    encoder         : Lavf58.39.101
    comment         : https://www.youtube.com/watch?v=y5mUou-f4P0
  Duration: 00:02:04.11, start: 0.000000, bitrate: 15841 kb/s
    Stream #0:0(und): Video: av1 (av01 / 0x31307661), none, 3840x4320, 15720 kb/s, 30.01 fps, 30 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
Unsupported codec with id 32797 for input stream 0

And here's with the updated ffprobe.exe

C:\Programs\sView\amd64>ffprobe "Spherical Recombination VR teaser (4320p_30fps_AV1-128kbit_AAC).mp4"
ffprobe version git-2023-01-09-94aa70d-ffmpeg-windows-build-helpers Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/runner/work/ffmpeg-autobuild/ffmpeg-autobuild/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-gnutls --enable-libaom --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lshlwapi --extra-libs=-lmpg123 --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/runner/work/ffmpeg-autobuild/ffmpeg-autobuild/ffmpeg-source --enable-nonfree --enable-libfdk-aac --enable-decklink
  libavutil      57. 43.100 / 57. 43.100
  libavcodec     59. 56.100 / 59. 56.100
  libavformat    59. 34.102 / 59. 34.102
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 53.100 /  8. 53.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
[libdav1d @ 000002861de931c0] libdav1d 1.0.0-105-ged63a74
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Spherical Recombination VR teaser (4320p_30fps_AV1-128kbit_AAC).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : Recombination VR teaser
    artist          : Julius Horsthuis
    date            : 2023
    encoder         : Lavf58.39.101
    comment         : https://www.youtube.com/watch?v=y5mUou-f4P0
  Duration: 00:02:04.11, start: 0.000000, bitrate: 15841 kb/s
  Stream #0:0[0x1](und): Video: av1 (Main) (av01 / 0x31307661), yuv420p(tv, bt709), 3840x4320, 15720 kb/s, 30.01 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
[libdav1d @ 000002861deb3e80] libdav1d 1.0.0-105-ged63a74

Screenshot too cuz why not. EDIT: here's the video file I used.

gkv311 commented 1 year ago

I have upgraded sView to FFmpeg 5.1, but this didn't helped much:

[av1 @ 000002a6b2f2ee40] Your platform doesn't suppport hardware accelerated AV1 decoding.
[av1 @ 000002a6b2f2ee40] Failed to get pixel format.
[av1 @ 000002a6b2f2ee40] Missing Sequence Header.
[av1 @ 000002a6b2f2ee40] Missing Sequence Header.
[av1 @ 000002a6b2f2ee40] Missing Sequence Header.

Apparently, one would need building FFmpeg with external library libdav1d (--enable-libdav1d) to have better support of this codec... Though you may now try replacing FFmpeg libraries coming with sView with some alternative build.

ThreeDeeJay commented 1 year ago

I replaced avcodec-59.dll with the one from the latest OBS and now playback works, though I'm getting really poor performance, even though my CPU is maxed out: https://i.imgur.com/7SeO1gg.mp4

PotPlayer playback is pretty smooth even with software decoding https://i.imgur.com/60cy7Vh.mp4 (the recording gets choppy but it actually looks smooth like at the beginning)