View Issue Details

IDProjectCategoryView StatusLast Update
0000398Cinelerra-GGFeaturepublic2020-03-30 05:12
ReporterSandhill Crane Assigned ToPhyllisSmith  
PrioritynormalSeveritytrivialReproducibilityalways
Status acknowledgedResolutionopen 
Platformx86_64 desktopOSLinux OS VersionFedora 30
Product Version2019-10 
Summary0000398: Slight correction to the bd.sh that is produced with BD render option
DescriptionThe follow line in the bd.sh script might be improved but substituting \t for the raw TAB character in the sed command.
sz=`du -cb $dir/bd.m2ts* | tail -1 | sed -e 's/[ ].*//'`
Also, as written, the script produces disk images with the string LinuxUDF for the volume label and related identifiers. While this doesn't prevent the script from working, it would be nicer to allow the user to specify the Volume ID, Fileset ID, lvid and , Logical Volume ID. Since there is no man page for bdwrite, I'm not sure which of the generated files are used in producing the UDFS disk image. By trial and error, I've deduced which flags to mkudffs are compatible with writing a UDF file system to disk before copying it to the blu ray disk. I am attaching a script that offers more control of the mastering process and can be run by root independently of the Cinelerra session. It duplicates the functionality of the bd.sh script but allows for these extra options. I would be glad for anyone to use it and see if it could be useful. I am a retired systems programmer and Linux geek if I can be of use in some way. C is my native language and I am knowlegable about TIFF in particular.
Richard Nolde
Steps To ReproduceGenerate a UDF file system on disk with BD Render.
Additional InformationLinux <hostname> 5.5.10-100.fc30.x86_64 0000001 SMP Wed Mar 18 14:34:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
pm -qi cinelerra-gg
Name : cinelerra-gg
Version : 5.1
Release : 56.20190801gitb8cd5c4.fc30
Architecture: x86_64
Install Date: Fri 15 Nov 2019 07:19:55 PM MST
Group : Unspecified
Size : 132854055
License : GPLv2+ and CeCILL and BSD and CC-BY and Public Domain
Signature : RSA/SHA1, Fri 30 Aug 2019 01:49:58 PM MDT, Key ID 3df2ce43c0aeda6e
Source RPM : cinelerra-gg-5.1-56.20190801gitb8cd5c4.fc30.src.rpm
Build Date : Thu 29 Aug 2019 10:53:47 PM MDT
Build Host : buildvm-01.online.rpmfusion.net
Relocations : (not relocatable)
Packager : RPM Fusion
Vendor : RPM Fusion
URL : https://cinelerra-gg.org/
Summary : A non linear video editor and effects processor
Description :
Non-linear audio/video authoring tool Cinelerra-GG is a complete audio and
video authoring tool. It understands a lot of multimedia formats as quicktime,
avi, ogg also audio/video compression codecs divx, xvid, mpeg2.

This is the "goodguy" version of Cinelerra.
TagsRendering
Attached Files
mkudffs.sh (4,581 bytes)   
#!/bin/bash
# Possibly add options for Vat Close Bootarea
# Test with --no-write option
# 3/22/2020 Additions and modifications by Richard Nolde
#
# All the files needed to build the Bluray disk structure must be
# present in SOURCEDIR before this script is run.

# Command line arguments:
# SourceDir Device FILE|WORM|RW VolumeID FilesetID

if [ ! -x "/usr/sbin/mkudffs" ] ; then
    echo "Cannot find mkudffs utility."
    exit 1
fi

if [ ! -x "/usr/bin/bdwrite" ] ; then
    echo "Cannot find bdwrite utility."
    exit 1
fi

if [[ $UID -ne 0 ]] ; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

if [ $# -lt 4 ]
then
    echo "Syntax: $0 SourceDir Device File|Worm|RW VolumeID FilesetID"
    echo "If you do not have a Bluray burner, use None for device."
    echo "Enclose VolumeID and FilesetID in single quotes if they "
    echo "contain special characters. Use File to create disk image."
    echo "Use WORM for single write media, RW for rewritable media "
    echo "to burn Bluray disk after creating the file UDF system."
    exit 1
fi

SOURCEDIR=`dirname $1/NoSuchFile`
cd ${SOURCEDIR}

echo "Creating UDFS filesystem in ${SOURCEDIR}"
if [ -d ${SOURCEDIR}/udfs ]
then
    echo "${SOURCEDIR}/udfs exists. Replace? Y/N"
    read RESPONSE
    RESPONSE=`echo ${RESPONSE} | cut -c1`
    if [ "${RESPONSE}" = "Y" ] || [ "${RESPONSE}" = "y" ]
    then
       rm -rf ${SOURCEDIR}/udfs
       mkdir -p ${SOURCEDIR}/udfs || \
	  echo "Unable to create ${SOURCEDIR}/udfs"
    fi
else
    mkdir -p ${SOURCEDIR}/udfs || \
	echo "Unable to create ${SOURCEDIR}/udfs"
fi

if [ ! -w  ${SOURCEDIR}/udfs ]
then
    echo "Scratch directory ${SOURCEDIR}/udfs does not exist or is not writeable."
    exit 1
fi

DEVICE=$2
if [ "${DEVICE}" = "None" ] || [ "${DEVICE}" = "none" ]
then
    DEVICE="/dev/null"
fi

if [ ! -e ${DEVICE} ]
then
    echo "${DEVICE} does not exist."
    exit 1
fi

if [ -f ${IMAGEFILE} ]
then
   rm -f  ${IMAGEFILE}
fi

MEDIA=`echo $3 | cut -c1`
case  ${MEDIA} in
    F|f)
	MEDIA="File";;
    W|w)
	MEDIA="WORM";;
    R|r)
	MEDIA="RW";;
    *)
	echo "Invalid Media type. Must be one of File, WORM, RW."
	exit 1;;
esac

VOLUMEID=$4
IMAGEID=`echo ${VOLUMEID} | sed 's/ /_/g'`
IMAGEFILE="${SOURCEDIR}/${IMAGEID}.udfs"

FILESETID=$5
if [ -z "${FILESETID}" ]
then
    LENGTH=`echo "${FILESETID}" | wc -c`
    if [ ${LENGTH} - gt 30 ]
    then
       echo "${FILESETID} is too long. Max 31 characters."
       exit 1
    fi
    FILESETID="${VOLUMEID}"
fi
    
SIZE=`du -cb ${SOURCEDIR}/bd.m2ts* | tail -1 | sed -e 's/[\t].*//'`
BLOCKS=$((SIZE/2048 + 4096))

echo "Volume ID will be set to ${VOLUMEID}."
echo "File set ID will be set to ${FILESETID}"
echo "IMAGEFILE will be set to ${IMAGEFILE}."
echo "UDF File system will be ${BLOCKS} blocks."
echo "Device for Bluray burner will be ${DEVICE}"
echo "using ${MEDIA} media."

gsettings set org.gnome.desktop.media-handling automount false

echo "Formatting UDF File System..."
#mkudffs -m bdr --udfrev=2.50 -b 2048 --label="${VOLUMEID}" ${IMAGEFILE} ${BLOCKS} || \
mkudffs -b 2048 --label="${VOLUMEID}" --vsid="${VOLUMEID}" --fsid="${FILESETID}" --packetlen=32 ${IMAGEFILE} ${BLOCKS} || \
    exit 1
MEDIASIZE=`du -hs ${IMAGEFILE} | tail -n1 | cut -f1`
echo "UDF Bluray disk image created at ${IMAGEFILE} is ${MEDIASIZE}"

grep "${SOURCEDIR}/udfs" /etc/mtab
MOUNTED=$?
if [ ${MOUNTED} -eq 0 ]
then
    echo "${SOURCEDIR}/udfs is already mounted as loop device. Unmounting now."
    umount "${SOURCEDIR}/udfs"
fi


echo "Mounting UDF File System ${IMAGEFILE} at ${SOURCEDIR}/udfs"
mount -v -t udf -o loop ${IMAGEFILE} ${SOURCEDIR}/udfs

echo "Writing to File System. This may take some time..."
bdwrite ${SOURCEDIR}/udfs ${SOURCEDIR}/bd.m2ts*

echo "Unmounting File System..."
umount ${SOURCEDIR}/udfs

if [ "${MEDIA}" != "File" ]
then
   echo "To burn bluray, load writable media now."
   echo "UDF file system will require at least ${MEDIASIZE} space."
   echo "If loaded media is not large enough, type Exit to abort now or anything else to continue."
   read RESPONSE
   if [ "${RESPONSE}" = "Exit" ] || [ "${RESPONSE}" = "exit" ]
   then
      exit 1
   fi
fi

echo "Burning File System to ${MEDIA} media. This may take some time..."
if [ "${MEDIA}" = "RW" ]
then
   echo " Executing command: dd if=${IMAGEFILE} of=${DEVICE} bs=2048000"
   dd if=${IMAGEFILE} of=${DEVICE} bs=2048000
else
   if [ "${MEDIA}" = "WORM" ]
   then
      echo "Executing command: growisofs -dvd-compat -Z ${DEVICE}=${IMAGEFILE}"
      growisofs -dvd-compat -Z ${DEVICE}=${IMAGEFILE}
   fi
fi
    
echo "Finished  at `date`."
mkudffs.sh (4,581 bytes)   

Activities

PhyllisSmith

2020-03-30 00:30

manager   ~0003009

Thank you very much for reporting, recommending improvements, and the script!
GG will be checking into GIT the "tab" suggestion today yet and will be looking at the script. But I will not have time to test programming changes he makes in conjunction with your script for the month's build (coming up on Tuesday). I am looking forward to testing that though as it is fun to make bluray-s.

We welcome your skills to lend to improving Cinelerra-GG. I am not sure if there are currently problems with TIFF, but since there are more than 200 open BT's there very well could be -- if I find them you can count on me to send them your way !

PhyllisSmith

2020-03-30 05:12

manager   ~0003013

@Sandhill Crane
Recently Andrew added some new choices for TIFF ( LZW, LZWMA, Deflate) and this mod will be included in the new builds to be done on Tuesday the 31st. In this mod Tiff now allows for future webp use BUT not tested/implemented. If you want to look into this, that would be great. You can send email to the mailing list or to me at phylsmith2017@gmail.com for information.

Issue History

Date Modified Username Field Change
2020-03-29 23:07 Sandhill Crane New Issue
2020-03-29 23:07 Sandhill Crane Tag Attached: Rendering
2020-03-29 23:07 Sandhill Crane File Added: mkudffs.sh
2020-03-30 00:30 PhyllisSmith Assigned To => PhyllisSmith
2020-03-30 00:30 PhyllisSmith Status new => acknowledged
2020-03-30 00:30 PhyllisSmith Note Added: 0003009
2020-03-30 05:12 PhyllisSmith Note Added: 0003013