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. |
![]() |
#1 | Link |
Registered User
Join Date: Apr 2024
Posts: 422
|
Script Format Problem
I want to encode videos, but I want to make sure it has the same aspects as the original. For example, I have a YUV444 video, and I want the output to also be a YUV444 video, even though the quality will not be the same due to encoding. My problem is that whenever I insert a script into other tools, it doesn't start at the colorspace as my video, it just starts at YUV420 instead). All of the video frames where also keyframes when I don't want them to. How do I fix that?
|
![]() |
![]() |
![]() |
#2 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,626
|
Quote:
Post your script, list your tools and steps used Quote:
|
||
![]() |
![]() |
![]() |
#3 | Link | |
Registered User
Join Date: Apr 2024
Posts: 422
|
Quote:
Code:
Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Format settings, Slice count : 4 slices per frame Codec ID : V_MPEG4/ISO/AVC Duration : 24 min 27 s Bit rate mode : Variable Bit rate : 21.6 Mb/s Maximum bit rate : 39.0 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.435 Time code of first frame : 00:59:59:00 Stream size : 3.70 GiB (85%) Language : English Default : No Forced : No Original source medium : Blu-ray Last edited by tebasuna51; 18th October 2024 at 10:09. |
|
![]() |
![]() |
![]() |
#4 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,626
|
Quote:
Whenever you post a script, post the text just like you did with the mediainfo report - not an attachment - because attachments can sometimes take a long time to get approved |
|
![]() |
![]() |
![]() |
#5 | Link | |
Registered User
Join Date: Apr 2024
Posts: 422
|
Quote:
Code:
ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Format Range@L4@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 23 min 43 s Bit rate : 10.1 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:4:4 Bit depth : 10 bits Bits/(Pixel*Frame) : 0.203 Stream size : 1.67 GiB (87%) Writing library : x265 3.0_Au+22-feec4bdf9866:[DJATOM's Mod][Linux][GCC 6.3.0][64 bit] 10bit Encoding settings : cpuid=1111039 / frame-threads=2 / numa-pools= / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / csv / csv-log-level=2 / input-csp=3 / input-res=1920x1080 / interlace=0 / total-frames=34120 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=240 / gop-lookahead=0 / bframes=9 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=6 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=2 / tu-intra-depth=2 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / limit-modes / me=2 / subme=5 / merange=48 / temporal-mvp / weightp / weightb / no-analyze-src-pics / deblock=1:-1 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / no-rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=4.00 / no-rd-refine / no-lossless / cbqpoffs=4 / crqpoffs=4 / rc=crf / crf=15.0 / qcomp=0.72 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=0.85 / no-cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / hevc-aq / no-svt / qp-adaptation-range=2.00 Language : Japanese Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Code:
DirectShowSource(video.mkv) SupTitle(subtitle.sup) |
|
![]() |
![]() |
![]() |
#6 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,626
|
The filter SupTitle only supports YV12 (4:2:0)
http://avisynth.nl/index.php/SupTitle Quote:
|
|
![]() |
![]() |
![]() |
#7 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,242
|
Also, even before that, I'm sure that whatever decoder DirectShowSource() is using is converting it down to yv12 8bit. If it actually preserved 4:4:4 10bit Avisynth would have errored out when you tried to apply the SupTitle() function because - as poisondeathray said - it's yv12 only.
I'd suggest to: 1) Use a better indexer like LWLibavVideoSource() and LWLibavAudioSource() 2) Convert your subtitles to .ass with SubtitleEdit 3) Hardsub with an high bit depth capable filter like AssRender() or TextSub() |
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,626
|
Quote:
It could be that your tool chain used did not automatically read the flags correctly, or your source did not have the flags. For example the mediainfo report for the source in post #3 is missing the 709 flags. Normally it would say something like this, or at least the matrix : Code:
Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 |
|
![]() |
![]() |
![]() |
#10 | Link | |
Registered User
Join Date: Apr 2024
Posts: 422
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,626
|
It's most reliable to add it to the encoder , at the encoding step. Works 100% of the time and what I would do
Not all software will read the prop in the script (least reliable) , and not all tools will pass or read it from the source if you adjust the metadata for the source (depends on how you use the tools) But if you wanted to add it to the script you can use PropSet http://avisynth.nl/index.php/Interna...s#Property_set For example, for matrix, use propSet("_Matrix",1) for 709 You can use PropShow to see if it's added If you wanted to patch the source to set metadata flags you can use a bitstream filter and remux the source https://www.ffmpeg.org/ffmpeg-bitstr...4_005fmetadata Last edited by poisondeathray; 18th October 2024 at 04:44. |
![]() |
![]() |
![]() |
#12 | Link | |
Registered User
Join Date: Apr 2024
Posts: 422
|
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
avisynth, colorspace, frame accurate, scripts |
Thread Tools | Search this Thread |
Display Modes | |
|
|