[Cin] HDV on a Blu-ray Disc Without Re-encoding

Terje J. Hanssen terjejhanssen at gmail.com
Mon Nov 23 03:15:35 CET 2020



Den 23.11.2020 02:20, skrev Andrew Randrianasulu:
> В сообщении от Monday 23 November 2020 03:51:36 Terje J. Hanssen via Cin написал(а):
>> This topic is treated with reference to the current  Cinelerra-GG Manual
>> (and in the Features5 document at least since early 2018):
>>
>>    * 14.6 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 in-
>>      put 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 C INELERRA-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 cinelerra 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.
>>
>> ===================
>>
>> When the 1080i/25 HDV-source is recorded via i.Link (Firewire) to disk,
>> the file type and format is HDV.M2T
>>
>> For this test I use the same, downloaded HDV file as previous mentioned
>> (not my file or camcorded by me!)
>>
>>       Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] /
>> 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9],
>> 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
>>       Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
>> stereo, s16p, 384 kb/s
>>
>>
>> The MPEG2 Video stream is Blu-ray compatible format, while the MP2 Audio
>> stream has to be converted to AC3.
>>
>> Demux, convert the audio and remux to a M2TS stream using this ffmpeg
>> command:
>>
>> ffmpeg -i 20081103140154.m2t -vcodec copy -acodec ac3 20081103140154.m2ts
>>
>> ............. skip
>>
>> Input #0, mpegts, from '20081103140154.m2t':
>>     Duration: 00:00:13.44, start: 1042.400000, bitrate: 26598 kb/s
>>     Program 100
>>       Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] /
>> 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9],
>> 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
>>       Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
>> stereo, s16p, 384 kb/s
>>       Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)
>>       Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)
>> Stream mapping:
>>     Stream #0:0 -> #0:0 (copy)
>>     Stream #0:1 -> #0:1 (mp2 (native) -> ac3 (native))
>> Press [q] to stop, [?] for help
>> Output #0, mpegts, to '20081103140154.m2ts':
>>     Metadata:
>>       encoder         : Lavf57.83.100
>>       Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
>> yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31,
>> 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc
>>       Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
>>       Metadata:
>>         encoder         : Lavc57.107.100 ac3
>> frame=  336 fps=0.0 q=-1.0 Lsize=   45549kB time=00:00:13.43
>> bitrate=27774.3kbits/s speed= 107x
>> video:41008kB audio:315kB subtitle:0kB other streams:0kB global
>> headers:0kB muxing overhead: 10.225909%
>>
>> Comment
>> The default AC3 bitrate 192 kb/s here is halph of the source MP2 bitrate
>> 384 kb/s. Any idea about the quality difference?
> Try to listen to it (with VLC?)?
>
> *I think* 384 kb/s was for 5.1 ac3 sound ..
> so, stereo can be compressed further.
>
> https://www.vegascreativesoftware.info/us/forum/ac-3-bitrate--63214/
> this says 448 kb/s for 5.1

I could not and cannot hear especial noticeable difference using VLC. 
(Another more suited  audio file without background noise, I don't know)


>
>> ================
>>
>> So further to trouble using the procedure steps from the Manual above:
>>
>> Determine the size of the file in bytes.
>>
>>      du -sb 20081103140154.m2ts
>>      46642368    20081103140154.m2ts
>>
>>
>> Try to calculate the blocks as
>>
>>      blocks=((/466423682048 + 4096)) = 26870.59375 ??
>>
>>
>>      # mkudffs /tmp/bd_20201122_hdv_m2ts.udfs blocks 26870.59375
>>      mkudffs: invalid block-count
>>
>>
>> Obviously something went wrong here.
> Try to round up this size in blocks?
>   26870.59375 -> 26871

I didn't mentione I tried just that also. And again, the same error message:

# mkudffs /tmp/bd_20201122.udfs blocks 26871
mkudffs: invalid block-count

(I tried also other file-names without succeed, because I seem to 
remember back there was filename limits somewhere when rendering 
Blu-rays from Cin).


>
>
>> Could someone test and verify these steps and further, to see if a
>> successful Blu-ray BDAV structure is created?
>>
>> (Just now I have no Blu-ray burner in my working PC, so I have to wait
>> with burning the image to a BD-R/RE discs).
>>
>> ------------------
>>
>> Terje J. H
>>
>>
>> One current and one previous related Blu-ray mail threads as references:
>> https://lists.cinelerra-gg.org/pipermail/cin/2020-November/002709.html
>> https://lists.cinelerra-cv.org/pipermail/cinelerra/2016q4/005609.html
>>
>>
>>
>>
>



More information about the Cin mailing list