lpcm for bluray hacks!
So, this time I tried to integrate encoder I was talking about earlier into Cingg. files for git am it... initiializes, and then famous for me android/termux audio crash comes... Terje, Andrea - you can try it even with stereo (but high bit depth/high freq) audio tracks... after hopefully successfull rebuild (encoder added to our ffmpeg copy, so rebuild) select ffmpeg > m2ts, and for audio m2ts_pcm.m2ts try render, and listen to resulting m2ts file with mpv or vlc. or even try to burn it into real bd disk..
Andrew, While I struggle to get my usual Thunderbird imap client going due to a Google login issue, I have to use web mail instead..... . I want to help and tried to understand you ffmpeg command, but I am yet quite unfamiliar and incapable with what to do here, regarding possibly patching Cin-GG/ffmpeg, compiling and testing. So I need all detailed command procedure steps, at least this first time ;) Also because I have just Cin-GG Appimage installation, my understanding from a previous post I read is that custom ffmpeg is not included in Appimage as it was in previous in the rpm package. If you have compiled a new ffmpeg with i.e pcm_bluray, I need to know from where to download it and suggestion how and where to install it and test it on my Leap system. What I have installed and have used myself the later time, is the multimedia enabled ffmpeg-4x for Leap 15.3 and for Tumbleweed (TW) from Packman, where especially the latter TW version includes several new PCM features, which I have not tested so far: http://packman.links2linux.org/package/ffmpeg-4/1002522 Terje J. H ons. 8. des. 2021 kl. 15:06 skrev Andrew Randrianasulu via Cin < [email protected]>:
So, this time I tried to integrate encoder I was talking about earlier into Cingg.
files for git am
it... initiializes, and then famous for me android/termux audio crash comes...
Terje, Andrea - you can try it even with stereo (but high bit depth/high freq) audio tracks...
after hopefully successfull rebuild (encoder added to our ffmpeg copy, so rebuild)
select ffmpeg > m2ts, and for audio m2ts_pcm.m2ts
try render, and listen to resulting m2ts file with mpv or vlc. or even try to burn it into real bd disk..
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
On Wednesday, December 8, 2021, Terje J. Hanssen via Cin < [email protected]> wrote:
Andrew, While I struggle to get my usual Thunderbird imap client going due to a Google login issue, I have to use web mail instead..... .
I want to help and tried to understand you ffmpeg command, but I am yet quite unfamiliar and incapable with what to do here, regarding possibly patching Cin-GG/ffmpeg, compiling and testing. So I need all detailed command procedure steps, at least this first time ;)
in theory build instructions should be workable... but of course documentation bugs exist! https://cinelerra-gg.org/download/CinelerraGG_Manual/single_user_build.html try instructions from this page. You can try to build without context help first, or download and unpack it as showed in earlier, upper-level page https://cinelerra-gg.org/download/CinelerraGG_Manual/How_Build_CINELERRA_GG_... =====copypasta=== You need at least 6 GB of disk storage to operate a build + you need to have “git” installed. Recommend you build and run as root, just to avoid permission issues initially. The git step has to download many files (approx 130 MB) so allow time. Run the following commands (this takes awhile): # This is where you need the 6GB of disk space cd /<build_path>/ git clone --depth 1 "git://git.cinelerra-gg.org/goodguy/cinelerra.git" cinelerra5 if you can wait a bit longer and have enough space you can omit '-depth 1' parameter and download whole history of git changes. # Toplevel directory: cd cinelerra5/cinelerra-5.1 NOTE: if your system has never had CINELERRA-GG Infinity installed, you will have to make sure all the compilers and libraries necessary are installed. So on the very first build you should run as root: ./blds/bld_prepare.sh <os> ./autogen.sh ./configure --with-single-user make 2>&1 | tee log make install Where <os> represents the Operating System supported by CINELERRA-GG, such as centos, fedora, suse, ubuntu, mint, debian. The “with-single-user” parameter makes it so. Check for errors before proceeding. ====
Also because I have just Cin-GG Appimage installation, my understanding from a previous post I read is that custom ffmpeg is not included in Appimage as it was in previous in the rpm package. If you have compiled a new ffmpeg with i.e pcm_bluray, I need to know from where to download it and suggestion how and where to install it and test it on my Leap system.
well, I used online documentation for rpbmuild on Rosa Linux, but I never tried to add patches to it personally. I suggest to download three patches from previous mail (hoppefully they will have correct type from downloading via web interface!) to somefolder, and then from cinelerra5 directory (where hidden .git directory located) just run git am <path/to/patches/*.patch> or call this command few times over individual numbered patches starting usually from smaller number: git am 0001-something.patch git am 0002-more-stuff.patch git am 0003-fix-up.patch git am stand for git apply mailbox - apply patches created with git format-patch (like I lately do) sometimes I just provide patches you should apply with old patch tool, usualy from root of cinelerra5 source tree or thirdparty/ directory inside it. But for now hopefully simpler git am should do trick. After you build at least up to thirdparty/ffmpeg-4.4 (there should be few 0-sized files in thirdparty/build directory, indicating phases of build for individual pieces of software, so for ffmpeg look for thirdparty/build/ffmpeg*) you can cd there: cd thirdparty/ffmpeg-4.4 and run resulted ffmpeg ./ffmpeg -encoders | grep blu so you can test all sort of things with this ffmpeg copy. for me after build steps look like this: $ cd cingg/cinelerra/cinelerra-5.1/ $ cd thirdparty/ffmpeg-4.4/ $ ./ffmpeg -encoders | grep blu A..... pcm_bluray PCM signed 16|24-bit big-endian for bluray media $ next command takes input file just after '-i' switch, copies video from original and tries to encode audio in pcm_bluray, mpegts_m2ts_mode 1 tells ffmpeg we need bluray-compatible mode from ts (mpeg transport stream) muxer, last argument is output filename. $ ./ffmpeg -i ~/vid_20210828.mp4 -c:v copy -c:a pcm_bluray -mpegts_m2ts_mode 1 1.m2ts Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/data/com.termux/files/home/vid_20210828.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Duration: 00:00:16.75, start: 0.000000, bitrate: 685 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x480 [SAR 27:64 DAR 9:16], 547 kb/s, 29.61 fps, 29.61 tbr, 18k tbn, 59.21 tbc (default) Metadata: handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default) Metadata: handler_name : SoundHandle vendor_id : [0][0][0][0] File '1.m2ts' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (aac (native) -> pcm_bluray (native)) Press [q] to stop, [?] for help Output #0, mpegts, to '1.m2ts': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x480 [SAR 27:64 DAR 9:16], q=2-31, 547 kb/s, 29.61 fps, 29.61 tbr, 90k tbn, 18k tbc (default) Metadata: handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: pcm_bluray, 48000 Hz, stereo, s32, 2304 kb/s (default) Metadata: handler_name : SoundHandle vendor_id : [0][0][0][0] encoder : Lavc58.134.100 pcm_bluray frame= 3 fps=0.0 q=-1.0 size= 21kB time=00:00:00.01 bitrate=124frame= 496 fps=0.0 q=-1.0 Lsize= 6192kB time=00:00:16.72 bitrate=3033.6kbits/s speed=58.7x video:1120kB audio:4713kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.154016% $ mpv 1.m2ts Video --vid=1 (h264 640x480 29.583fps) (+) Audio --aid=1 --alang=eng (pcm_bluray 2ch 48000Hz) [ao/opensles] Device latency is 0.170000 AO: [opensles] 48000Hz stereo 2ch s32 A: 00:00:16 / 00:00:16 (96%) Exiting... (End of file) $ but hopefully Cinelerra-gg herself will be built ok too, so you should be able to load media and try render (probably not via Create bd at first, just usual render into m2ts file) Let us know about your progress or problems.
What I have installed and have used myself the later time, is the multimedia enabled ffmpeg-4x for Leap 15.3 and for Tumbleweed (TW) from Packman, where especially the latter TW version includes several new PCM features, which I have not tested so far: http://packman.links2linux. org/package/ffmpeg-4/1002522
Terje J. H
ons. 8. des. 2021 kl. 15:06 skrev Andrew Randrianasulu via Cin < [email protected]>:
So, this time I tried to integrate encoder I was talking about earlier into Cingg.
files for git am
it... initiializes, and then famous for me android/termux audio crash comes...
Terje, Andrea - you can try it even with stereo (but high bit depth/high freq) audio tracks...
after hopefully successfull rebuild (encoder added to our ffmpeg copy, so rebuild)
select ffmpeg > m2ts, and for audio m2ts_pcm.m2ts
try render, and listen to resulting m2ts file with mpv or vlc. or even try to burn it into real bd disk..
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
On Wed, 8 Dec 2021 22:28:52 +0300 Andrew Randrianasulu via Cin <[email protected]> wrote: <snip> =======
NOTE: if your system has never had CINELERRA-GG Infinity installed, you will have to make sure all the compilers and libraries necessary are installed. So on the very first build you should run as root:
./blds/bld_prepare.sh <os> ./autogen.sh ./configure --with-single-user make 2>&1 | tee log make install
Where <os> represents the Operating System supported by CINELERRA-GG, such as centos, fedora, suse, ubuntu, mint, debian. The “with-single-user” parameter makes it so. Check for errors before proceeding.
====
I don't think you should build as root, it is not needed and will make all produced files root-accessible only. The only step where root is needed (and safer, use sudo instead of logging in as root), is the ./blds/bld_prepare.sh <os> step, because that installs new software on the machine. I always build as normal user. MatN
I tried to apply the 3 patches and everything is OK. Below is the result of mediainfo. I have no possibility to try burning a BD. [Me too building without being root] $ mediainfo test.m2ts General ID : 1 (0x1) Complete name : test.m2ts Format : BDAV Format/Info : Blu-ray Video File size : 344 MiB Duration : 3 min 40 s Overall bit rate mode : Variable Overall bit rate : 13.0 Mb/s Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : [email protected] Format settings : CABAC / 3 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 3 frames Codec ID : 27 Duration : 3 min 41 s Bit rate mode : Variable Bit rate : 10.2 Mb/s Maximum bit rate : 40.0 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.197 Stream size : 269 MiB (78%) Writing library : x264 core 164 Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : PCM Format settings : Big / Signed Muxing mode : Blu-ray Codec ID : 128 Duration : 3 min 41 s Bit rate mode : Constant Bit rate : 2 304 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Bit depth : 24 bits Stream size : 60.8 MiB (18%) Language : Italian
On Thursday, December 9, 2021, Andrea paz via Cin < [email protected]> wrote:
I tried to apply the 3 patches and everything is OK. Below is the result of mediainfo. I have no possibility to try burning a BD. [Me too building without being root]
well, i hope it also sounds correct (I had problem with sound running 2x fast) thanks for testing!
$ mediainfo test.m2ts General ID : 1 (0x1) Complete name : test.m2ts Format : BDAV Format/Info : Blu-ray Video File size : 344 MiB Duration : 3 min 40 s Overall bit rate mode : Variable Overall bit rate : 13.0 Mb/s
Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : [email protected] Format settings : CABAC / 3 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 3 frames Codec ID : 27 Duration : 3 min 41 s Bit rate mode : Variable Bit rate : 10.2 Mb/s Maximum bit rate : 40.0 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.197 Stream size : 269 MiB (78%) Writing library : x264 core 164 Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709
Audio ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : PCM Format settings : Big / Signed Muxing mode : Blu-ray Codec ID : 128 Duration : 3 min 41 s Bit rate mode : Constant Bit rate : 2 304 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Bit depth : 24 bits Stream size : 60.8 MiB (18%) Language : Italian -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
mnieuw@zap.a2000.nl -
Terje J. Hanssen