Selur's Little Message Board
[HELP] how to encode AVS2 to H265 video? - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: [HELP] how to encode AVS2 to H265 video? (/thread-4243.html)

Pages: 1 2


how to encode AVS2 to H265 video? - ssdde - 25.10.2025

i have a 4K 2160p AVS2 file, and want to encode it to H265,  i choose NVenc mode, because it's fast for test. and "Filtering" choose "no XSynth", but when click the Hybrid Start Queue button, it crashed.

attachment is the debug file.

please help, thank.


RE: how to encode AVS2 to H265 video? - Selur - 25.10.2025

Hybrid uses:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -r 50/1 -analyzeduration 200M -probesize 200M -i "D:\P2\2025山东卫视中秋晚会 SDTV.2025.Shandong.TV.Mid-Autumn.Festival.Gala.20251007.HDTV.2160p.AC3.AVS2.TPTV TS 14.43G\2025山东卫视中秋晚会_山东卫视-AVS2_10_06_19_28.ts" -map 0:0 -an -sn -pix_fmt yuv420p10le -strict -1 -fps_mode auto -r 50/1 -f yuv4mpegpipe - | "C:\Program Files\Hybrid\64bit\NVEncC.exe" --y4m -i - --fps 50.000 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --vbr 0 --vbr-quality 15.00 --gop-len 0 --ref 3 --bframes 3 --bref-mode disabled --no-b-adapt --lookahead 16 --mv-precision Q-pel --lookahead-level 0 --preset default --colorrange limited --colormatrix bt2020nc --colorrange limited --cuda-schedule sync --output "C:\Users\x\AppData\Local\Temp\test_1_2025-10-25@09_45_31_0710_02.265"
Which fails with due with:
NVEnc output: y4m: failed to parse y4m header
this indicates something is wrong with the decoding.

Do you see any errors wahn calling
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -noautorotate -nostdin -threads 8 -r 50/1 -analyzeduration 200M -probesize 200M -i "D:\P2\2025山东卫视中秋晚会 SDTV.2025.Shandong.TV.Mid-Autumn.Festival.Gala.20251007.HDTV.2160p.AC3.AVS2.TPTV TS 14.43G\2025山东卫视中秋晚会_山东卫视-AVS2_10_06_19_28.ts" -map 0:0 -an -sn -pix_fmt yuv420p10le -strict -1 -fps_mode auto -r 50/1 -f yuv4mpegpipe NUL
inside a Windows command prompt?

Cu Selur


RE: how to encode AVS2 to H265 video? - ssdde - 25.10.2025

yes, seems there are some errors, how to fix?
[Image: ctwU1X8saPBqudz.jpg]

Microsoft Windows [版本 10.0.17763.678]
© 2018 Microsoft Corporation。保留所有权利。

C:\Users\x>"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -noautorotate -nostdin -threads 8 -r 50/1 -analyzeduration 200M -probesize 200M -i "D:\P2\2025山东卫视中秋晚会 SDTV.2025.Shandong.TV.Mid-Autumn.Festival.Gala.20251007.HDTV.2160p.AC3.AVS2.TPTV TS 14.43G\2025山东卫视中秋晚会_山东卫视-AVS2_10_06_19_28.ts" -map 0:0 -an -sn -pix_fmt yuv420p10le -strict -1 -fps_mode auto -r 50/1 -f yuv4mpegpipe NUL
ffmpeg version N-121473-gdc39a576ad Copyright © 2000-2025 the FFmpeg developers
  built with gcc 15.2.0 (Rev8, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libharfbuzz --enable-libmfx --enable-libmysofa --enable-libopenjpeg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-libglslang --enable-vulkan --enable-libuavs3d --enable-liboapv --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      60. 13.100 / 60. 13.100
  libavcodec    62. 16.100 / 62. 16.100
  libavformat    62.  6.101 / 62.  6.101
  libavdevice    62.  2.100 / 62.  2.100
  libavfilter    11.  9.100 / 11.  9.100
  libswscale      9.  3.100 /  9.  3.100
  libswresample  6.  2.100 /  6.  2.100
Input #0, mpegts, from 'D:\P2\2025山东卫视中秋晚会 SDTV.2025.Shandong.TV.Mid-Autumn.Festival.Gala.20251007.HDTV.2160p.AC3.AVS2.TPTV TS 14.43G\2025山东卫视中秋晚会_山东卫视-AVS2_10_06_19_28.ts':
  Duration: 01:18:47.99, start: 1.400000, bitrate: 26218 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Video: avs2 (AVSV / 0x56535641), none, 3840x2160, 50 fps, 50 tbr, 90k tbn, start 2.052533
  Stream #0:1[0x101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s, start 1.400000
[vist#0:0/avs2 @ 00000213f464ed40] Decoding requested, but no decoder found for: avs2
Error opening output file NUL.
Error opening output files: Invalid argument

C:\Users\x>


RE: how to encode AVS2 to H265 video? - Selur - 25.10.2025

[vist#0:0/avs2 @ 00000213f464ed40] Decoding requested, but no decoder found for: avs2
indicates that the avs2 decoder is missing.
Assuming you did update to the dev when I told you the second time, this is strange, since for me calling 'ffmpeg -decoders' on the ffmpeg version which comes with that dev version I see:
...
V....D avs                  AVS (Audio Video Standard) video
V..... libdavs2             libdavs2 AVS2-P2/IEEE1857.4 (codec avs2)
V....D libuavs3d            libuavs3d AVS3-P2/IEEE1857.10 (codec avs3)
...
V....D cavs                 Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
...
so avs2 should be supported through the in ffmpeg binary included libdavs2.
=>
  1. make sure you use the latest dev, update if not
  2. if that does not work call:
    "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -decoders
    and check that the above-mentioned decoders are listed.

Cu Selur


RE: how to encode AVS2 to H265 video? - ssdde - 25.10.2025

i download from your google dirve the latest Hybrid_dev_2025.10.24-214637.exe, still crash when start, i selected "no Xsynth" already.

attachment debug file


RE: how to encode AVS2 to H265 video? - Selur - 25.10.2025

Can't see a crash in the debug output,..
it starts with:
ffmpeg version N-121490-g7e8ef2ded2 Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 15.2.0 (Rev8, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libharfbuzz --enable-libmfx --enable-libmysofa --enable-libopenjpeg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-libglslang --enable-vulkan --enable-libdavs2 --enable-libuavs3d --enable-liboapv --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      60. 13.100 / 60. 13.100
  libavcodec     62. 16.100 / 62. 16.100
  libavformat    62.  6.101 / 62.  6.101
  libavdevice    62.  2.100 / 62.  2.100
  libavfilter    11.  9.100 / 11.  9.100
  libswscale      9.  3.100 /  9.  3.100
  libswresample   6.  2.100 /  6.  2.100
[davs2 info]: davs2: 1.6.206 b41cf117452e2d73.8, 2025-10-24 14:43:32
[davs2 info]: CPU Capabilities:  MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2

[davs2 info]: Manager 23e895d5fe0: using 1 thread(s): 1(frame/AEC)+0(pool/REC), 2 tasks

[davs2 info]: Manager 23e895d5fe0: Sequence Resolution: 3840x2160.

[davs2 error]: Dec[ 0] 23e895d6b60: Un-supported bit-depth 10 in this version.


[davs2 error]: Dec[ 0] 23e895d6b60: Un-supported bit-depth 10 in this version.


Input #0, mpegts, from 'F:\avs2\AVS2.ts':
  Duration: 01:18:47.99, start: 1.400000, bitrate: 26218 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Video: avs2 (libdavs2) (AVSV / 0x56535641), yuv420p10le, 3840x2160, 50 fps, 50 tbr, 90k tbn, start 2.052533

  Stream #0:1[0x101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s, start 1.400000
Stream mapping:
  Stream #0:1 -> #0:0 (copy)

Output #0, ac3, to 'C:\Users\x\AppData\Local\Temp\iId_1_aid_257_2025-10-25@19_33_46_1410_01.ac3':
  Metadata:
    encoding_tool   : Hybrid 2025.10.24.1
    encoder         : Lavf62.6.101
  Stream #0:0: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Press [q] to stop, [?] for help
after that is does not seem to crash, but just output empty data,...
seems like ffmpeg doesn't support 10bit avs2 ¯\_(ツ)_/¯

There seem to be custom builds of ffmpeg which support this, see: https://github.com/xatabhk/FFmpeg-avs2-avs3/releases
but those are not part of libdavs2 atm.
Nothing I can do about that, but you can probably simply replace the existing ffmpeg version with one from that github repository. (I did not test this, this is just an assumption,... and I don't know whether this will break decoding of something else through ffmpeg.)

Cu Selur


RE: how to encode AVS2 to H265 video? - ssdde - 25.10.2025

it's too hard for me. i wish you could make a version that support AVS3 AVS2 both encode to H265 successfully. 

besides AVS3 AVS2, is it possible to convert AVS+ encoded video to H265 using Hybrid?


RE: how to encode AVS2 to H265 video? - Selur - 25.10.2025

Quote:besides AVS3 AVS2, is it possible to convert AVS+ encoded video to H265 using Hybrid?
Maybe, not sure whether Hybrid will misidentify the raw streams as Avisynth scripts.
If not, it should simply work by replacing the ffmpeg binary.

Quote:besides AVS3 AVS2, is it possible to convert AVS+ encoded video to H265 using Hybrid?
with the right ffmpeg version Hybrid should be able to handle the files while 'No XSynth' is used.
Vapoursynth&Avisynth will still not open avs+, avs2, avs3 files unless a source filter supports them, which none of them do atm.

The ffmpeg version I added to the dev version works fine with the current samples from https://github.com/xatabhk/avs2-avs3-video-samples.
...
V....D avs                  AVS (Audio Video Standard) video
V..... libdavs2             libdavs2 AVS2-P2/IEEE1857.4 (codec avs2)
V....D libuavs3d            libuavs3d AVS3-P2/IEEE1857.10 (codec avs3)
...
V....D cavs                 Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
...
=> so it supports the official avs1, avs2, avs3 decoders of ffmpeg.

If you can't manage to replace one ffmpeg.exe with another, don't expect me to spend hours trying to compile stuff, just for you to come around the corner with another file format. This started with you asking for avs3 support, then it was avs2 support, then it was avs2 with high bit depth and not it is avs+ (which seems to be high bit depth avs1).
=> Sorry, but I do not have the time or motivation to blindly test around, since I don't really use any of these myself.

https://github.com/GyanD/codexffmpeg/issues/202 sounds like https://www.gyan.dev/ffmpeg/builds/ might offer a ffmpeg version which support 10bit for avs2 in a few days.


Cu Selur


RE: how to encode AVS2 to H265 video? - ssdde - 26.10.2025

yes, I hope we can eventually support all of them—AVS3, AVS2, and AVS+. Wouldn't it be better to have full support across the board?

More and more videos on the web are now using these three codecs, and I'm looking for a simple and practical way to convert them into the more widely compatible H.265 format. Thanks.


RE: how to encode AVS2 to H265 video? - Selur - 26.10.2025

Hybrid will automatically support them, in case they make it into libav.

Cu Selur