HydrogenAudio

Digital Audio/Video => General A/V => Topic started by: CherylJosie on 2023-02-03 22:22:29

Title: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-03 22:22:29
Hi there, I'm trying to author some amateur video recordings for distribution on optical media and having some difficulty.

I don't have cash for tools. I'm running Linux on all of my computers because I don't even have cash for an operating system. I'm on fixed income and inflation is killing me.

I'm running the 22.04 LTS of Ubuntu, and for editing video I'm using KDENLive (Version 21.12.3, probably doesn't match the numbering scheme at KDENLive web site because Ubuntu verified repository renames everything per their qualification and integration procedure).

I've just recently become familiar enough with KDENLive to add key frames for motion effects and compensate video levels for low light capture of bar bands on cellphones and fixed lens Zoom Q2N. I'm really green at this stuff and making slow progress from lack of funds and mentoring.

I have an NVIDIA graphics card and I'm using that for the final render through its CUDA. I don't have integrated graphics in my AMD CPU.

The various encode options in KDENLive include what appears to be a single pass average bit rate and it uses a deprecated NVENC-H265  procedure call in the GUI profile. I don't see the parameters in this command line GUI matching what the ffmpeg command line help seems to want, and the KDENLive log file has a warning that NVENC-H265 has been deprecated. The new procedure call is H265-NVENC.

Also, since this NVENC-H265 appears to be the only profile that explicitly supports Blu-Ray encoding in this version of KDENLive, and the command line parameters in KDENLive GUI don't seem to match what ffmpeg wants, I'm thinking that these command line parameters in the GUI are possibly translated and elaborated internally by KDENLive before they are handed off to ffmpeg, but I'm not sure because I haven't attempted to intercept the command line. I could probably figure out how to do that with an alias or a temporary tweak in the KDENLive configuration eventually, if I cared, but honestly why make this harder than it needs to be?

I've considered adding a KDENLive profile for software encoding that uses H.265 and has Blu-Ray compatibility, but I'm unsure of whether these parameters pass through from the GUI unedited to ffmpeg command line, or if it is possible to launch a two-pass encode from the GUI. If anyone has a working ffmpeg command line for Blu-Ray, that would go a long way toward helping me out. I could potentially store a lossless encode from KDENLive and submit the job manually to ffmpeg if I have no other choice. The other sites I've checked are so out of date, I'm looking at questions about authoring Blu-Ray media that were answered a decade ago with, "Here, try this." "Nope, didn't work."

In any case, I'm not confident in how to manually submit jobs to ffmpeg, especially for Blu-Ray compatibility, even if I were to export a lossless edit. I have never authored optical media before. A known good workflow would be gold.

I am using tsMuxeR to generate an ISO with chapters but no menu and have barely completed a single authoring that hasn't been burned or tested yet, using the NVENC-H264 Constant Quantization (as far as I can tell from the GUI parameters) option.

tsMuxeR is another one that is deprecated and I can't figure out how to add the 32 bit libraries for the GUI support so I'm flying blind on that one too. I don't even know if the GUI supports menus in addition to chapters because I can't see the GUI and the documentation of the command line version is sparse.

I'd prefer to do a proper two-pass average bit rate encode for best quality and compatibility using the appropriate Blu-Ray options in ffmpeg, but boy, nobody does optical media on FOSS any more do they? It's slim pickings out there finding a work flow.

The ideal solution for me would be to create a profile in KDENLive that will handle it in the job queue. If there's no way to start a two-pass encode from the GUI so I have to export a lossless encode first and write a script, that's okay, provided I have good insight into what sensible parameters to use for good quality efficient encoding with Blu-Ray compatibility.

Failing that, I'll probably just burn and distribute what appears to be the working one-pass average bit rate hardware encode of H265 at the highest bit rate that fits on a single layer DVD, currently for a 2.5 hour gig that's about 22750bps, the second highest setting on the KDENLive slider. Even though KDENLive is using a deprecated NVENC-H265 function call, at least it still generates output that might work on a Blu-Ray player and maybe the bit rate is high enough to overcome limitations of a single-pass encode.

But until I burn a disc and try it, I won't know if I'm there yet. I'm running the encode again right now because the first time I ran an encode I used the H264 to test for file size using the Constant Quantization option out of ignorance. I didn't understand what these bit rate control modes meant until I stumbled across this site by a contributor to ffmpeg:

https://slhck.info/video/2017/03/01/rate-control.html

and the only way I found HydrogenAudio as a reference for help with Blu-Ray was from Doom9.

The Videohelp web site is where I found the information about tsMuxer.

I tried using devede first but although it supports menus it doesn't support chapters and it also transcodes everything to SD for a maximum file size of dual layer DVD media. That's not going to work with Blu-Ray.

I found info about DVDStyler, but their track record of installing browser toolbar hijack seems sketchy even if Wikipedia says they don't do that anymore. I don't feel like risking system damage just to try out a tool that isn't vetted well enough for the repository and may not do what I need anyway.

Then there's something I read somewhere (can't remember where) about the data stream encoded by gstreamer, mkisofs, or something where UDP? support has fallen behind and whatever version is available won't support Blu-Ray burning with the latest tools? I can't remember what I read and like everything else it's probably out of date and poorly documented.

Please, guys, this is really tough for a noob. I've already floundered for a week and I'm just barely comprehending what I'm reading. Can anyone point me to a workflow or tools that will make this a little easier?

Or am I condemned to spend thousands on Windows/Mac OS and possibly proprietary tools to burn a probably inferior disk using their canned settings, especially if it's freeware? I don't want to go down that path. I've never needed antivirus software for Ubuntu Linux desktop and never detected an infection for the past 15 years. I don't want to go back to the promiscuous computing scene. I like it quiet.

If MKV has any solutions for me, that's okay. I'm not married to any particular format. As long as I can pop the disc in a Blu-Ray player and it looks visually transparent with no stutters or artifacts, I'm good. Chapters would be nice so I can scan through the songs. Menus would be even better so I can distribute two gigs per disc on dual layer media. But honestly, a working flow is what I most need right now because on my budget I can't afford to burn a rack of Blu-Ray coasters at $1-$3 per pop just to come up empty handed and revert to DVD anyway.

Here's a copy of the existing constant quantization H.264 hardware encode that I uploaded to YouTube so you can see what I produced so far. It's mostly done in the edits but is not the final version that I have on my PC. I'm guessing that it only plays okay over streaming because YouTube transcoded it to a rate-limited version. Mediainfo doesn't seem to understand how to display peak bit rates that exceed a 1Gbps threshold. I think the peak rate on that file was 2Gbps, not 2000Kbps.

https://www.youtube.com/watch?v=xhKh0jfMOKQ&list=PLV7pnC28-tXHicBQQ2vmcKBZNMmJnbWu1

The second file in this list is another encode that I did originally before I had knowledge and tools to attempt a disc authoring for the client. I have no idea what I did. I was using an older Ubuntu and an older KDENLive when I did that one and it was one of my very first attempts at motion animation.

I'm hoping that I might eventually gain enough expertise to sell my services as a video documentarian to supplement my income. These bar band gigs I record are my raw material for the learning experience. I'm also doing some mixing on occasion. I mixed or assisted in mixing about half of the gigs I recorded, but the percentage of mixing went down with the pandemic. Just FYI that's the context of why I'm bothering to produce media of these latest gigs, that was part of the original deal long ago that I'm just now attempting to make good on because...you know...

Thank you all.
Cheryl
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: fooball on 2023-02-04 09:26:46
Thanks for posting this.  I don't have any solutions to offer, and I've never attempted Blu-ray, but I have Blu-ray burners and you're right – support for optical (of any form) seems to be dropping off because relevance is dropping off.  Any answers forthcoming will be of interest.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Aleron Ives on 2023-02-04 21:06:35
Blu-ray only supports H.264, not H.265. You need UHD Blu-ray for H.265 support. I've heard that some commercial movies are encoded with x264, so it's definitely possible to do. You have to respect Blu-ray's maximum bitrate, so you'd probably want to use 2-pass mode with VBV to ensure the bitrate never exceeds the cap (which is ~40 Mbps, IIRC?). You also need the --bluray-compat switch along with some other arbitrary limitations imposed by the Blu-ray spec, such as --bframes 2 and --b-pyramid strict.

I suspect you can find a list of all the required switches on some Doom9 or VideoHelp thread.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 09:00:33
Video Codecs:

    MPEG-2: Enhanced for HD, also used for playback of DVDs and HDTV recordings.
    MPEG-4 AVC: Part of the MPEG-4 standard also known as H.264 (High Profile and Main Profile).
    SMPTE VC-1: A standard based on Microsoft® Windows Media® Video (WMV) technology.

Audio Codecs:

    Linear PCM (LPCM): Offers up to 8 channels of uncompressed audio.
    Dolby Digital® (DD): Format used for DVDs also known as AC3, offers 5.1-channel surround sound.
    Dolby Digital® Plus (DD+): Extension of DD, offers increased bitrates and 7.1-channel surround sound.
    Dolby® TrueHD: Extension of MLP Lossless, offers lossless encoding of up to 8 channels of audio.
    DTS Digital Surround®: Format used for DVDs, offers 5.1-channel surround sound.
    DTS-HD®: Extension of DTS, offers increased bitrates and up to 8 channels of audio.

https://www.sony.com/electronics/support/articles/00029663
https://www.sony.com/electronics/support/home-video-blu-ray-disc-players-recorders/ubp-x800/articles/00029663
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 09:26:00
https://forum.videohelp.com/threads/365667-FFmpeg-best-settings-to-encode-Blu-Ray
https://forum.doom9.org/showthread.php?t=170397


2. ENCODE BLU-RAY VIDEO USING x264

2.1 MANDATORY PARAMETERS

Every encode for Blu-Ray must contain this parameters, without it will not meet Blu-Ray specification.

Quote:
--bluray-compat
Enforce x264 to create BD compliant stream, that will reduce x264 settings to BD compatible: bframe<=3, ref<=4 for 1080, ref<=6 for 720/576/480, bpyramid<=strict, weightp<=1, aud=1, nalhrd=vbr

https://forum.doom9.org/showthread.php?t=154533

Doom-9 seems to be documenting parameters for x264.exe, presumably a Windows encoder, or some other that uses these shortcuts such as --bluray-compat.

These parameters don't exist in ffmpeg. From ffmpeg man page this is the closest information I found:


       -discard (input)
           Allows discarding specific streams or frames from streams.  Any input stream can be fully discarded, using value "all" whereas selective
           discarding of frames from a stream occurs at the demuxer and is not supported by all demuxers.

           none
               Discard no frame.

           default
               Default, which discards no frames.

           noref
               Discard all non-reference frames.

           bidir
               Discard all bidirectional frames.

           nokey
               Discard all frames excepts keyframes.

           all Discard all frames.


KDENLive environment uses melt-7. I guess maybe that's why the parameters don't match ffmpeg.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 10:53:09
--bluray-compat
Enforce x264 to create BD compliant stream, that will reduce x264 settings to BD compatible: bframe<=3, ref<=4 for 1080, ref<=6 for 720/576/480, bpyramid<=strict, weightp<=1, aud=1, nalhrd=vbr

9.15.2 Options

The following options are supported by the libx264 wrapper.
  
bluray-compat (bluray-compat)

    Configure the encoder to be compatible with the bluray standard. It is a shorthand for setting "bluray-compat=1 force-cfr=1".

https://ffmpeg.org/ffmpeg-codecs.html#libx264_002c-libx264rgb
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: cid42 on 2023-02-05 11:30:14
...
Doom-9 seems to be documenting parameters for x264.exe, presumably a Windows encoder, or some other that uses these shortcuts such as --bluray-compat.
...
The x264 binary is kind of like the reference x264 encoder, like ffmpeg it's a frontend for libx264 but unlike ffmpeg that's all it does (so actually using it with audio probably requires muxing with ffmpeg separately). The x264 binary is available in the Ubuntu repo's.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 18:05:43
Thanks, just figured that out.

The ffmpeg documentation referenced x264 and when I tried the command line help I got a message to install it. I always use Synaptic for installation on the guess it's more comprehensive than apt command line.

I'll keep trying to figure out if I can write a profile for kdenlive until I get stuck before I try running command line stand-alone. Really don't want to have to script all of this if I can avoid it. Shell scripting isn't my strong suit.

The issue I'm seeing with ffmpeg is that it relies on x264 wrapper for these encoder options and I'm not sure if the Ubuntu repository is compiled with the wrapper. If not I may have to do the encoding and muxing separately. Not up to recompiling a build of ffmpeg any maybe bricking my system.

I guess my backup plan is to use the NVENC H264 hardware-accelerated ABR single-pass KDENLive profile and maybe see if I can add those blu-ray compatible switches. Failing that, I'm also trying to edit that H264 ABR profile to use the software encoder if the hardware-accelerated profile won't take the BluRay compatibility parameters.

It all depends on what the melt-7 package is doing I guess. There's some profile directory listed in the KDENLive environment settings. I'll check that and do some reading on melt-7.

I saw some mention of people testing their files for Blu-Ray compatibility with Adobe.

I think I also saw someone listing the keyframe output, I guess that was ffshow? I'd like to test as much as possible before burning coasters.

https://stackoverflow.com/questions/15855535/setting-b-frames-in-a-video-with-ffmpeg
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 19:44:08
I created an edited version of the KDENLive hardware H264 profile, changed the encoder to software, and successfully passed bluray-compat through it but maybe did not successfully pass force-cfr:

f=mp4 vcodec=libx264 vb=%bitrate+'k' bluray-compat=1 force-cfr=1 acodec=aac ab=%audiobitrate+'k'

The file looks to be CFR anyway. The bitrate looks okay and it's accepting the parameter so I can adjust the size of the file to fit the disc and I've already confirmed that the file fits on a single layer with this setting:

media1@media1-AX370-Gaming-5:/raw/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ mediainfo -full The\ Hummers\ at\ The\ Pioneer\ Saloon\ 2019-11-08\ v2\ test.mp4 |grep rate
Overall bit rate                         : 22782398
Overall bit rate                         : 22.8 Mb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Bit rate                                 : 22750000
Bit rate                                 : 22.8 Mb/s
Frame rate mode                          : CFR
Frame rate mode                          : Constant
Frame rate                               : 29.970
Frame rate                               : 29.970 (30000/1001) FPS
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=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=22750 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

The quality is acceptable as-is given the limitations of the source media. I may have a possibly working flow.

I'm looking into the audio codec now. As long as I can configure a compatible codec and pass parameters to it, I'm maybe good to go.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 19:58:20
Videohelp gives a hint on finding out which codecs are installed:

FWIW, ffmpeg -codecs returns the following:

https://forum.videohelp.com/threads/366899-can-I-tell-to-ffmpeg-use-LPCM-as-audio-codec

media1@media1-AX370-Gaming-5:/raw/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ ffmpeg -codecs | grep bluray
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
  avformat    configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
 D.AI.S pcm_bluray           PCM signed 16|20|24-bit big-endian for Blu-ray media

So it looks like there's one available. I'll try it in KDENLive GUI parameter list and see what happens.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Markuza97 on 2023-02-05 20:10:52
Do you really need Blu-ray or DVD disc?
Optical media is pretty much dead.
Every professional photographer here in Croatia will simply give you USB flash drive with MP4 video file and JPG images.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Chibisteven on 2023-02-05 20:34:13
Do you really need Blu-ray or DVD disc?
Optical media is pretty much dead.
Every professional photographer here in Croatia will simply give you USB flash drive with MP4 video file and JPG images.

That can be a bit expensive for some people to just give out flash drives.  Especially considering the cost per disc vs cost per flash drive.

https://www.amazon.com/blank-blu-ray-discs-Electronics/s?k=blank+blu-ray+discs&rh=n%3A172282
https://www.amazon.com/USB-Flash-Drives-Storage-Add-Ons/b?node=3151491
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Aleron Ives on 2023-02-05 20:38:52
It's also worth noting that most Blu-ray players will play MKV/MP4 with H.264 that does not conform to the BDMV spec, so it's probably preferable to just do a normal CRF encode and burn that to the disc. If you really need BDMV, you're better off using x264 directly, so you don't have to deal with ffmpeg's quirks.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 20:41:56
Well, that didn't work because ffmpeg pcm is only a decoder. However, there is a blu-ray supported encoder: dts.

media1@media1-AX370-Gaming-5:/raw/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ ffmpeg -codecs |grep dts

 DEAILS dts                  DCA (DTS Coherent Acoustics) (decoders: dca ) (encoders: dca )

There's also ac3, ac3_fixed, and eac3:

media1@media1-AX370-Gaming-5:/raw/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ ffmpeg -codecs |grep ac3
 DEAIL. ac3                  ATSC A/52A (AC-3) (decoders: ac3 ac3_fixed ) (encoders: ac3 ac3_fixed )
 DEAIL. eac3                 ATSC A/52B (AC-3, E-AC-3)

I guess I'll try all four options and see if any of them work.

Here's the KDENLive profile, created off the H264 hardware ABR profile and edited for blu-ray (eac3 shown) and I'm guessing for a stereo bitstream only bitrate is required paramater since it seems to be rendering okay:

f=mp4 vcodec=libx264 vb=%bitrate+'k' bluray-compat=1 force-cfr=1 acodec=eac3 ab=%audiobitrate+'k'

The encoded file plays back with sound. Since my LG OLED doesn't support DTS, I'm thinking I should stick with eac3 audio for best compatibility with modern equipment.

I guess I'm ready to try a full encode and burn it now.

Here's the mediainfo output:

media1@media1-AX370-Gaming-5:/raw/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ cat mediaout
General
Count                                    : 331
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : E-AC-3
Audio_Format_WithHint_List               : E-AC-3
Audio codecs                             : E-AC-3
Complete name                            : The Hummers at The Pioneer Saloon 2019-11-08 v2 test4.mp4
File name extension                      : The Hummers at The Pioneer Saloon 2019-11-08 v2 test4.mp4
File name                                : The Hummers at The Pioneer Saloon 2019-11-08 v2 test4
File extension                           : mp4
Format                                   : MPEG-4
Format                                   : MPEG-4
Format/Extensions usually used           : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Commercial name                          : MPEG-4
Format profile                           : Base Media
Internet media type                      : video/mp4
Codec ID                                 : isom
Codec ID                                 : isom (isom/iso2/avc1/mp41)
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible                       : isom/iso2/avc1/mp41
File size                                : 240117367
File size                                : 229 MiB
File size                                : 229 MiB
File size                                : 229 MiB
File size                                : 229 MiB
File size                                : 229.0 MiB
Duration                                 : 84091
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 91 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.091
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.091 (00:01:24;02)
Overall bit rate                         : 22843573
Overall bit rate                         : 22.8 Mb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Frame count                              : 2520
Stream size                              : 53880
Stream size                              : 52.6 KiB (0%)
Stream size                              : 53 KiB
Stream size                              : 53 KiB
Stream size                              : 52.6 KiB
Stream size                              : 52.62 KiB
Stream size                              : 52.6 KiB (0%)
Proportion of this stream                : 0.00022
HeaderSize                               : 40
DataSize                                 : 240063495
FooterSize                               : 53832
IsStreamable                             : No
File last modification date              : UTC 2023-02-05 20:35:02
File last modification date (local)      : 2023-02-05 12:35:02
Writing application                      : Lavf58.76.100
Writing application                      : Lavf58.76.100

Video
Count                                    : 380
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4.1
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 3
Format settings, Reference frames        : 3 frames
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 84084
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 84 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.084
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.084 (00:01:24;02)
Bit rate                                 : 22750000
Bit rate                                 : 22.8 Mb/s
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Stored_Height                            : 1088
Sampled_Width                            : 1920
Sampled_Height                           : 1080
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Rotation                                 : 0.000
Frame rate mode                          : CFR
Frame rate mode                          : Constant
Frame rate                               : 29.970
Frame rate                               : 29.970 (30000/1001) FPS
FrameRate_Num                            : 30000
FrameRate_Den                            : 1001
Frame count                              : 2520
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.366
Stream size                              : 237372415
Stream size                              : 226 MiB (99%)
Stream size                              : 226 MiB
Stream size                              : 226 MiB
Stream size                              : 226 MiB
Stream size                              : 226.4 MiB
Stream size                              : 226 MiB (99%)
Proportion of this stream                : 0.98857
Writing library                          : x264 - core 163 r3060 5db6aa6
Writing library                          : x264 core 163 r3060 5db6aa6
Encoded_Library_Name                     : x264
Encoded_Library_Version                  : core 163 r3060 5db6aa6
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=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=22750 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
colour_description_present               : Yes
colour_description_present_Source        : Container / Stream
Color range                              : Limited
colour_range_Source                      : Container / Stream
Color primaries                          : BT.709
colour_primaries_Source                  : Container / Stream
Transfer characteristics                 : BT.709
transfer_characteristics_Source          : Container / Stream
Matrix coefficients                      : BT.709
matrix_coefficients_Source               : Container / Stream
Codec configuration box                  : avcC

Audio
Count                                    : 294
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : E-AC-3
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Format/Url                               : https://en.wikipedia.org/wiki/Dolby_Digital_Plus
Commercial name                          : Dolby Digital Plus
Commercial name                          : Dolby Digital Plus
Format settings, Endianness              : Big
Internet media type                      : audio/eac3
Codec ID                                 : ec-3
Duration                                 : 84091
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 91 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.091
Duration                                 : 00:01:24:24
Duration                                 : 00:01:24.091 (00:01:24:24)
Source duration                          : 84096
Source duration                          : 1 min 24 s
Source duration                          : 1 min 24 s 96 ms
Source duration                          : 1 min 24 s
Source duration                          : 00:01:24.096
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 256000
Bit rate                                 : 256 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
Channel layout                           : L R
Samples per frame                        : 1536
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 4036368
Frame rate                               : 31.250
Frame rate                               : 31.250 FPS (1536 SPF)
Frame count                              : 2628
Source frame count                       : 2628
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 2691072
Stream size                              : 2.57 MiB (1%)
Stream size                              : 3 MiB
Stream size                              : 2.6 MiB
Stream size                              : 2.57 MiB
Stream size                              : 2.566 MiB
Stream size                              : 2.57 MiB (1%)
Proportion of this stream                : 0.01121
Source stream size                       : 2691072
Source stream size                       : 2.57 MiB (1%)
Source stream size                       : 3 MiB
Source stream size                       : 2.6 MiB
Source stream size                       : 2.57 MiB
Source stream size                       : 2.566 MiB
Source stream size                       : 2.57 MiB (1%)
Source_StreamSize_Proportion             : 0.01121
Service kind                             : CM
Service kind                             : Complete Main
Default                                  : Yes
Default                                  : Yes
Alternate group                          : 1
Alternate group                          : 1
mdhd_Duration                            : 84091
bsid                                     : 16
Dialog Normalization                     : -31
Dialog Normalization                     : -31 dB
dsurmod                                  : 0
acmod                                    : 2
lfeon                                    : 0
dialnorm_Average                         : -31
dialnorm_Average                         : -31 dB
dialnorm_Minimum                         : -31
dialnorm_Minimum                         : -31 dB
dialnorm_Maximum                         : -31
dialnorm_Maximum                         : -31 dB
dialnorm_Count                           : 32
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 20:53:07
Setting up that work flow was considerably less painful than I thought it would be. I guess I'll know tomorrow if this flow works. The only FOSS muxer I could find is tsMuxeR and the GUI is deprecated because of GTK 32 bit not supported. It supports chapters so I can scan through the setlist but there's no menus AFAIK. Menu won't matter if I'm doing one pass render and filling the whole disk with high bit rate noisy video anyway, but a better muxer with some nice menus etc would go a long way toward reassuring customers.

For quality media I'll probably have to export lossless and use two pass encoding, but for this particular gear (Zoom Q2N and iPhone) I don't think the native quality of the video justifies the hassle. It's definitely superior to DVD resolution and my iPhone will do 4K if I am feeling masochistic.

Okay now I'll try rendering, muxing, and burning a full HD disc and let you know if I've got a coaster or a video.

So to summarize, one-pass ABR render, EAC3 audio seems to be the trick. Hopefully it plays okay.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Markuza97 on 2023-02-05 21:15:44
That can be a bit expensive for some people to just give out flash drives.  Especially considering the cost per disc vs cost per flash drive.

Yes, the disc itself is cheaper, but you can't just give away the disc, it needs to be inside the case.
If you include cheap jewel case in the price the cost is around the same.

Also, you can only burn one disc at a time. With USB flash drive, you can use USB hub to transfer to multiple drives at the same time.
Set and forget, no interactions necessary.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 21:16:17
ac3, ac3_fixed, and eac3 all played back.

dts didn't add a bitstream.

ffmpeg documentation doesn't mention eac3.

Which ac3 should I use for blu-ray? Are any of them compatible? I'm trying to make sure this disc works on any blu-ray if possible. Compatibility is more important than quality for a first cut.

Thanks.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-05 21:17:22
That can be a bit expensive for some people to just give out flash drives.  Especially considering the cost per disc vs cost per flash drive.

Yes, the disc itself is cheaper, but you can't just give away the disc, it needs to be inside the case.
If you include cheap jewel case in the price the cost is around the same.

Also, you can only burn one disc at a time. With USB flash drive, you can use USB hub to transfer to multiple drives at the same time.
Set and forget, no interactions necessary.

Nowhere near automation at this point. I'm just learning to walk. Thanks for the pointers.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Chibisteven on 2023-02-05 23:41:23
If you include cheap jewel case in the price the cost is around the same.
https://www.amazon.com/Maxtek-Standard-Single-Clear-Assembled/dp/B00TL1CXCM/ref=sr_1_5?keywords=cd+cases&sr=8-5
https://www.amazon.com/Maxtek-Ultra-5-2mm-Clear-Jewel/dp/B01G4A8OYI/ref=sr_1_9?keywords=cd+cases&sr=8-9

Also, you can only burn one disc at a time. With USB flash drive, you can use USB hub to transfer to multiple drives at the same time.
How many discs do you need to give a single client?  If one has multiple burners and a decent computer it's possible to do more than one disc at a time.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Aleron Ives on 2023-02-06 00:37:46
AC3 is a mandatory codec, whereas EAC3 is optional, so it's possible some old players won't support EAC3.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-06 02:44:28
AC3 is a mandatory codec, whereas EAC3 is optional, so it's possible some old players won't support EAC3.

Thanks for that tip. I guess I'll let the second render complete before I try burning. At this speed it's going to be a full day.

I just noticed that the DTS profile I created was wrong. The encoder is dca, not dts. I'm trying it again on a small render to see if it works.

What is the difference between ac3 and ac3_fixed? Should I prefer one or the other for blu-ray?
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Octocontrabass on 2023-02-06 19:46:54
Blu-ray has some really weird restrictions on the encoded bitstream; just putting the video into an MP4 file can cause incompatibility even if you do everything else correctly. If you want to be sure your disc will play correctly on the greatest number of Blu-ray players, you have to use x264 by itself to produce a raw H.264 bitstream separately from the audio and then combine them with your muxer.

There used to be a website that included complete x264 command lines for Blu-ray encoding; you can still read an archived copy (https://web.archive.org/web/20211020064238/http://www.x264bluray.com/).

FFmpeg can output PCM, you just need to select the bit layout when you specify the codec. For example, "pcm_s16le" will give you 16-bit PCM suitable for WAV files (which you can then feed to your muxer). When working with PCM, you'll probably want to use WAV files instead of raw PCM.

The difference between "ac3" and "ac3_fixed" is that "ac3" uses your CPU's floating-point math capabilities and "ac3_fixed" does not. Either one will work equally well for you (though I'm not sure how good FFmpeg's AC3 encoder is).
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Aleron Ives on 2023-02-06 21:38:56
It's OK if you use 320 kbps for stereo. If you use 192 kbps like you would find on a DVD, it's not great IIRC, and LAME MP3 outperforms it. It's still better than ffmpeg's AAC encoders, which are hot garbage (unless you compile ffmpeg yourself with FDK AAC).
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-07 22:08:28
The 'bluray compatible' iso I generated yesterday is 300M too large and it won't play on mplayer. VLC plays it but doesn't find an audio stream. Mediainfo doesn't find an audio stream either.

I downloaded a newer version of tsMuxeR. It won't generate an ISO. The newer version of tsMuxer generated an ISO and it plays on VLC but not mplayer and ffprobe says the ISO is broken:

media1@media1-AX370-Gaming-5:/raw/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/tsmuxer$ ffprobe The\ Hummers\ at\ The\ Pioneer\ Saloon\ 2019-11-08\ v2\ ac3.iso
ffprobe version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
...
[mpeg @ 0x56038486cd40] Format mpeg detected only with low score of 25, misdetection possible!
[NULL @ 0x56038486ea40] SEI type 112 size 920 truncated at 256
[h264 @ 0x56038486ea40] SEI type 112 size 920 truncated at 240
[h264 @ 0x56038486ea40] error while decoding MB 44 6, bytestream -40
[h264 @ 0x56038486ea40] concealing 7445 DC, 7445 AC, 7445 MV errors in I frame
[mpeg @ 0x56038486cd40] pes_ext D6 is invalid
[mp2 @ 0x560384994980] Header missing
    Last message repeated 13 times
[mpeg @ 0x56038486cd40] pes_ext DB is invalid
[mp2 @ 0x560384b34740] Header missing
    Last message repeated 2 times
[mpeg @ 0x56038486cd40] pes_ext DB is invalid
[mp2 @ 0x560384b34740] Header missing
    Last message repeated 2 times
[mpeg @ 0x56038486cd40] decoding for stream 1 failed
[mpeg @ 0x56038486cd40] decoding for stream 2 failed
[mpeg @ 0x56038486cd40] start time for stream 1 is not set in estimate_timings_from_pts
[mpeg @ 0x56038486cd40] start time for stream 2 is not set in estimate_timings_from_pts
[mpeg @ 0x56038486cd40] stream 1 : no TS found at start of file, duration not set
[mpeg @ 0x56038486cd40] stream 2 : no TS found at start of file, duration not set
[mpeg @ 0x56038486cd40] Could not find codec parameters for stream 1 (Audio: mp2, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpeg @ 0x56038486cd40] Could not find codec parameters for stream 2 (Audio: mp2, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpeg, from 'The Hummers at The Pioneer Saloon 2019-11-08 v2 ac3.iso':
  Duration: 02:18:53.22, start: 600.000000, bitrate: 24304 kb/s
  Stream #0:0[0x1e0]: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
  Stream #0:1[0x1da]: Audio: mp2, 0 channels, s16p
  Stream #0:2[0x1df]: Audio: mp2, 0 channels, s16p

This flow isn't working.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Octocontrabass on 2023-02-07 22:13:28
You can't play an ISO, you have to mount it (as you would if you put a physical disc in a drive) and then play its contents.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-07 23:13:26
I'll try mounting the ISO and playing it to see what happens. I've never bothered doing that before. Thanks for the suggestion.

I've managed to play an ISO before without mounting it, but it was always a ripped DVD from K3B with libdvdcss and I haven't done that for many years. It played the AV fine on mplayer (or was it mpv?) as long as I told it which streams to pick on the command line when there was more than one of each type. VLC also used to pick out the titles and chapters of an unmounted DVD iso back then, but everything has changed over the past decade so who knows what these tools do with an iso today. Handbrake and MythTV also changed drastically plus now there's Plex and Kodi and I'm way behind.

I'm temporarily diverting to the following plan: I'll use KDENLive nvenc hardware to generate an mp4 that will fit on a dual layer DVD and see how it looks/sounds. I won't try to make it a standard-compliant DVD because that will lose too much resolution with devede transcoding it to SD. The hardware render time is half what software takes on this machine.

I'll see if the current tsMuxerGUI builds a DVD ISO with chapters that plays on my Sony 4K bluray player. If not, maybe it will play without chapters.

Here are the profiles I've queued up for rendering:

'averaged bit rate'


'constant quantization'


I'm also considering rendering lossless from KDENLive and using x264 plus whatever audio encoder and muxer to build the bluray since that was recommended. I've installed x264 but haven't tried it yet. I don't know what to use for the audio but I'm thinking maybe sox or ffmpeg can output a compatible stream.

An intermediate step might be to render lossless directly to mkv and see if it plays from an ISO with chapters. There are a few lossless/HQ profiles available that are output in MKV container. Here's the available profiles:

mp4 (I think, it doesn't specify)


Here's the mediainfo. This is high quality at 10mbps? but it looks okay given the limited quality of the source so maybe...and given the audio quality of this rough cut source 192 isn't much of a compromise either:

media1@media1-AX370-Gaming-5:/work/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ mediainfo -full *test3*
General
Count                                    : 331
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : AAC LC
Audio_Format_WithHint_List               : AAC LC
Audio codecs                             : AAC LC
Complete name                            : The Hummers at The Pioneer Saloon 2019-11-08 v2 test3.mp4
File name extension                      : The Hummers at The Pioneer Saloon 2019-11-08 v2 test3.mp4
File name                                : The Hummers at The Pioneer Saloon 2019-11-08 v2 test3
File extension                           : mp4
Format                                   : MPEG-4
Format                                   : MPEG-4
Format/Extensions usually used           : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Commercial name                          : MPEG-4
Format profile                           : Base Media
Internet media type                      : video/mp4
Codec ID                                 : isom
Codec ID                                 : isom (isom/iso2/avc1/mp41)
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible                       : isom/iso2/avc1/mp41
File size                                : 110891291
File size                                : 106 MiB
File size                                : 106 MiB
File size                                : 106 MiB
File size                                : 106 MiB
File size                                : 105.8 MiB
Duration                                 : 84096
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 96 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.096
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.096 (00:01:24;02)
Overall bit rate                         : 10549019
Overall bit rate                         : 10.5 Mb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Frame count                              : 2520
Stream size                              : 93963
Stream size                              : 91.8 KiB (0%)
Stream size                              : 92 KiB
Stream size                              : 92 KiB
Stream size                              : 91.8 KiB
Stream size                              : 91.76 KiB
Stream size                              : 91.8 KiB (0%)
Proportion of this stream                : 0.00085
HeaderSize                               : 93618
DataSize                                 : 110797673
FooterSize                               : 0
IsStreamable                             : Yes
File last modification date              : UTC 2023-02-07 21:22:18
File last modification date (local)      : 2023-02-07 13:22:18
Writing application                      : Lavf58.76.100
Writing application                      : Lavf58.76.100

Video
Count                                    : 380
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4
Format settings, Reference frames        : 4 frames
Format settings, GOP                     : M=4, N=15
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 84084
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 84 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.084
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.084 (00:01:24;02)
Bit rate                                 : 10349009
Bit rate                                 : 10.3 Mb/s
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Stored_Height                            : 1088
Sampled_Width                            : 1920
Sampled_Height                           : 1080
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Rotation                                 : 0.000
Frame rate mode                          : CFR
Frame rate mode                          : Constant
FrameRate_Mode_Original                  : VFR
Frame rate                               : 29.970
Frame rate                               : 29.970 (30000/1001) FPS
FrameRate_Num                            : 30000
FrameRate_Den                            : 1001
Frame count                              : 2520
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.167
Stream size                              : 108773262
Stream size                              : 104 MiB (98%)
Stream size                              : 104 MiB
Stream size                              : 104 MiB
Stream size                              : 104 MiB
Stream size                              : 103.7 MiB
Stream size                              : 104 MiB (98%)
Proportion of this stream                : 0.98090
Writing library                          : x264 - core 163 r3060 5db6aa6
Writing library                          : x264 core 163 r3060 5db6aa6
Encoded_Library_Name                     : x264
Encoded_Library_Version                  : core 163 r3060 5db6aa6
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=4 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=2 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=15 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=15 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
colour_description_present               : Yes
colour_description_present_Source        : Container / Stream
Color range                              : Limited
colour_range_Source                      : Container / Stream
Color primaries                          : BT.709
colour_primaries_Source                  : Container / Stream
Transfer characteristics                 : BT.709
transfer_characteristics_Source          : Container / Stream
Matrix coefficients                      : BT.709
matrix_coefficients_Source               : Container / Stream
Codec configuration box                  : avcC

Audio
Count                                    : 283
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : AAC
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Commercial name                          : AAC
Format settings, SBR                     : No (Explicit)
Format settings, SBR                     : No (Explicit)
Format_AdditionalFeatures                : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 84096
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 96 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.096
Duration                                 : 00:01:23:41
Duration                                 : 00:01:24.096 (00:01:23:41)
Source duration                          : 84117
Source duration                          : 1 min 24 s
Source duration                          : 1 min 24 s 117 ms
Source duration                          : 1 min 24 s
Source duration                          : 00:01:24.117
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 192000
Bit rate                                 : 192 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
Channel layout                           : L R
Samples per frame                        : 1024
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 4036608
Frame rate                               : 46.875
Frame rate                               : 46.875 FPS (1024 SPF)
Frame count                              : 3942
Source frame count                       : 3943
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 2024066
Stream size                              : 1.93 MiB (2%)
Stream size                              : 2 MiB
Stream size                              : 1.9 MiB
Stream size                              : 1.93 MiB
Stream size                              : 1.930 MiB
Stream size                              : 1.93 MiB (2%)
Proportion of this stream                : 0.01825
Source stream size                       : 2024403
Source stream size                       : 1.93 MiB (2%)
Source stream size                       : 2 MiB
Source stream size                       : 1.9 MiB
Source stream size                       : 1.93 MiB
Source stream size                       : 1.931 MiB
Source stream size                       : 1.93 MiB (2%)
Source_StreamSize_Proportion             : 0.01826
Default                                  : Yes
Default                                  : Yes
Alternate group                          : 1
Alternate group                          : 1
Source_Delay                             : -21
Source_Delay_Source                      : Container
mdhd_Duration                            : 84096

Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-07 23:17:45
Here's the mkv lossless option #1:



media1@media1-AX370-Gaming-5:/work/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ mediainfo -full *test4*
General
Count                                    : 332
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Unique ID                                : 12558844731976437757933790006181364287
Unique ID                                : 12558844731976437757933790006181364287 (0x972BED9FB12A26BAB031DCA7714023F)
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : FFV1
Video_Format_WithHint_List               : FFV1
Codecs Video                             : FFV1
Audio_Format_List                        : FLAC
Audio_Format_WithHint_List               : FLAC
Audio codecs                             : FLAC
Complete name                            : The Hummers at The Pioneer Saloon 2019-11-08 v2 test4.mkv
File name extension                      : The Hummers at The Pioneer Saloon 2019-11-08 v2 test4.mkv
File name                                : The Hummers at The Pioneer Saloon 2019-11-08 v2 test4
File extension                           : mkv
Format                                   : Matroska
Format                                   : Matroska
Format/Url                               : https://matroska.org/downloads/windows.html
Format/Extensions usually used           : mkv mk3d mka mks
Commercial name                          : Matroska
Format version                           : Version 4
File size                                : 2821083553
File size                                : 2.63 GiB
File size                                : 3 GiB
File size                                : 2.6 GiB
File size                                : 2.63 GiB
File size                                : 2.627 GiB
Duration                                 : 84096
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 96 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.096
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.096 (00:01:24;02)
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
Overall bit rate                         : 268367918
Overall bit rate                         : 268 Mb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Frame count                              : 2520
IsStreamable                             : Yes
File last modification date              : UTC 2023-02-07 21:32:19
File last modification date (local)      : 2023-02-07 13:32:19
Writing application                      : Lavf58.76.100
Writing application                      : Lavf58.76.100
Writing library                          : Lavf58.76.100
Writing library                          : Lavf58.76.100
ErrorDetectionType                       : Per level 1

Video
Count                                    : 382
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Unique ID                                : 12053529132077121923
Format                                   : FFV1
Format                                   : FFV1
Commercial name                          : FFV1
Format version                           : Version 3.4
Format settings, GOP                     : N=1
Codec ID                                 : V_MS/VFW/FOURCC / FFV1
Codec ID/Url                             : http://ffdshow-tryout.sourceforge.net/
Duration                                 : 84084.000000
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 84 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.084
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.084 (00:01:24;02)
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Frame rate mode                          : CFR
Frame rate mode                          : Constant
Frame rate                               : 29.970
Frame rate                               : 29.970 (30000/1001) FPS
FrameRate_Num                            : 30000
FrameRate_Den                            : 1001
Frame count                              : 2520
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Chroma subsampling                       : 4:2:2
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Compression mode                         : Lossless
Compression mode                         : Lossless
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
colour_description_present               : Yes
colour_description_present_Source        : Container
Color primaries                          : BT.709
colour_primaries_Source                  : Container
Transfer characteristics                 : BT.709
transfer_characteristics_Source          : Container
Matrix coefficients                      : BT.709
matrix_coefficients_Source               : Container
coder_type                               : Range Coder
MaxSlicesCount                           : 4
ErrorDetectionType                       : Per slice

Audio
Count                                    : 280
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Unique ID                                : 13908075726725776243
Format                                   : FLAC
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Format/Url                               : https://xiph.org/flac/
Commercial name                          : FLAC
Internet media type                      : audio/x-flac
Codec ID                                 : A_FLAC
Codec ID/Url                             : https://xiph.org/flac
Duration                                 : 84096.000000
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 96 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.096
Duration                                 : 00:01:24.096
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
Channel layout                           : L R
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 4036608
Bit depth                                : 16
Bit depth                                : 16 bits
Compression mode                         : Lossless
Compression mode                         : Lossless
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Delay relative to video                  : 0
Delay relative to video                  : 00:00:00.000
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-07 23:19:56
Option 2:



media1@media1-AX370-Gaming-5:/work/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ mediainfo -full *test5*
General
Count                                    : 332
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Unique ID                                : 105665543791185319453506538032902798421
Unique ID                                : 105665543791185319453506538032902798421 (0x4F7E7188699D7157EBF71D71CAB97C55)
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : HuffYUV
Video_Format_WithHint_List               : HuffYUV
Codecs Video                             : HuffYUV
Audio_Format_List                        : FLAC
Audio_Format_WithHint_List               : FLAC
Audio codecs                             : FLAC
Complete name                            : The Hummers at The Pioneer Saloon 2019-11-08 v2 test5.mkv
File name extension                      : The Hummers at The Pioneer Saloon 2019-11-08 v2 test5.mkv
File name                                : The Hummers at The Pioneer Saloon 2019-11-08 v2 test5
File extension                           : mkv
Format                                   : Matroska
Format                                   : Matroska
Format/Url                               : https://matroska.org/downloads/windows.html
Format/Extensions usually used           : mkv mk3d mka mks
Commercial name                          : Matroska
Format version                           : Version 4
File size                                : 4413922524
File size                                : 4.11 GiB
File size                                : 4 GiB
File size                                : 4.1 GiB
File size                                : 4.11 GiB
File size                                : 4.111 GiB
Duration                                 : 84096
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 96 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.096
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.096 (00:01:24;02)
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
Overall bit rate                         : 419893695
Overall bit rate                         : 420 Mb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Frame count                              : 2520
IsStreamable                             : Yes
File last modification date              : UTC 2023-02-07 21:40:29
File last modification date (local)      : 2023-02-07 13:40:29
Writing application                      : Lavf58.76.100
Writing application                      : Lavf58.76.100
Writing library                          : Lavf58.76.100
Writing library                          : Lavf58.76.100
ErrorDetectionType                       : Per level 1

Video
Count                                    : 379
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Unique ID                                : 12127814952872797159
Format                                   : HuffYUV
Format                                   : HuffYUV
Commercial name                          : HuffYUV
Format version                           : Version 2
Codec ID                                 : V_MS/VFW/FOURCC / HFYU
Duration                                 : 84084.000000
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 84 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.084
Duration                                 : 00:01:24;02
Duration                                 : 00:01:24.084 (00:01:24;02)
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Frame rate mode                          : CFR
Frame rate mode                          : Constant
Frame rate                               : 29.970
Frame rate                               : 29.970 (30000/1001) FPS
FrameRate_Num                            : 30000
FrameRate_Den                            : 1001
Frame count                              : 2520
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Chroma subsampling                       : 4:2:2
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
colour_description_present               : Yes
colour_description_present_Source        : Container
Color primaries                          : BT.709
colour_primaries_Source                  : Container
Transfer characteristics                 : BT.709
transfer_characteristics_Source          : Container
Matrix coefficients                      : BT.709
matrix_coefficients_Source               : Container

Audio
Count                                    : 280
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Unique ID                                : 8218914016987475953
Format                                   : FLAC
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Format/Url                               : https://xiph.org/flac/
Commercial name                          : FLAC
Internet media type                      : audio/x-flac
Codec ID                                 : A_FLAC
Codec ID/Url                             : https://xiph.org/flac
Duration                                 : 84096.000000
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 96 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.096
Duration                                 : 00:01:24.096
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
Channel layout                           : L R
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 4036608
Bit depth                                : 16
Bit depth                                : 16 bits
Compression mode                         : Lossless
Compression mode                         : Lossless
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Delay relative to video                  : 0
Delay relative to video                  : 00:00:00.000
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-07 23:21:45
Option 3:



media1@media1-AX370-Gaming-5:/work/media/music/amateur/Hummers, The/2019-11-08 at The Pioneer Saloon/kdenlive$ mediainfo -full *test6*
General
Count                                    : 332
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Unique ID                                : 112610078017323050592941025793020909493
Unique ID                                : 112610078017323050592941025793020909493 (0x54B7E9814EDD84677E4FB822B2FDD7B5)
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : Vorbis
Audio_Format_WithHint_List               : Vorbis
Audio codecs                             : Vorbis
Complete name                            : The Hummers at The Pioneer Saloon 2019-11-08 v2 test6.mkv
File name extension                      : The Hummers at The Pioneer Saloon 2019-11-08 v2 test6.mkv
File name                                : The Hummers at The Pioneer Saloon 2019-11-08 v2 test6
File extension                           : mkv
Format                                   : Matroska
Format                                   : Matroska
Format/Url                               : https://matroska.org/downloads/windows.html
Format/Extensions usually used           : mkv mk3d mka mks
Commercial name                          : Matroska
Format version                           : Version 4
File size                                : 89066915
File size                                : 84.9 MiB
File size                                : 85 MiB
File size                                : 85 MiB
File size                                : 84.9 MiB
File size                                : 84.94 MiB
Duration                                 : 84087
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 87 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.087
Duration                                 : 00:01:24.087
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
Overall bit rate                         : 8473787
Overall bit rate                         : 8 474 kb/s
Stream size                              : 1773215
Stream size                              : 1.69 MiB (2%)
Stream size                              : 2 MiB
Stream size                              : 1.7 MiB
Stream size                              : 1.69 MiB
Stream size                              : 1.691 MiB
Stream size                              : 1.69 MiB (2%)
Proportion of this stream                : 0.01991
IsStreamable                             : Yes
File last modification date              : UTC 2023-02-07 21:50:04
File last modification date (local)      : 2023-02-07 13:50:04
Writing application                      : Lavf58.76.100
Writing application                      : Lavf58.76.100
Writing library                          : Lavf58.76.100
Writing library                          : Lavf58.76.100
ErrorDetectionType                       : Per level 1

Video
Count                                    : 379
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Unique ID                                : 4672572663950831873
Format                                   : AVC
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4
Format settings, Reference frames        : 4 frames
Internet media type                      : video/H264
Codec ID                                 : V_MPEG4/ISO/AVC
Codec ID/Url                             : http://ffdshow-tryout.sourceforge.net/
Duration                                 : 84087.000000
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 87 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.087
Duration                                 : 00:01:24.087
Bit rate                                 : 8193159
Bit rate                                 : 8 193 kb/s
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Stored_Height                            : 1088
Sampled_Width                            : 1920
Sampled_Height                           : 1080
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Frame rate mode                          : VFR
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Stream size                              : 86117266
Stream size                              : 82.1 MiB (97%)
Stream size                              : 82 MiB
Stream size                              : 82 MiB
Stream size                              : 82.1 MiB
Stream size                              : 82.13 MiB
Stream size                              : 82.1 MiB (97%)
Proportion of this stream                : 0.96688
Writing library                          : x264 - core 163 r3060 5db6aa6
Writing library                          : x264 core 163 r3060 5db6aa6
Encoded_Library_Name                     : x264
Encoded_Library_Version                  : core 163 r3060 5db6aa6
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=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=2 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
colour_description_present               : Yes
colour_description_present_Source        : Container / Stream
Color range                              : Limited
colour_range_Source                      : Stream
Color primaries                          : BT.709
colour_primaries_Source                  : Container / Stream
Transfer characteristics                 : BT.709
transfer_characteristics_Source          : Container / Stream
Matrix coefficients                      : BT.709
matrix_coefficients_Source               : Container / Stream

Audio
Count                                    : 280
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Unique ID                                : 13103393856192730291
Format                                   : Vorbis
Format                                   : Vorbis
Format/Url                               : http://www.vorbis.com/
Commercial name                          : Vorbis
Format settings, Floor                   : 1
Internet media type                      : audio/vorbis
Codec ID                                 : A_VORBIS
Codec ID/Url                             : http://www.vorbis.com
Duration                                 : 84031.000000
Duration                                 : 1 min 24 s
Duration                                 : 1 min 24 s 31 ms
Duration                                 : 1 min 24 s
Duration                                 : 00:01:24.031
Duration                                 : 00:01:24.031
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Bit rate                                 : 112000
Bit rate                                 : 112 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 4033488
Compression mode                         : Lossy
Compression mode                         : Lossy
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay, origin                            : Container
Delay, origin                            : Container
Delay relative to video                  : 0
Delay relative to video                  : 00:00:00.000
Stream size                              : 1176434
Stream size                              : 1.12 MiB (1%)
Stream size                              : 1 MiB
Stream size                              : 1.1 MiB
Stream size                              : 1.12 MiB
Stream size                              : 1.122 MiB
Stream size                              : 1.12 MiB (1%)
Proportion of this stream                : 0.01321
Writing application                      : Lavc58.134.100
Writing application                      : Lavc58.134.100
Writing library                          : Xiph.Org libVorbis I 20200704 (Reducing Environment)
Writing library                          : libVorbis (Reducing Environment) (20200704 (Reducing Environment))
Encoded_Library_Name                     : libVorbis
Encoded_Library_Version                  : (Reducing Environment)
Encoded_Library_Date                     : 20200704 (Reducing Environment)
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-07 23:25:30
Any idea which of these is most likely to transcode with x264? Any idea which audio encoder/frontend to use? Muxer?

It's looking like with the state of these free tools I'm probably doing mkv and hoping my client's older bluray will play it. My Sony 4K will probably handle some mkv but his, I don't know, I don't think his is 4K because he said it's several years old.

Now for mounting that ISO and trying it again...
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-08 00:12:03
Blu-ray has some really weird restrictions on the encoded bitstream; just putting the video into an MP4 file can cause incompatibility even if you do everything else correctly. If you want to be sure your disc will play correctly on the greatest number of Blu-ray players, you have to use x264 by itself to produce a raw H.264 bitstream separately from the audio and then combine them with your muxer.

There used to be a website that included complete x264 command lines for Blu-ray encoding; you can still read an archived copy (https://web.archive.org/web/20211020064238/http://www.x264bluray.com/).

FFmpeg can output PCM, you just need to select the bit layout when you specify the codec. For example, "pcm_s16le" will give you 16-bit PCM suitable for WAV files (which you can then feed to your muxer). When working with PCM, you'll probably want to use WAV files instead of raw PCM.

The difference between "ac3" and "ac3_fixed" is that "ac3" uses your CPU's floating-point math capabilities and "ac3_fixed" does not. Either one will work equally well for you (though I'm not sure how good FFmpeg's AC3 encoder is).

Thanks so much for this, it's the most comprehensive guide I've seen yet. Funny it's on the Wayback, like an echo of the past, and it's also navigable so somebody thought ahead.

I'll read there and try building a workflow again before posting more questions.

But...it would really help to know if any of the bitstreams that KDENLive generates are appropriate as a starting point for x264, plus which encoder/frontend to use if I can't use the format from KDENLive. I suppose it's a lot easier to transcode audio after rendering so what I really need to know is which format to use, I'm assuming I want AC3 and can extract it with ffmpeg or just about any demuxer from the existing render at 448kbps. Hopefully I don't need to align the timing to the video. I don't seem to have any issues with the existing output but I didn't check to see if there's an offset added automatically.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Octocontrabass on 2023-02-08 00:18:35
Any idea which of these is most likely to transcode with x264?
It uses the same decoders as ffmpeg, so it should handle all three equally well. However, I notice two of the three have 4:2:2 chroma subsampling, which is incorrect for Blu-ray. As far as I recall, x264 can fix this by itself, but your temporary lossless files will be smaller if you configure Kdenlive to output 4:2:0.

Any idea which audio encoder/frontend to use?
You can configure Kdenlive to render an audio-only file. AC3 with a reasonably high bitrate (320kbps?) should be fine for stereo audio. If you (or your potential future customers) are feeling paranoid, you can use uncompressed 16-bit 48kHz PCM instead, but that's a bit more work since your muxer won't be able to automatically detect what kind of audio it is.

Muxer?
Whatever you use to turn the encoded video and audio into a Blu-ray. You're using tsMuxer, but in theory you could switch to something else without changing the rest of your process.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-08 00:37:17
Then there's this:

"Once again - AC-3 official for DVD Video is 448kbps however all Dolby decoders must decode 512kbps and 640kbps - this is part of the Dolby conformance testing so 448kbps may be seen as soft requirement not hard requirement - authoring software of course can be more or less picky on this."

https://forum.videohelp.com/threads/386092-Encoding-audio-in-DTS-in-multi-channels-with-ffmpeg#post2625252

I suppose some guide as to which bitrates actually work is also going to be helpful. I was assuming there's no limit aside from the top end in the spec, but apparently it's not continuously variable.

Maybe there's some limit on the video bit rate choices too?
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: Octocontrabass on 2023-02-08 01:19:06
I suppose some guide as to which bitrates actually work is also going to be helpful. I was assuming there's no limit aside from the top end in the spec, but apparently it's not continuously variable.
The available AC3 bitrates are 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, and 640 kbps. All of these should work on Blu-ray.

Maybe there's some limit on the video bit rate choices too?
There's no limit other than the upper limit of 40Mbps.
Title: Re: Blu-Ray and DVD Authoring on Ubuntu Linux using only FOSS
Post by: CherylJosie on 2023-02-08 04:45:09
Thanks so much.

You're a gold mine of information.