-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the h264-tools wiki!
This is a 'port' of carrardt/h64-tools to MacOS. Not a lot of porting needed just a header needed removing. ldecod is part of the H264 reference software suite at http://iphome.hhi.de/suehring/tml/
Using these tools to Convert 3D blu-ray 'rips' to SDS 3D mkv files for watching in VR head sets.
These are example steps, doing this way requires over 1TB of disk space. There's a script on the wiki to do the conversion from the rip using named pipes so that you only need the disk space of the rip nd the finale video, it also uses ffprobe to set some values hard coded in this example.
Rip your legally owned 3D blu-rays using MakeMKV, make sure you copy the 3D stream. Please note I do not condone piracy in any way.
Use ffmpeg to extract to a raw h264 stream.
ffmpeg -y -i my3dblu.mkv -f h264 -c:v copy -bsf:v h264_mp4toannexb demuxed.h264
use ldecod to extract the left eye and right eye views
ldecod -p DecodeAllLayers=1 -p InputFile=demuxed.h264 -p OutputFile=dec.yuv -p Silent=1
This will create two very large files called dec_ViewId0000.yuv and dec_ViewId0001.yuv (approx 45G per 10 minutes of movie run time each). Use to merge them into one very large file.
yuvsbspipe -w 1920 -h 1080 -n 48 -l dec_ViewId0000.yuv -r dec_ViewId0001.yuv -sbs -o sbs.yuv &
Finally use ffmpeg to convert to h265, muxing in the audio from the original file converted to ac3.
ffmpeg -y -f rawvideo -pixel_format yuv420p -video_size 3840x1080 -framerate 23.976 -i sbs.yuv -i my3dblu.mkv -c:v libx265 -crf 25 -map 0:v:0 -c:a aac -map 1:a -map 1:s -c:s copy my_3d_movie.mkv
you can convert into an mp4 container as well but you'll need to lose the subtitles. There's probably a way to convert these using another tool but you'll probably know how if you deal with subtitles on a regular;ar basis.