Anime4000 / IFME

Powerful x265 GUI Encoder
https://x265.github.io/
GNU General Public License v2.0
243 stars 54 forks source link

webm stream mux failure causes the program to exit, and profile_Video_Encoder_Value: 23.5 is not accepted #240

Open longwu9t opened 2 weeks ago

longwu9t commented 2 weeks ago

webm profile_Video_Encoder_Value: 23.5 is not accepted

https://github.com/Anime4000/IFME/assets/9213316/4115f921-9b2d-4a8b-aeff-a003c830e688

2024-07-07_095934

webm stream mux failure causes the program to exit

https://github.com/Anime4000/IFME/assets/9213316/45a295fa-14a1-43f2-bdb4-3b3f4268f49f

2024-07-07_101337

The last part of the video becomes blank because IFME suddenly exits. Checking the temp folder, the encoding process should have been completed. It should be that a fatal error of the program was triggered in the mux stage.

Anime4000 commented 2 weeks ago

try this commit

longwu9t commented 2 weeks ago

try this commit

The error persists and the problem has not been solved.

Anime4000 commented 2 weeks ago

look back plugins JSON file https://github.com/Anime4000/IFME/blob/master/IFME/frmMain.Function.cs#L862 :

                "Value": {
                    "DecimalPlace": 0,

if 0, mean any decimal will round up

longwu9t commented 2 weeks ago

look back plugins JSON file https://github.com/Anime4000/IFME/blob/master/IFME/frmMain.Function.cs#L862 :

              "Value": {
                  "DecimalPlace": 0,

if 0, mean any decimal will round up

After adding this option, the error still occurs: webm stream mux failure causes the program to exit, and profile_Video_Encoder_Value: 23.5 is not accepted

longwu9t commented 2 weeks ago

good news: After re-pulling and cleaning the encoding, and compiling again, profile_Video_Encoder_Value: 23.5 is accepted

webm stream mux failure causes the program to exit, This error still exists.

Anime4000 commented 2 weeks ago

likely crash because of new ETA implementation

longwu9t commented 2 weeks ago

I don't know how to deal with it, waiting for your news. :)

Anime4000 commented 2 weeks ago

my test after fix the ETA

[INFO] No error during plugins initialising...
[INFO] Extracting metadata...
[DEBG] Command Line: "ffmpeg" -hide_banner -v error -stats -i "Z:\Videos\GalGame\amegure_op_original.mpeg" -f ffmetadata metadata.ini -y
[INFO] Encoding audio file...
[DEBG] Command Line: "D:\Users\Anime4000\Documents\GitHub\IFME\IFME\bin\Debug\Plugins\ffmpeg64\ffmpeg" -hide_banner -v error -stats -i "Z:\Videos\GalGame\amegure_op_original.mpeg" -map 0:1 -map_metadata -1 -map_chapters -1 -vn -sn -dn -c:a libopus -vbr on -frame_duration 60 -compression_level 10 -b:a 128k -ar 48000 -ac 2 -y "audio0000_und.opus"
[INFO] Encoding video file...
[DEBG] Command Line: "ffmpeg" -hide_banner -v error -i "Z:\Videos\GalGame\amegure_op_original.mpeg" -map 0:0 -pix_fmt yuv420p -vf scale=1280:720:flags=lanczos,fps=30 -strict -1 -f yuv4mpegpipe - | "D:\Users\Anime4000\Documents\GitHub\IFME\IFME\bin\Debug\Plugins\google2_av1\SvtAv1EncApp.exe" -i stdin -n 3106 --input-depth 8 --preset 2 --profile 0 --crf 24 --progress 2 -b video0000_und.ivf
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]:   SVT-AV1 Encoder Lib v2.1.2-15-gb8d2f2b4
Svt[info]: SVT [build]  :   GCC 14.1.0   64 bit
Svt[info]: LIB Build date: Jul  2 2024 19:07:59
Svt[info]: -------------------------------------------
Svt[info]: Number of logical cores available: 32
Svt[info]: Number of PPCS 173
Svt[info]: [asm level on system : up to avx2]
Svt[info]: [asm level selected : up to avx2]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: main profile   tier (auto) level (auto)
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator       : 1280 / 720 / 30 / 1
Svt[info]: SVT [config]: bit-depth / color format                   : 8 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct                    : 2 / PSNR / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type          : 161 / 32 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor                     : CRF / 24 
Svt[info]: SVT [config]: AQ mode / variance boost                   : 2 / 0
Svt[info]: -------------------------------------------
Encoding          
[WARN] ETA Logic is crashed: TimeSpan overflowed because the duration is too long.
SUMMARY --------------------------------- Channel 1  --------------------------------
Total Frames        Frame Rate      Byte Count      Bitrate
Channel 1
Total Encoding Time:    273844 ms
Total Execution Time:   274102 ms
Average Latency:    17165 ms
Max Latency:        26638 ms
[INFO] Restructure RAW video file...
[INFO] Multiplexing encoded files into single file...
[DEBG] Command Line: "ffmpeg" -strict -2 -hide_banner -v error -stats -i "video0000_und.ivf" -i "audio0000_und.opus" -f ffmetadata -i metadata.ini -map_metadata 2 -map 0:0 -map 1:0 -c copy -metadata:g "encoding_tool=IFME 8.3.2 windows amd64" -metadata:s:0 title="Undetermined" -metadata:s:0 language=und -metadata:s:1 title="Undetermined" -metadata:s:1 language=und -y "D:\Users\Anime4000\Videos\Encoded\[IFME] amegure_op_original.webm"
[ OK ] Multiplexing files was successfully!
[DEBG] FFmpeg return code 0

yes, the ETA I add last night indeed flawed

[WARN] ETA Logic is crashed: TimeSpan overflowed because the duration is too long.

it was sampled based on frames, perhaps I try sample from fps instead

AV1 --crf can se decimal like x265?

longwu9t commented 2 weeks ago

I can't offer any advice, follow your way ^_#

Anime4000 commented 2 weeks ago

try this commit

longwu9t commented 2 weeks ago

image

it works well! thanks!!!

Anime4000 commented 2 weeks ago

nice! that SVT-AV1 can use 23.5 ? decimal input

longwu9t commented 2 weeks ago

Decimal values ​​can be used From this version, megui may basically be abandoned It would be better if ifme could add bitrate calculation to control the output file size in the future. Of course, multi-threading of audio encoding should also be considered.

longwu9t commented 2 weeks ago

Of course, those who rely heavily on avisynth may also need AvsPmod. Since only a few people need to compress videos using Blu-ray discs, IFME is really user-friendly software for me! the force with you ^_^

Anime4000 commented 2 weeks ago

From this version, megui may basically be abandoned

I have tried that, also Handbrake, both are not design to encode many file at once and set once, so I build this to save disk space for my Jellyfin

It would be better if ifme could add bitrate calculation to control the output file size in the future.

it possible for bit-rate based encoding mode

Of course, multi-threading of audio encoding should also be considered.

this will be add, just not this time, need to polish current Encoding Pipeline then can add support parallel encoding, long time before I also made encode video in chunks (parted) and let encoding server encode x264 very quickly and reassemble one stream, project abandoned due unforeseen glitch when assemble multiple chunks

Of course, those who rely heavily on avisynth may also need AvsPmod.

Also I have integrated AvsPmod as AviSynth Editor in previous version, easily edit script before encode

Since only a few people need to compress videos using Blu-ray discs, IFME is really user-friendly software for me! the force with you ^_^

Aww thank you, it has been 10 years of development, I glad making IFME more modular and expandable