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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#261 | Link |
|
Registered User
Join Date: Jan 2025
Posts: 1
|
Full-SBS to 4k HEVC - hardware encode?
Hello,
1. How can I stretch a Full-SBS 3D MKV to a full 4K frame? I know it's wasteful, but I can't play Full-SBS 1080p, and I don't want to lose quality by going Half-SBS. 2. I'd like to use the NVENC encoder in my RTX 3080 to much more quickly encode to HEVC, though I'd like for the best possible quality settings so it's not much worse than software encode. Is there a way to do that? Reasons: Maybe I'm doing something wrong, but my new PC uses a Ryzen CPU, and I can't get MPC-HC and madVr to display my MVC MKVs in SBS on my software EDID (fake/virtual) 4K display in Bigscreen Beta (VR app in Steam). On my older PC, I had it convinced one of my 1080p monitors is a 1440p screen, and I could notice a significant bump in clarity watching movies. Now I want to go all the way on the new PC but, since I can't seem to play the videos in real-time on the new PC, I would like to convert the files. The added benefit is that the built-in media player in Bigscreen Beta should be able to play the videos instead of needing to capture a fake screen. Right now I'm trying to use BD3D2MK3D to create a Full-SBS video then I'll try to re-encode it in ffmpeg with the command Code:
ffmpeg -i input.mp4 -c:v hevc_nvenc -crf 23 -c:a copy -vf scale=iw:2160 output.mp4 But the first encode is going to take hours because I'm dumb and set it to crf 22 with the slow preset, despite the warning, because I knew I'm going to re-encode the whole thing again and I really don't want to lose perceivable quality. Thank you Last edited by MegamanXGold; 21st September 2025 at 20:54. |
|
|
|
|
|
#262 | Link | |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Welcome to the Doom9 forums, MegamanXGold !
It seems that your two questions are related. You should select Settings > AVC/HEVC Encoder > Use your own custom command for encoding. When that option is enabled, the last tab changes to include a Custom command field where you must specify the command you wish to use. For example, to encode in Half-SBS with nvenc, you should type something like this: Quote:
Of course, deselect the Half- option in the same tab, as otherwise some other parameters will be wrong and the Avisynth will resize the height (or width) of the original picture to half its resolution before your command will upscale it to 4K! If your encoder doesn't have an option to resize the video, edit manually the file __ENCODE_3D_MOVIE.avs. Notice the line containing the AviSynth StackHorizontal command. It's where the video is resized if necessary (for Half-SBS/TAB) and the two views are joined together. In Half-SBS, the command is this: Code:
StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right)) To do the opposite and upscale it to Full-SBS 4K, you should replace this command with the two commands below: Code:
StackHorizontal((Left), (Right)) LanczosResize(7680, 2160) (See the Avisynth manual about the resize filters here.) I have not verified everything, but method 1 (with the resize done with your own custom encoding command) or method 2 (resize done with Avisynth) should work fine. However, be sure to verify the SAR and Aspect Ratio that work fine for your hardware. That options can be changed in the BD3D2MK3D settings. Note also that the subtitles in Full-SBS/TAB are problematic, and, I guess, even more problematic in Full-4K. If you really need the subtitles, you may have to "hardcode" them in the last tab. That should work too. Anyway, your custom command should be able to use your GPU to encode faster. That command is up to you, as I'm not a master in encoding techniques. The nvenc command above uses the GPU but honestly, I don't think the speed gain worth it. The quality is notably less good than with x264 for the same disc size. Anyway, it's your choice.
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV Last edited by r0lZ; 22nd September 2025 at 09:38. |
|
|
|
|
|
|
#263 | Link | |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Quote:
Anyway, if you encode directly to the final resolution (as explained in my post above), you don't need to re-encode and the final quality is up to you (and your encoding program). Happy 3D viewing !
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV |
|
|
|
|
|
|
#264 | Link |
|
Registered User
Join Date: Mar 2024
Posts: 4
|
Hi if i understand BD3D2MK3D can not do 3D Full SBS subtitles ?
i did a python script with the help of Grok Ai because i do not know python ![]() the script modify the left_eye.xml file and all the png images so they work in Subtitle Edit and then export a working 3D Full SBS sub file and the 3d Full SBS movie works perfect with the 3d sub on my Xreal One Pro i have done only 4 3d Blu-ray movies Full SBS 3840x1080 and the subtitles works perfect Titanic 3D Avatar 3D John Carter 3D Jurassic Park 3D here is the code Code:
import xml.etree.ElementTree as ET
from PIL import Image
import os
# ----------------------------------------------------------------------
# Parse the XML file
tree = ET.parse('temp_3D_left.xml') # <-- the left_eye.xml file as input
root = tree.getroot()
# Directory where images are stored
image_dir = r"E:\3D\Avatar 3D\MKV3D\MKV3D.track_6_eng.3D_2D" # <-- change if needed
# ----------------------------------------------------------------------
for event in root.findall('.//Event'):
graphic = event.find('Graphic')
if graphic is not None:
# ---- XML values -------------------------------------------------
width = int(graphic.get('Width')) # current image width
orig_depth = int(graphic.get('OrigDepth')) # original depth
image_file = graphic.text # filename
left_x = int(graphic.get('X', '0')) # left padding
y_from_xml = int(graphic.get('Y', '0')) # Y value from XML
orig_height = int(graphic.get('Height', '0')) # original height (fallback 0)
# ---- Calculated spacing between the two copies -----------------
between_x = 1920 - width - orig_depth # gap between copies
# ---- Bottom padding: 1080 - Y - Height -------------------------
bottom_y = 1080 - y_from_xml - orig_height
if bottom_y < 0:
print(f"Warning: Negative bottom padding for {image_file}. Clamping to 0.")
bottom_y = 0
# ---- Load image to get actual dimensions -----------------------
input_path = os.path.join(image_dir, image_file)
output_path = os.path.join(image_dir, image_file) # overwrites original
try:
with Image.open(input_path) as img:
# Ensure RGBA for transparency
if img.mode != 'RGBA':
img = img.convert('RGBA')
orig_w, orig_h = img.size
# Use actual image height if XML Height was missing/inaccurate
if orig_height == 0:
orig_height = orig_h
# ---- Total canvas size -----------------------------------------
total_width = left_x + width + between_x + width
total_height = orig_h + bottom_y # image + bottom padding
# ---- Create new canvas -----------------------------------------
canvas = Image.new('RGBA', (total_width, total_height), (0, 0, 0, 0))
# ---- Paste both copies at the TOP (Y = 0) ----------------------
# First copy
canvas.paste(img, (left_x, 0))
# Second copy
second_x = left_x + width + between_x
canvas.paste(img, (second_x, 0))
# ---- Save ------------------------------------------------------
canvas.save(output_path, 'PNG')
# ---- Verify saved dimensions -----------------------------------
with Image.open(output_path) as saved:
saved_w, saved_h = saved.size
# ---- Update XML: Width and Height -----------------------------
graphic.set('Width', str(saved_w))
graphic.set('Height', str(saved_h))
print(f"Processed {image_file}: "
f"left={left_x}, Y={y_from_xml}, bottom={bottom_y}, "
f"between={between_x}, size={saved_w}x{saved_h}")
except IOError as e:
print(f"Error processing {image_file} with Pillow: {e}")
# ----------------------------------------------------------------------
output_xml = 'modified_3D_Left.xml'
tree.write(output_xml)
print(f"Modified XML saved as {output_xml}")
next i change the Video res to 3840 x 1080 and Align Left and the i klick Export all lines... this script does only work if you crop the movie to the film frame so no black borders otherwise the script needs more modification i think not sure here are some screenshot Last edited by jd; 6th November 2025 at 00:57. |
|
|
|
|
|
#265 | Link | |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Interesting and thanks for sharing your finding and your script. That can be useful to others.
Also, welcome to the Doom9 forums ! But note that although the subtitles are supported by your Xreal One Pro, subtitles with that width are not legal. Even in 2D UHD BD, the maximum width of a subtitle is 1920 (Full-HD width). They are supposed to be resized to UHD resolution at play time. However, I may admit that this limitation is artificial and that probably more and more hardware or software players will accept subtitles in UHD resolution in the future, if it's not already the case. But the fact is also that many players will reject them. Quote:
I have also a question about SubtitleEdit. I don't understand how you can export directly the imported XML/PNG to BD Sup format. As far as I know, SubtitleEdit can only convert text subtitles to several graphic formats like BD Sup, but it cannot export a graphic format to another graphic format. Am I wrong ?
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV Last edited by r0lZ; 6th November 2025 at 12:29. |
|
|
|
|
|
|
#266 | Link | ||
|
Registered User
Join Date: Mar 2024
Posts: 4
|
Quote:
![]() forgot to say that the 3D Full SBS movies with this method subtitles works on Jellyfin app and direct on jellyfin through web browser Xreal One Pro and it work to if i look Crossed eyes on the screen i see then 3 screens but the middle is the 3D hehe no need Xreal One Pro here is a Youtube clip what i mean https://www.youtube.com/watch?v=zBa-bCxsZDk when i did the trial and error to get 3d subs to work i did use the Crossed eyes method it was faster to see if it works ![]() Quote:
here is a screenshot Last edited by jd; 6th November 2025 at 17:50. |
||
|
|
|
|
|
#267 | Link |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Cross-eyes technique ! Damned ! I forgot that. IMO, it's a pain, but indeed it's fast, and you don't need special equipment !
Thanks for the info about SubtitleEdit. But unfortunately, it is not possible to implement your method in BD3D2MK3D. The first steps can certainly be implemented, but the conversion from the final XML/PNG to BD Sup cannot be automated with SubtitleEdit, because it has no command-line option to do such a complex conversion, and BDSup2Sub cannot handle UHD subs. Pity. And anyway, honestly, I'm becoming old and I don't want to continue to implement new things in my programs, especially when they are not useful to many users. (BTW, do you know that you can easily "hardcode" your subtitles on the image with the option in the last tab ?) But if you want, I can certainly add a link to your post above in the BD3D2MK3D home page so that peoples interested in UHD subs will be able to do it. Thanks again !
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV |
|
|
|
|
|
#268 | Link | |||
|
Registered User
Join Date: Mar 2024
Posts: 4
|
Quote:
![]() Quote:
![]() Quote:
i have now maybe 20 3D movies so going to test more
|
|||
|
|
|
|
|
#269 | Link | |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Quote:
I'll add a link on the home page soon. Thanks again.
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV |
|
|
|
|
|
|
#271 | Link | |||
|
Registered User
Join Date: Nov 2025
Posts: 3
|
My first time using BD3D2MK3D, and I'm encountering an issue. Perhaps I'm missing something obvious.
File creation seems to go fine, but running __ENCODE_3D_LAUNCHER.cmd immediately fails. Under Windows 11 this happens: Quote:
Quote:
Quote:
Maybe I'm missing a dependency? Do I need anything other than BD3D2MK3D 1.36 and AviSynth+ 3.7.5? |
|||
|
|
|
|
|
#272 | Link |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Welcome to the Doom9 forum, subx!
Hum, strange. The error with the second try can be caused by a damaged input file (the BD ISO or the source AVC+MVC MKV). This happens usually when there is a glitch in the video stream. In that case, the decoder must skip some frames and the total number of frames to encode is wrong. You can try to mux the final MKV but usually there will be a difference between the left and right views (and possibly also with the audio) , making the movie a pain to watch. Try to re-rip the original BD. I suppose you have verified that you have enough disc space. Right? That can also explain the second error. Also, I see that avs2yuv is used. It is necessary when only the 32-bit version of avisynth is installed. Try to install the 64-bit version of avisynth+. You can verify the versions recognised by BD3D2MK3D with Help -> Avisynth version. (BTW, it seems that v3.7.4 is the latest official stable release. Perhaps v3.7.5 has a bug?) Sorry, I can't help much more.
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV Last edited by r0lZ; 11th November 2025 at 11:22. |
|
|
|
|
|
#273 | Link | |||
|
Registered User
Join Date: Nov 2025
Posts: 3
|
Thanks for the quick response.
Quote:
Quote:
Quote:
https://github.com/AviSynth/AviSynthPlus/releases/ rather than the fork you've linked to: https://github.com/pinterf/AviSynthPlus/releases/ Is there an important difference between the two? (if so, how do you install the pinterf version since there doesn't appear to be an installer?) |
|||
|
|
|
|
|
#274 | Link |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Honestly, I don't know. Your version should work fine, but I don't understand why BD3D2MK3D doesn't recognise it. Have you tested Info -> avisynth version ? Please post the result here. (Ctrl-C to copy the content of the dialog.)
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV |
|
|
|
|
|
#275 | Link | ||
|
Registered User
Join Date: Nov 2025
Posts: 3
|
Quote:
Quote:
I've attached the BD3D2MK3D settings I used, in case I've missed something obvious there. |
||
|
|
|
|
|
#276 | Link |
|
Registered User
Join Date: Jun 2022
Posts: 74
|
I'm using this command in the AVS encode file:
interleaved = FRIMSource("mvc", "MKV3D.track_1.264", "MKV3D.track_1.mvc", layout = "alt", num_frames = 193562, cache = 2, platform = "sw") But I'm still getting this error: x264_x64.exe" --output-depth 8 --crf 16.5 --preset slow --tune film --aq-mode 3 --sar 1:1 --range tv --colormatrix bt709 --frame-packing 3 --qpfile chapters_3D.qpfile --frames 193562 --fps 24000/1001 --output "MKV3D_3D.264" "__ENCODE_3D_MOVIE.avs" avs [error]: ERROR: Cannot initialize Intel Media SDK session. |
|
|
|
|
|
#277 | Link |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Hum, strange. Is it the first time you use BD3D2MK3D? If yes, then be sure to install BD3D2MK3D correctly. When you extract the files from the archive, be sure to keep the original structure, with the sub-directories.
Also, try to modify the avisynth command from platform = "sw" to platform = "hw". Usually, using the hardware decoder is less secure (and it might even fail totally if you don't have a supported Intel processor) but who know?
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV |
|
|
|
|
|
#278 | Link | |
|
Registered User
Join Date: Jun 2022
Posts: 74
|
Quote:
BTW AMD CPUs with AVX512, encode around twice as fast as Intel. Strange but preset "slow" is sometimes encoding faster than preset "medium". Last edited by Enet47; 7th December 2025 at 00:26. |
|
|
|
|
|
|
#279 | Link |
|
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,524
|
Thanks for the confirmation. Just to be sure, do you know why a wrong directory was used? Is it a bug of BD3D2MK3D?
No, by default, BD3D2MK3D uses the automatic detection of the hardware acceleration. If a CPU supporting it is detected and the Intel drivers are correctly installed, it will use HW. Otherwise, SW is used. But IMO SW is safer. The Intel drivers are sometimes buggy and I trust at 100% only the SW version provided with BD3D2MK3D. I'm not sure the names of the presets are good choices, as indeed the speed is not always what the user may expect. However, with a slower preset, the encoding is more complex and therefore usually slower. Note also that the decoding is also more complicated and using a very slow preset may cause playback problems on old hardware players.
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV Last edited by r0lZ; 7th December 2025 at 12:37. |
|
|
|
|
|
#280 | Link | |||
|
Registered User
Join Date: Jun 2022
Posts: 74
|
Quote:
Quote:
Quote:
Last edited by Enet47; 7th December 2025 at 14:00. |
|||
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|