[CinCV TNG] BD creation in Cinelerra-GG

Andrew Randrianasulu randrianasulu at gmail.com
Sat May 12 20:54:45 CEST 2018


Hello!

I was curious how this process will work (or not), so I tried to render small 
clip into pseudo-bd.

Apparently my version of mkudffs is very old, so it created udf with wrong 
permissions by default, so I modified sh script in bd temp folder:

#!/bin/bash -ex
PATH=$PATH:/usr/lib/cin
mkdir -p $1/udfs
sz=`du -cb $1/bd.m2ts* | tail -1 | sed -e 's/[  ].*//'`
blks=$((sz/2048 + 4096))
rm -f $1/bd.udfs
mkudffs $1/bd.udfs $blks
mount -t udf -o loop,gid=0,uid=0 $1/bd.udfs $1/udfs
bdwrite $1/udfs $1/bd.m2ts*
umount $1/udfs
echo To burn bluray, load writable media and run:
echo for WORM: growisofs -dvd-compat -Z /dev/bd=$1/bd.udfs
echo for RW:   dd if=$1/bd.udfs of=/dev/bd bs=2048000
kill $$


note gid=0,uid=0 parameters!

Now it finishes, but killing Cin in the end! Is it supposed to be this way?
------------

cin
Cinelerra 5.1 - built: May  6 2018 22:25:19
git://git.cinelerra-cv.org/goodguy/cinelerra.git
(c) 2006-2018 Heroine Virtual Ltd. by Adam Williams
(c) 2007-2018 cin5 derivative by W.P. Morrow aka goodguy
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.

Render::render_single: Session finished.
+ 
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R7/bin:/usr/games:/usr/lib/java/bin:/bin:/opt/kde3/bin:/usr/lib/cin
+ mkdir -p /dev/shm/tmp/bd_20180512-213234/udfs
++ du -cb /dev/shm/tmp/bd_20180512-213234/bd.m2ts
++ tail -1
++ sed -e 's/[  ].*//'
+ sz=94093440
+ blks=50040
+ rm -f /dev/shm/tmp/bd_20180512-213234/bd.udfs
+ mkudffs /dev/shm/tmp/bd_20180512-213234/bd.udfs 50040
start=0, blocks=16, type=RESERVED
start=16, blocks=3, type=VRS
start=19, blocks=237, type=USPACE
start=256, blocks=1, type=ANCHOR
start=257, blocks=16, type=PVDS
start=273, blocks=1, type=LVID
start=274, blocks=49509, type=PSPACE
start=49783, blocks=1, type=ANCHOR
start=49784, blocks=239, type=USPACE
start=50023, blocks=16, type=RVDS
start=50039, blocks=1, type=ANCHOR
+ mount -t udf -o 
loop,uid=0 /dev/shm/tmp/bd_20180512-213234/bd.udfs /dev/shm/tmp/bd_20180512-213234/udfs
+ 
bdwrite /dev/shm/tmp/bd_20180512-213234/udfs /dev/shm/tmp/bd_20180512-213234/bd.m2ts
/dev/shm/tmp/bd_20180512-213234/udfs/BDMV: Permission denied


---------------------
above was run with just uid=0 option set.

root at slax:/dev/shm/tmp# cin
Cinelerra 5.1 - built: May  6 2018 22:25:19
git://git.cinelerra-cv.org/goodguy/cinelerra.git
(c) 2006-2018 Heroine Virtual Ltd. by Adam Williams
(c) 2007-2018 cin5 derivative by W.P. Morrow aka goodguy
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.

Render::render_single: Session finished.
+ 
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R7/bin:/usr/games:/usr/lib/java/bin:/bin:/opt/kde3/bin:/usr/lib/cin
+ mkdir -p /dev/shm/tmp/bd_20180512-213805/udfs
++ du -cb /dev/shm/tmp/bd_20180512-213805/bd.m2ts
++ sed -e 's/[  ].*//'
++ tail -1
+ sz=94093440
+ blks=50040
+ rm -f /dev/shm/tmp/bd_20180512-213805/bd.udfs
+ mkudffs /dev/shm/tmp/bd_20180512-213805/bd.udfs 50040
start=0, blocks=16, type=RESERVED
start=16, blocks=3, type=VRS
start=19, blocks=237, type=USPACE
start=256, blocks=1, type=ANCHOR
start=257, blocks=16, type=PVDS
start=273, blocks=1, type=LVID
start=274, blocks=49509, type=PSPACE
start=49783, blocks=1, type=ANCHOR
start=49784, blocks=239, type=USPACE
start=50023, blocks=16, type=RVDS
start=50039, blocks=1, type=ANCHOR
+ mount -t udf -o 
loop,gid=0,uid=0 /dev/shm/tmp/bd_20180512-213805/bd.udfs /dev/shm/tmp/bd_20180512-213805/udfs
+ 
bdwrite /dev/shm/tmp/bd_20180512-213805/udfs /dev/shm/tmp/bd_20180512-213805/bd.m2ts
+ umount /dev/shm/tmp/bd_20180512-213805/udfs
+ echo To burn bluray, load writable media and run:
To burn bluray, load writable media and run:
+ echo for WORM: 
growisofs -dvd-compat -Z /dev/bd=/dev/shm/tmp/bd_20180512-213805/bd.udfs
for WORM: 
growisofs -dvd-compat -Z /dev/bd=/dev/shm/tmp/bd_20180512-213805/bd.udfs
+ echo for RW: dd if=/dev/shm/tmp/bd_20180512-213805/bd.udfs of=/dev/bd 
bs=2048000
for RW: dd if=/dev/shm/tmp/bd_20180512-213805/bd.udfs of=/dev/bd bs=2048000
+ kill 20106
Завершено

Now I can mount resulting udf file:
mount /dev/shm/tmp/bd_20180512-213805/bd.udfs /dev/shm/tmp/bd_20180512-213805/udfs/ -o 
ro

and play it in Mplayer:

mplayer br://1//dev/shm/tmp/bd_20180512-213805/udfs/
Warning unknown option lavdops at line 3
MPlayer SVN-r38109-4.9.2 (C) 2000-2018 MPlayer Team

Playing br://1//dev/shm/tmp/bd_20180512-213805/udfs/.
libavformat version 58.13.101 (internal)
TS file format detected.
VIDEO H264(pid=4113) AUDIO A52(pid=4352) NO SUBS (yet)!  PROGRAM N. 1
FPS seems to be: 24.000000
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.19.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 192.0 kbit/6.25% (ratio: 24000->384000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or 
directory
[AO_ALSA] alsa-lib: pcm_hw.c:1583:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' 
failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
mcop warning: user defined signal handler found for SIG_PIPE, overriding
[AO ARTS] can't connect to aRts soundserver
[AO ESD] esd_open_sound failed: Connection timed out
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
[JACK] cannot open server
[AO SDL] Samplerate: 48000Hz Channels: Stereo Format floatle
[AO SDL] Unsupported audio format: 0x1d.
[AO_ALSA] alsa-lib: pcm_hw.c:1583:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' 
failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave
[AO SDL] Unable to open audio: No available audio device
[AO_ALSA] alsa-lib: pcm_hw.c:1583:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' 
failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave
AL lib: (EE) alsa_open_playback: Could not open playback device 'default': 
Device or resource busy
[OpenAL] could not open device
DVB card number must be between 1 and 4
AO: [null] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1920x1080 => 1920x1080 Planar YV12
A:   3.7 V:   3.8 A-V: -0.010 ct: -0.047  88/ 88 47%  1%  1.2% 0 0
[h264 @ 0x576476a0]Missing reference picture, default is 2
[h264 @ 0x576476a0]mmco: unref short failure
[h264 @ 0x576476a0]Invalid NAL unit 1, skipping.
[h264 @ 0x576476a0]error while decoding MB 18 2, bytestream -10
[h264 @ 0x576476a0]concealing 7951 DC, 7951 AC, 7951 MV errors in P frame
[h264 @ 0x576476a0]top block unavailable for requested intra mode
[h264 @ 0x576476a0]error while decoding MB 1 0, bytestream 172522
[h264 @ 0x576476a0]concealing 8160 DC, 8160 AC, 8160 MV errors in I frame
A:  13.2 V:  13.2 A-V:  0.027 ct: -0.091 104/104 54%  2%  1.8% 0 0
[h264 @ 0x576476a0]co located POCs unavailable
[h264 @ 0x576476a0]error while decoding MB 41 0, bytestream -22
[h264 @ 0x576476a0]concealing 8160 DC, 8160 AC, 8160 MV errors in P frame
A:  22.6 V:  22.7 A-V: -0.040 ct: -0.091 119/119 44%  2%  0.9% 0 0
[h264 @ 0x576476a0]error while decoding MB 42 2, bytestream -6
[h264 @ 0x576476a0]concealing 7927 DC, 7927 AC, 7927 MV errors in B frame
A:  32.1 V:  32.1 A-V:  0.027 ct: -0.090 128/128 ??% ??% ??,?% 0 0
[h264 @ 0x576476a0]co located POCs unavailable
A:  42.0 V:  42.0 A-V:  0.014 ct: -0.111 140/140 ??% ??% ??,?% 0 0
[h264 @ 0x576476a0]Invalid NAL unit 1, skipping.
[h264 @ 0x576476a0]error while decoding MB 69 4, bytestream -12
[h264 @ 0x576476a0]concealing 7660 DC, 7660 AC, 7660 MV errors in B frame
[h264 @ 0x576476a0]top block unavailable for requested intra mode -1
[h264 @ 0x576476a0]error while decoding MB 4 0, bytestream 58843
[h264 @ 0x576476a0]concealing 8160 DC, 8160 AC, 8160 MV errors in I frame
A:  63.4 V:  73.0 A-V: -9.594 ct: -0.100 198/198 ??% ??% ??,?% 0 0
[ac3 @ 0x576476a0]invalid coupling range (15 >= 6)
[ac3 @ 0x576476a0]error decoding the audio block
libbluray/bluray.c:614: Read past EOF !6 198/198 ??% ??% ??,?% 0 0

TS_PARSE: COULDN'T SYNC
A:  73.2 V:  73.2 A-V:  0.031 ct:  0.012 202/202 ??% ??% ??,?% 0 0


Exiting... (End of file)
-------------

ignore audio errors, just wrong .asoundrc for root!
h264 errors probably just from my attempts at seeking!

Now, there is github repo for udftools, but I haven't tried to update my mkudffs 
and friends from it yet!

https://github.com/pali/udftools/commits/master?after=05b9f472b12f881d675fa0a01fab004dea4259aa+69

note those:

--------------------------
mkudffs: Add experimental support for Blu-Ray Disc Recordable with UD… …  
@pali  
pali committed Dec 16, 2017 
 819e803 
  
mkudffs: Add minimal support for UDF revision 2.50 and 2.60 …  
@pali  
pali committed Dec 16, 2017

--------------------------

sounds interesting!!

Attached three files from BD tmp folder. (including my modified sh file - I 
fixed it in Midnight Commander while Cin was busy with encoding)

-------------- next part --------------
<?xml version="1.0"?>
<JOBS WARN=1>
<JOB ENABLED=1 FARMED=0 LABELED=0 EDL_PATH=/dev/shm/tmp/bd_20180512-213805/bd.xml ELAPSED=0>
<ASSET SRC=/dev/shm/tmp/bd_20180512-213805/bd.m2ts>
<FOLDER NUMBER=6></FOLDER>
<FORMAT TYPE=FFMPEG USE_HEADER=1 FFORMAT=m2ts></FORMAT>
<AUDIO CHANNELS=0 RATE=0 BITS=0 BYTE_ORDER=0 SIGNED=0 HEADER=0 DITHER=0 ACODEC=bluray.m2ts AUDIO_LENGTH=0></AUDIO>
<VIDEO ACTUAL_HEIGHT=0 ACTUAL_WIDTH=0 HEIGHT=1080 WIDTH=1920 LAYERS=1 PROGRAM=-1 FRAMERATE=24 VCODEC=bluray.m2ts VIDEO_LENGTH=0 MOV_SPHERE=0 JPEG_SPHERE=0 SINGLE_FRAME=0 INTERLACE_AUTOFIX=1 INTERLACE_MODE=UNKNOWN INTERLACE_FIXMETHOD=SHIFT_UPONE></VIDEO>
</ASSET>
PATH /dev/shm/tmp/bd_20180512-213805/bd.m2ts
AUDIO_CODEC bluray.m2ts
VIDEO_CODEC bluray.m2ts
AMPEG_BITRATE 256
AMPEG_DERIVATIVE 3
VORBIS_VBR 0
VORBIS_MIN_BITRATE -1
VORBIS_BITRATE 128000
VORBIS_MAX_BITRATE -1
FF_AUDIO_OPTIONS id 0x1100
+maxrate 9000000
+minrate 0
+bufsize 1835008
+
FF_SAMPLE_FORMAT 
FF_AUDIO_BITRATE 192000
FF_AUDIO_QUALITY -1
FF_VIDEO_OPTIONS bluray-compat=1
+id=0x1011
+level=41
+bf=2
+refs=3
+color_range=mpeg
+colorspace=bt709
+color_trc=bt709
+color_primaries=bt709
+profile=high
+preset=medium
+flags=+cgop
+# must be last for bdcreate.C
+x264opts keyint=25:min-keyint=4:qpmin=3:qpmax=33:qp_step=4:merange=8
+
FF_PIXEL_FORMAT 
FF_VIDEO_BITRATE 10000000
FF_VIDEO_QUALITY -1
THEORA_FIX_BITRATE 1
THEORA_BITRATE 860000
THEORA_QUALITY 16
THEORA_SHARPNESS 2
THEORA_KEYFRAME_FREQUENCY 64
THEORA_FORCE_KEYFRAME_FREQUENCY 64
MP3_BITRATE 224
JPEG_QUALITY 80
ASPECT_RATIO 1.7777777777777777e+00
VMPEG_IFRAME_DISTANCE 45
VMPEG_PFRAME_DISTANCE 0
VMPEG_PROGRESSIVE 0
VMPEG_DENOISE 1
VMPEG_BITRATE 1000000
VMPEG_DERIVATIVE 1
VMPEG_QUANTIZATION 15
VMPEG_CMODEL 7
VMPEG_FIX_BITRATE 0
VMPEG_SEQ_CODES 0
VMPEG_PRESET 0
VMPEG_FIELD_ORDER 0
AC3_BITRATE 128
PNG_USE_ALPHA 0
EXR_USE_ALPHA 0
EXR_COMPRESSION 0
TIFF_CMODEL 0
TIFF_COMPRESSION 0
MOV_SPHERE 0
JPEG_SPHERE 0
</JOB>
<JOB ENABLED=1 FARMED=0 LABELED=0 EDL_PATH=@/dev/shm/tmp/bd_20180512-213805/bd.sh ELAPSED=0>
<ASSET SRC=/dev/shm/tmp/bd_20180512-213805>
<FOLDER NUMBER=6></FOLDER>
<FORMAT TYPE=?????????? USE_HEADER=1 FFORMAT=""></FORMAT>
<AUDIO_OMIT CHANNELS=0 RATE=0 BITS=0 BYTE_ORDER=0 SIGNED=0 HEADER=0 DITHER=0 AUDIO_LENGTH=0></AUDIO_OMIT>
<VIDEO_OMIT ACTUAL_HEIGHT=0 ACTUAL_WIDTH=0 HEIGHT=0 WIDTH=0 LAYERS=0 PROGRAM=-1 FRAMERATE=0 VIDEO_LENGTH=0 MOV_SPHERE=0 JPEG_SPHERE=0 SINGLE_FRAME=0 INTERLACE_AUTOFIX=1 INTERLACE_MODE=UNKNOWN INTERLACE_FIXMETHOD=SHIFT_UPONE></VIDEO_OMIT>
</ASSET>
PATH /dev/shm/tmp/bd_20180512-213805
AUDIO_CODEC 
VIDEO_CODEC 
AMPEG_BITRATE 256
AMPEG_DERIVATIVE 3
VORBIS_VBR 0
VORBIS_MIN_BITRATE -1
VORBIS_BITRATE 128000
VORBIS_MAX_BITRATE -1
FF_AUDIO_OPTIONS 
FF_SAMPLE_FORMAT 
FF_AUDIO_BITRATE 0
FF_AUDIO_QUALITY -1
FF_VIDEO_OPTIONS 
FF_PIXEL_FORMAT 
FF_VIDEO_BITRATE 0
FF_VIDEO_QUALITY -1
THEORA_FIX_BITRATE 1
THEORA_BITRATE 860000
THEORA_QUALITY 16
THEORA_SHARPNESS 2
THEORA_KEYFRAME_FREQUENCY 64
THEORA_FORCE_KEYFRAME_FREQUENCY 64
MP3_BITRATE 224
JPEG_QUALITY 80
ASPECT_RATIO -1.0000000000000000e+00
VMPEG_IFRAME_DISTANCE 45
VMPEG_PFRAME_DISTANCE 0
VMPEG_PROGRESSIVE 0
VMPEG_DENOISE 1
VMPEG_BITRATE 1000000
VMPEG_DERIVATIVE 1
VMPEG_QUANTIZATION 15
VMPEG_CMODEL 7
VMPEG_FIX_BITRATE 0
VMPEG_SEQ_CODES 0
VMPEG_PRESET 0
VMPEG_FIELD_ORDER 0
AC3_BITRATE 128
PNG_USE_ALPHA 0
EXR_USE_ALPHA 0
EXR_COMPRESSION 0
TIFF_CMODEL 0
TIFF_COMPRESSION 0
MOV_SPHERE 0
JPEG_SPHERE 0
</JOB>
</JOBS>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bd.sh
Type: application/x-shellscript
Size: 447 bytes
Desc: not available
URL: <http://lists.cinelerra-cv.org/pipermail/cinelerra/attachments/20180512/3299f04c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bd.xml
Type: text/xml
Size: 5926 bytes
Desc: not available
URL: <http://lists.cinelerra-cv.org/pipermail/cinelerra/attachments/20180512/3299f04c/attachment.xml>


More information about the Cinelerra mailing list