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 > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th October 2021, 15:22   #1  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,846
x262 hangs and produces a 0 KB file if intrinsics are turned on

Quote:
ffmpeg.exe -i "D:\Temp\AVS Script.avs" -pix_fmt yuv422p -strict -1 -an -f yuv4mpegpipe - |x262_64.exe --stdin y4m - --mpeg2 --preset medium --level high --profile 422 --bitrate 50000 --vbv-maxrate 50000 --vbv-bufsize 17825792 --keyint 12 --bframes 2 --no-scenecut --open-gop --deblock -1:-1 --overscan show --colormatrix bt709 --range tv --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd cbr --output-csp i422 --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.m2v"
this makes it hang and eventually crash the pipe, while this:

Quote:
x262_64.exe "D:\Temp\AVS Script.avs" --mpeg2 --preset medium --level high --profile 422 --bitrate 50000 --vbv-maxrate 50000 --vbv-bufsize 17825792 --keyint 12 --bframes 2 --no-scenecut --open-gop --deblock -1:-1 --overscan show --colormatrix bt709 --range tv --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd cbr --output-csp i422 --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.m2v"
hangs forever.

This is the Avisynth Script:

Code:
FFVideoSource("D:\Masterfiles\Mortal Kombat DNxHR HQX UHD BT2020 HDR HLG YUV422 25p 12bit.mxf")

ConvertYUVtoXYZ(Color=0, HDRmode=2)
ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=2.1)

ConvertXYZtoYUV(pColor=0)

Spline64ResizeMT(1920, 1080)

ConvertBits(bits=8, dither=1)

Converttoyv16(matrix="Rec709", interlaced=false, chromaresample="Spline64")

The Avisynth Script doesn't matter, though.

This makes it hang just as fine:

Code:
ColorBars(1920, 1080, pixel_type="YV12")
Converttoyv16()
ChangeFPS(25)
it just hangs 'till eventually it stops and the output is 0 KB:



Surprisingly, this makes it produce 1 frame:

Code:
ColorBars(848, 480, pixel_type="YV12")
Converttoyv16()
ChangeFPS(25)




EDIT: Found the bug

It's the assembly part that is written incorrectly.
Disabling intrinsics make it work.

In other words, adding --asm 1 makes it work correctly:

Quote:
x262_64.exe "D:\Temp\AVS Script.avs" --mpeg2 --preset medium --level high --profile 422 --bitrate 50000 --vbv-maxrate 50000 --vbv-bufsize 17825792 --keyint 12 --bframes 2 --no-scenecut --open-gop --deblock -1:-1 --overscan show --colormatrix bt709 --range tv --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd cbr --output-csp i422 --asm 1 --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.m2v"


still going fine:


Last edited by FranceBB; 30th October 2021 at 15:37.
FranceBB is offline   Reply With Quote
Old 30th October 2021, 17:28   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,846
I opened a bug in the bug tracker: https://github.com/kierank/x262/issues/13
FranceBB is offline   Reply With Quote
Old 2nd November 2021, 23:24   #3  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,875
I think I ran into this issue as well

Regarding your AviSynth script, wouldn't it be better to go to 4:2:2 first, then dither down to 8 bit?
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 3rd November 2021, 09:00   #4  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,846
Quote:
Originally Posted by Blue_MiSfit View Post
I think I ran into this issue as well
Ah, I see.

Regarding your AviSynth script, wouldn't it be better to go to 4:2:2 first, then dither down to 8 bit?[/QUOTE]

Yep, I can change that, no biggie.
FranceBB 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 03:27.


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