[Cin] Blu-ray compliant MPEG-2 SD video - 2022 mod
Terje J. Hanssen
terjejhanssen at gmail.com
Tue Dec 6 23:53:33 CET 2022
With HDV 'in the Blu-ray box' I would like to test if it possible to use
equivalent procedures for DV to SD-Blu-ray video.
That is continue as an alternative to the 2021 thread here:
https://lists.cinelerra-gg.org/pipermail/cin/2021-December/004268.html
Blu-ray compliant MPEG-2 SD video with LPCM audio
-------------------------------------------------
1) Encode DV to MPEG-2 video and copy PCM audio as is to a VOB/MPG format:
ffmpeg -i dv28.dv -c:v mpeg2video -refs 1 -bf 2 -b:v 25M -maxrate 25M
-minrate 25M -bufsize 45M -muxrate 45M -dc 10 -c:a pcm_s16be -f vob
dv28_25mbps.mpg
2) tsMuxer
As FFMpeg (then) would not allow to mux PCM or remux MPG to M2TS, I
tested tsMuxer,
see the attached screenshot: tsMuxer_SD_M2TS
Input file: dv28_25mbps.mpg
Tracs: MPEG-2 video stream and LPCM audio stream
Output: dv28_25mbps.iso
------------------------
Using Mediainfo to compare the source dv28.dv ffmpeg input file with its
output file dv28_25mbps.mpg (intermediate) and with the resulting
dv28_25mbps.iso, show that the interlaced dv video was changed to
progressive VOB/BVOB dvd video.
> mediainfo dv28.dv | egrep 'Format|Scan|Width|Height|Bit'
Format : DV
Format : DV
Bit rate mode : Constant
Bit rate : 24.4 Mb/s
Width : 720 pixels
Height : 576 pixels
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Bits/(Pixel*Frame) : 2.357
Format : PCM
Format settings : Big / Signed
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Bit depth : 16 bits
> mediainfo dv28_25mbps.mpg | egrep 'Format|Scan|Width|Height|Bit'
Format : MPEG-PS
Format : MPEG Video
Format version : Version 2
Format profile : Main at Main
Format settings : BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=12
Bit rate mode : Variable
Bit rate : 24.7 Mb/s
Width : 720 pixels
Height : 576 pixels
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 2.384
Format : PCM
Format settings : Big / Signed
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Bit depth : 16 bits
> mediainfo dv28_25mbps.iso | egrep 'Format|Scan|Width|Height|Bit'
Format : MPEG Video
Format version : Version 2
Format : MPEG Video
Format version : Version 2
Format profile : Main at Main
Format settings : BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=12
Bit rate mode : Variable
Bit rate : 28.0 Mb/s
Width : 720 pixels
Height : 576 pixels
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 2.703
-----------------------------------
That is, suggestion how to merge/customize the newer ffmpeg HDV to
Blu-ray procedure
ffmpeg -i hdv.m2t -c:v copy -c:a pcm_bluray -mpegts_m2ts_mode 1 output.mts
for SD-DV to keep it interlaced and get dv28_25mbps.m2ts muxed directly?
------------------
I did a first try with the following line, without taking care of
25mbps, but got lost the pcm audio to a privat stream (change mode?).
Additional the vido is not kept interlaced.
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12 (SUSE Linux)
..........snip
[dv @ 0x55b59acfeb80] Estimating duration from bitrate, this may be
inaccurate
Input #0, dv, from 'dv28.dv':
Metadata:
timecode : 00:00:00:00
Duration: 00:02:16.64, start: 0.000000, bitrate: 28800 kb/s
Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3],
25000 kb/s, 25 fps, 25 tbr, 25 tbn
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (dvvideo (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, mpegts, to 'dv28-mpeg2-SD-bluray.mts':
Metadata:
timecode : 00:00:00:00
encoder : Lavf59.27.100
Stream #0:0: Video: mpeg2video (Main), yuv420p(bottom coded first
(swapped)), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 90k tbn
Metadata:
encoder : Lavc59.37.100 mpeg2video
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[mpegts @ 0x55b59ad3dd40] Stream 1, codec pcm_s16le, is muxed as a
private data stream and may not be recognized upon reading.
frame= 3416 fps=586 q=31.0 Lsize= 39336kB time=00:02:16.64
bitrate=2358.3kbits/s speed=23.4x
video:11070kB audio:25620kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 7.211923%
terje at localhost:/run/media/terje/Seagate_4TB_back/data/Video-test/SD_Blu-ray>
terje at localhost:/run/media/terje/Seagate_4TB_back/data/Video-test/SD_Blu-ray>
ffmpeg -i dv28-mpeg2-SD-bluray.mts 2>&1 >/dev/null | egrep "Video|Audio"
Stream #0:0[0x1011]: Video: mpeg2video (Main) ([2][0][0][0] /
0x0002), yuv420p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 25 fps,
25 tbr, 90k tbn
mediainfo dv28-mpeg2-SD-bluray.mts | egrep 'Format|Scan|Width|Height|Bit'
Format : BDAV
Format/Info : Blu-ray Video
Format : MPEG Video
Format version : Version 2
Format profile : Main at Main
Format settings, BVOP : No
Format settings, Matrix : Default
Format settings, GOP : Variable
Bit rate mode : Variable
Bit rate : 2 257 kb/s
Width : 720 pixels
Height : 576 pixels
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.218
Format : MPEG Video /
More information about the Cin
mailing list