Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th April 2024, 20:42   #1  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
Xeve 0.5 - 'vui parameters is not proper'

both:
Code:
xeve-base --verbose 2 --input stdin --input-depth 10 --input-csp 1 --fps 25/1 --codec-bit-depth 10  --rc-type 0 --qp 32 --profile "baseline" --level-idc 0 --range "limited" --colorprim "2-unspecified" --transfer "2-unspecified" --matrix-coefficients "5-bt470bg" --sar 1:1 --output "J:\tmp\2024-04-27@21_32_15_5510\test_1_2024-04-27@21_32_15_5510_01.evc"
and
Code:
xeve-base --verbose 2 --input stdin --input-depth 10 --input-csp 1 --fps 25/1 --codec-bit-depth 10  --rc-type 0 --qp 32 --profile "baseline" --level-idc 0 --range "limited" --colorprim "unspecified" --transfer "unspecified" --matrix-coefficients "bt470bg" --sar 1:1 --output "J:\tmp\2024-04-27@21_32_15_5510\test_1_2024-04-27@21_32_15_5510_01.evc"
give me:
Code:
[D:\a\xeve\xeve\app\xeve_app.c:1035] vui parameters is not proper
Does anyone know who to use this?
The help states:
Code:
--colorprim [STRING] (optional) [None]
    : 1- bt709, 2-unspecified, 3- reserved, 4- bt470m, 5- bt470bg, 6- smpte170m,         7- smpte240m, 8- Generic film, 9- bt2020, 10-smpte428, 11-smpte431, 12-smpte432,          22-EBU Tech. 3213 Default 2-unspecified
  --transfer [STRING] (optional) [None]
    : 1- transfer characteristics from bt709, 2-unspecified, 3-reserved, 4-bt470m, 5-bt470bg, 6-smpte170m,         7-smpte240m, 8-linear, 9-log100, 10-log316, 11-iec61966-2-4, 12-bt1361e, 13-iec61966-2-1,         14-bt2020-10, 15-bt2020-12, 16-smpte2084, 17-smpte428, 198-arib-std-b67. Default 2-unspecified
  --matrix-coefficients [STRING] (optional) [None]
    : 0-gbr, 1-bt709, 2-unspecified, 3-reserved, 4-fcc, 5-bt470bg, 6-smpte170m, 7-smpte240m,           8-ycgco, 9-bt2020nc, 10-bt2020c, 11-smpte2085, 12-chroma-derived-nc, 13-chroma-derived-c, 14-ictcp, 15-255 reserved};
Cu Selur

Ps.: created an issue entry https://github.com/mpeg5/xeve/issues/104
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 27th April 2024 at 20:46.
Selur is offline   Reply With Quote
Old 27th April 2024, 21:32   #2  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 728
I know
xeve_app.exe -i "114.yuv" -o "output.evc" -v 2 -q 30 -m 4 -d 8 -w 1280 -h 720 -z 30 --frames 100 --preset medium --profile main --level-idc 6.2 --range limited --colorprim unknown --transfer unknown --matrix-coefficients bt470bg --sar 1:1
Jamaika is offline   Reply With Quote
Old 28th April 2024, 06:51   #3  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
That works! Thanks!
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 28th April 2024, 18:55   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
Using:
Code:
xeve-base --verbose 2 --input stdin --input-depth 10 --input-csp 1 --fps 30000/1001 --codec-bit-depth 10  --rc-type 0 --qp 32 --profile baseline --range limited --matrix-coefficients bt470bg --sar 8:9 --output "J:\tmp\2024-04-28@19_44_30_5310\alienson2001_new_1_2024-04-28@19_44_30_5310_02.evc"
I again get:
Code:
XEVE: eXtra-fast Essential Video Encoder
[D:\a\xeve\xeve\app\xeve_app.c:1035] vui parameters is not proper
and it works if '--sar 1:1' is used,... ARGH
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 28th April 2024, 20:32   #5  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 371
If you look here:
https://github.com/mpeg5/xeve/blob/m...app/xeve_app.c

at the xeve_sar_names array you can see the valid values. It appears custom SARs are not available.
rwill is offline   Reply With Quote
Old 28th April 2024, 20:40   #6  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 728
The program is incomplete. Improved ETM library.
https://gitlab.com/v-nova-public/ETM
Code:
static const char * const xeve_sar_names[] = { "unknown", "1:1", "12:11", "10:11", "16:11", "40:33", "24:11", "20:11",
                                                "32:11", "80:33", "18:11", "15:11", "64:33", "160:99", "4:3", "3:2", "2 :1", 0 };
Why is sar divided by 11? I don't know
The easiest way is to correct the imperfections yourself.
Add "8:9" and that's it.

Last edited by Jamaika; 28th April 2024 at 21:42.
Jamaika is offline   Reply With Quote
Old 28th April 2024, 21:06   #7  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 371
Quote:
Originally Posted by Jamaika View Post
The easiest way is to correct the imperfections yourself.
Add "8:9" and that's it.
I don't think this will work ...
rwill is offline   Reply With Quote
Old 28th April 2024, 21:41   #8  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 728
I corrected help descriptions.
Code:
  --videoformat [STRING] (optional) [None]
    : 0-component, 1-pal, 2-ntsc, 3-secam, 4-mac. 5-unknown
  --range [STRING] (optional) [None]
    : black level and range of luma and chroma signals as 1-full or 0-limited
  --colorprim [STRING] (optional) [None]
    : 1-bt709, 2-unknown, 3-reserved, 4-bt470m, 5-bt470bg, 6-smpte170m,
      7-smpte240m, 8-Generic film, 9-bt2020, 10-smpte428, 11-smpte431, 12-smpte432,
      22-EBU Tech. 3213 Default 2-unknown
  --transfer [STRING] (optional) [None]
    : 1-transfer characteristics from bt709, 2-unknown, 3-reserved, 4-bt470m, 5-bt470bg, 6-smpte170m,
      7-smpte240m, 8-linear, 9-log100, 10-log316, 11-iec61966-2-4, 12-bt1361e, 13-iec61966-2-1,
      14-bt2020-10, 15-bt2020-12, 16-smpte2084, 17-smpte428, 198-arib-std-b67. Default 2-unknown
  --matrix-coefficients [STRING] (optional) [None]
    : 0-gbr, 1-bt709, 2-unknown, 3-reserved, 4-fcc, 5-bt470bg, 6-smpte170m, 7-smpte240m,
      8-ycgco, 9-bt2020nc, 10-bt2020c, 11-smpte2085, 12-chroma-derived-nc, 13-chroma-derived-c, 14-ictcp,
      15-255 reserved
I added sar 8:9.
Code:
static const char * const xeve_sar_names[] = { "unknown", "1:1", "12:11", "10:11", "16:11", "40:33", "24:11", "20:11",
                                               "32:11", "80:33", "18:11", "15:11", "64:33", "160:99", "8:9", "4:3", "3:2", "2:1", 0 };
Code:
xeve_app.exe -i "114.yuv" -o "output.evc" --verbose 2 --qp 30 --threads 4 --input-depth 10 --width 1280 --height 720 --fps 30000/1000 --profile baseline --range limited --matrix-coefficients bt470bg --sar 8:9
XEVE: eXtra-fast Essential Video Encoder
[ 3 / 0 frames ] [ 1.30 frame/sec ] [ 1891920.0000 kbps ] [  0h  0m  3s ]
https://www.sendspace.com/file/wx1p5d
Jamaika is offline   Reply With Quote
Old 29th April 2024, 04:13   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
Thanks for the help.
In my opinion, the typical MPEG-4, ITU-R 601 and Generic PARs should be supported:



Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 29th April 2024, 05:45   #10  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 371
Quote:
Originally Posted by Jamaika View Post
I added sar 8:9.
Code:
static const char * const xeve_sar_names[] = { "unknown", "1:1", "12:11", "10:11", "16:11", "40:33", "24:11", "20:11",
                                               "32:11", "80:33", "18:11", "15:11", "64:33", "160:99", "8:9", "4:3", "3:2", "2:1", 0 };
This is not going to work.

You see - this array maps a string to an integer which is an index in a table, the aspect_ratio_idc, which is part of a bitstream structure. You cannot extend the table at will because the table is defined in the EVC standard. If you want to have an aspect ratio not in the standard table you have to use the escape/extend mechanism, please see

https://github.com/mpeg5/xeve/blob/m...ase/xeve_eco.c
function int xeve_eco_vui(XEVE_BSW * bs, XEVE_VUI * vui).

You have to set vui->aspect_ratio_idc to 255 (EXTENDED_SAR) and get your value pair in vui->sar_width and vui->sar_height.

It should be pretty easy because if you look at the API in
https://github.com/mpeg5/xeve/blob/m...app/xeve_app.c
the function static int vui_param_check(XEVE_PARAM * param) already accounts for sar to be 255 and the fields sar_width and sar_height are already there.
rwill is offline   Reply With Quote
Old 27th May 2024, 14:56   #11  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
using:
Code:
vspipe "G:\Output\encodingTempSynthSkript_2024-05-27@15_52_49_8010_0.vpy" - -c y4m | xeve-base --verbose 2 --input stdin --input-depth 10 --input-csp 1 --fps 24 --codec-bit-depth 10  --rc-type 0 --qp 32 --profile baseline --level-idc 0 --preset medium --info 1 --aq-mode 0 --range limited --matrix-coefficients bt470bg --sar 1:1 --output "G:\Output\test_1_2024-05-27@15_52_49_8010_02.evc"
ffprobe reports 25fps for the output.
additionally using:
Code:
ffmpeg -y  -r 24000/1001 -i "G:\Output\test_1_2024-05-27@15_52_49_8010_02.evc" -c:v copy -map 0:0   -aspect 640:352 -r 24000/1001 "G:\Output\test.mp4"
both ffprobe and mediainfo report 25fps.
=> at least xeve_app atm. only outputs 25fps.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 27th May 2024, 16:32   #12  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 728
I shouldn't comment because I'm not the creator of evc.
What's the problem?

Format : Matroska
Format version : Version 4
File size : 1.44 MiB
Duration : 4 s 515 ms
Overall bit rate : 2 683 kb/s
Frame rate : 23.976 FPS
Writing application : Lavf61.3.104
Writing library : Lavf61.3.104
ErrorDetectionType : Per level 1

Video
ID : 1
Format : V_MS/VFW/FOURCC / evc1
Codec ID : V_MS/VFW/FOURCC / evc1
Duration : 4 s 171 ms
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Writing library : Lavc61.5.104 libxeve
Default : Yes
Forced : No
VENDOR_ID : [0][0][0][0]

Fixed bugs in libeve
static const AVOption libxeve_options[] = {
{ "preset", "Encoding preset for setting encoding speed", OFFSET(preset_id), AV_OPT_TYPE_INT, { .i64 = XEVE_PRESET_MEDIUM }, XEVE_PRESET_DEFAULT, XEVE_PRESET_PLACEBO, VE, .unit = "preset" },
{ "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PRESET_DEFAULT }, INT_MIN, INT_MAX, VE, .unit = "preset" },
{ "fast", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PRESET_FAST }, INT_MIN, INT_MAX, VE, .unit = "preset" },
{ "medium", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PRESET_MEDIUM }, INT_MIN, INT_MAX, VE, .unit = "preset" },
{ "slow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PRESET_SLOW }, INT_MIN, INT_MAX, VE, .unit = "preset" },
{ "placebo", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PRESET_PLACEBO }, INT_MIN, INT_MAX, VE, .unit = "preset" },
{ "tune", "Tuning parameter for special purpose operation", OFFSET(tune_id), AV_OPT_TYPE_INT, { .i64 = XEVE_TUNE_NONE }, XEVE_TUNE_NONE, XEVE_TUNE_PSNR, VE, .unit = "tune"},
{ "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_TUNE_NONE }, INT_MIN, INT_MAX, VE, .unit = "tune" },
{ "zerolatency", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_TUNE_ZEROLATENCY }, INT_MIN, INT_MAX, VE, .unit = "tune" },
{ "psnr", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_TUNE_PSNR }, INT_MIN, INT_MAX, VE, .unit = "tune" },
{ "profile", "Encoding profile", OFFSET(profile_id), AV_OPT_TYPE_INT, { .i64 = XEVE_PROFILE_BASELINE }, XEVE_PROFILE_BASELINE, XEVE_PROFILE_MAIN, VE, .unit = "profile" },
{ "baseline", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PROFILE_BASELINE }, INT_MIN, INT_MAX, VE, .unit = "profile" },
{ "main", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_PROFILE_MAIN }, INT_MIN, INT_MAX, VE, .unit = "profile" },
{ "rc-type", "Rate control mode", OFFSET(rc_mode), AV_OPT_TYPE_INT, { .i64 = XEVE_RC_ABR }, XEVE_RC_CQP, XEVE_RC_CRF, VE, .unit = "rc-type" },
{ "CQP", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_RC_CQP }, INT_MIN, INT_MAX, VE, .unit = "rc-type" },
{ "ABR", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_RC_ABR }, INT_MIN, INT_MAX, VE, .unit = "rc-type" },
{ "CRF", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XEVE_RC_CRF }, INT_MIN, INT_MAX, VE, .unit = "rc-type" },
{ "qp", "Quantization parameter value for CQP rate control mode", OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 32 }, 0, 51, VE },
{ "crf", "Constant rate factor value for CRF rate control mode", OFFSET(crf), AV_OPT_TYPE_INT, { .i64 = 32 }, 10, 49, VE },
{ "hash", "Embed picture signature (HASH) for conformance checking in decoding", OFFSET(hash), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
{ "info", "Embed SEI messages identifying encoder parameters and command line arguments", OFFSET(sei_info), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
//{ "level-idc", "Specify level (as defined by Annex A)", OFFSET(level), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
//{ "aq-mode", "AQ method", OFFSET(aq_mode), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE, .unit = "aq_mode"},
{ "xeve-params", "Override the xeve configuration using a :-separated list of key=value parameters", OFFSET(xeve_params), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
{ NULL }
...
CODEC_LONG_NAME("libxeve MPEG-5 EVC"),
...

Fixed bugs in matroskaenc.c
#include "libavformat/evc.h"
#include "libavformat/vvc.h"
...
case AV_CODEC_ID_VVC:
return ff_isom_write_vvcc(dyn_cp, extradata,
extradata_size, 0);
case AV_CODEC_ID_EVC:
return ff_isom_write_evcc(dyn_cp, extradata,
extradata_size, 0);

Fixed bugs in matroska.c
{"V_MPEGI/ISO/VVC" , AV_CODEC_ID_VVC},
{"V_MPEGI/ISO/EVC" , AV_CODEC_ID_EVC},

EVC video info
xeve - MPEG-5 EVC codec - ESSENTIAL VIDEO CODING https://github.com/mpeg5/xeve - options: profile=0 threads=1 input-res=1920x1080 fps=24 keyint=0 color-space=2571 rc-type=ABR bitrate=3000use-filler=0 info=1 hash=0 bframes=15 aq-mode=0 lookahead=17 closed-gop=0 disable-hgop=0 ref_pic_gap_length=0 codec-bit-depth=10 level-idc=-99 cu-tree=0 constrained-ip=0 use-deblock=1 inter-slice-type=0 rdo-deblk-switch=0 qp-increased-frame=0 forced-idr-frame-flag=0 qp-increased-frame=0 qp-max=51 qp-min=0 gop-size=16 use-fcst=1 chroma-format-idc=1 cs-w-shift=1 cs-h-shift=1 max-cu-intra=32 min-cu-intra=4 max-cu-inter=64 min-cu-inter=8 max-num-ref=0 me-ref-num=1 me-algo=1 me-range=64 me-sub=2 me-sub-pos=4 me-sub-range=1 rdoq=1 cabac-refine=1 intra-block-copy=0 btt=0 suco=0 amvr=0 vd=0 affine=0 dmvr=0 addb=0 alf=0 htdf=0 admvp=0 hmvp=0 eipd=0 iqt=0 cm-init=0 adcc=0 rpl=0 pocs=0 ats=0 pocs=0 deblock-alpha-offset=0 deblock-beta-offset=0 dra=0 aspect-ration-info-flag=0 overscan=0 videoformat=2 range=0 colorprim=2 transfer=2 colormatrix=2 master-display=2 chromaloc=0 field-seq-flag=0 vui-timing-info-flag=0 fixed-pic-rate-flag=0 nal-hrd-params-present-flag=0 vcl-hrd-params-present-flag=0 num-reorder-pics=21

Problem with int fps.
avpkt->time_base.num = 1;
avpkt->time_base.den = xectx->cdsc.param.fps;

Last edited by Jamaika; 27th May 2024 at 16:49.
Jamaika is offline   Reply With Quote
Old 27th May 2024, 20:11   #13  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
The problem is:
a. xeve_app only supports int frame rates
b. from the calls I used, even when I specified 24fps, the output was 25fps.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 28th May 2024, 06:20   #14  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 728
try this:
ffmpeg_avx.exe -v verbose -hwaccel opencl -init_hw_device opencl=gpu:0.0 -filter_hw_device gpu -i "input.mp4" -r 30000/1001 -y -c:v libxeve -vb 3000k -c:a aac -ac 2 -ar 48000 -ab 128k -s 1920x1080 -frames:v 100 -pix_fmt yuv420p -xeve-params aq_mode=1:cutree=1 output_xeve.mkv
https://www.sendspace.com/file/5ema73

https://github.com/mpeg5/ffevc/pull/158
https://github.com/mpeg5/ffevc/pull/159
https://github.com/mpeg5/ffevc/pull/160
https://github.com/mpeg5/ffevc/pull/161
https://github.com/mpeg5/xeve/pull/111
https://github.com/mpeg5/xeve/pull/112
https://github.com/mpeg5/xeve/pull/113

Last edited by Jamaika; 28th May 2024 at 17:05.
Jamaika is offline   Reply With Quote
Old 30th May 2024, 08:33   #15  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,330
I prefer xeve_app instead of ffmpeg, so that is not interesting to me, but it others might have use for it.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 1st June 2024, 06:29   #16  |  Link
ksec
Registered User
 
Join Date: Mar 2020
Posts: 123
Out of a matter of interest why are you using EVC?
__________________
Previously iwod
ksec is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.