HDV on a Blu-ray Disc Without Re-encoding

An MTS file is a video file saved in the high-definition (HD) MPEG Transport Stream video format, commonly called AVCHD. It contains HD video compatible with Blu-ray disc format and is based on the MPEG-2 transport stream. MTS files are often used by Sony, Panasonic, Canon and other HD camcorders. Legal input for Video – MPEG1VIDEO, MPEG2VIDEO, H264; Audio – MP1, MP2, AC3, AC3PLUS, DTS, TRUHD.

For creating a blu-ray disc, if you have HDV MPEG-2 media that is in blu-ray format, you can save the original quality of your work, rather than rendering it to another format. Follow the steps below directly instead of going through CINELERRA-GG. It has been tested on 10 different MTS files.

du -sb /yourHDVfile.MTS		# Determine the size of your file in bytes.
blocks=((size-in-bytes/2048 + 4096))	# Convert bytes into blocks + a little more.	
mkudffs /tmp/newfilename.udfs blocks	# Create a file with that \# of blocks + some extra.
mount -o loop /tmp/newfilename.udfs /mntX          # Use a mount point like mntX that is not in use.
/<cinelerra_installed_path>/bin/bdwrite /mntX /tmp/yourHDVfile.MTS   # Substitute \CGG{} path.
umount /mntX				# You must unmount the udfs filesystem
growisofs -Z /dev/bd=/tmp/newfilename.udfs   # Replace /dev/bd with your bluray hardware device.
OR  dd if=/tmp/newfilename.udfs of=/dev/bd bs=2048000   # if using rewritable blu-ray; replace bd.

The CINELERRA-GG Community, 2021
https://www.cinelerra-gg.org