Credit Andrew - add additional 16x9 formats for bluray creation; add additional value...
authorGood Guy <[email protected]>
Fri, 19 Jan 2024 00:06:17 +0000 (17:06 -0700)
committerGood Guy <[email protected]>
Fri, 19 Jan 2024 00:06:17 +0000 (17:06 -0700)
cinelerra-5.1/bld.sh
cinelerra-5.1/cinelerra/bdcreate.C
cinelerra-5.1/cinelerra/filedv.C
cinelerra-5.1/cinelerra/filedv.h

index 7c8837bfbf9a6b4443f93c38c35299aad8851b4d..4684fbb0460d3257d59dab7a2905344005d672d5 100755 (executable)
@@ -1,4 +1,8 @@
 #!/bin/bash
+#  IMPORTANT comments below to change the configure line
+# For python version 12, add --without-lv2
+# For newer operating system versions, add --enable-libsvtav1
+# For really old versions, such as ubuntu 16, add --enable-libaom=no
 ( ./autogen.sh
   ./configure --with-single-user --with-booby
   make && make install ) 2>&1 | tee log
index 2a9de6851f5fe041a93e5e352c030bd1caa98ef2..7305d4e960b6bec0d8aeccc070f791679109c422 100644 (file)
@@ -80,10 +80,10 @@ static struct bd_format {
        { "1920x1080 25i",      1920,1080, 25.,    1, ILACE_MODE_TOP_FIRST },
        { "1920x1080 25p*",     1920,1080, 25.,    1, ILACE_MODE_FAKE_INTERLACE },
        { "1920x1080 23.976p",  1920,1080, 23.976, 1, ILACE_MODE_NOTINTERLACED },
-       { "1440x1080 29.97i",   1440,1080, 29.97, -1, ILACE_MODE_TOP_FIRST },
-       { "1440x1080 25i",      1440,1080, 25.,   -1, ILACE_MODE_TOP_FIRST },
-       { "1440x1080 24p",      1440,1080, 24.,   -1, ILACE_MODE_NOTINTERLACED },
-       { "1440x1080 23.976p",  1440,1080, 23.976,-1, ILACE_MODE_NOTINTERLACED },
+       { "1440x1080 29.97i",   1440,1080, 29.97,  1, ILACE_MODE_TOP_FIRST },
+       { "1440x1080 25i",      1440,1080, 25.,    1, ILACE_MODE_TOP_FIRST },
+       { "1440x1080 24p",      1440,1080, 24.,    1, ILACE_MODE_NOTINTERLACED },
+       { "1440x1080 23.976p",  1440,1080, 23.976, 1, ILACE_MODE_NOTINTERLACED },
        { "1280x720  59.94p",   1280,720,  59.94,  1, ILACE_MODE_NOTINTERLACED },
        { "1280x720  50p",      1280,720,  50.,    1, ILACE_MODE_NOTINTERLACED },
        { "1280x720  29.97p*",  1280,720,  29.97,  1, ILACE_MODE_NOTINTERLACED },
@@ -92,8 +92,13 @@ static struct bd_format {
        { "1280x720  23.976p",  1280,720,  23.976, 1, ILACE_MODE_NOTINTERLACED },
        { "720x576   25i",       720,576,  25.,    0, ILACE_MODE_BOTTOM_FIRST },
        { "720x576   25p*",      720,576,  25.,    0, ILACE_MODE_NOTINTERLACED },
+       { "720x576(w)   25i",    720,576,  25.,    1, ILACE_MODE_BOTTOM_FIRST },
+       { "720x576(w)   25p*",   720,576,  25.,    1, ILACE_MODE_NOTINTERLACED },
        { "720x480   29.97i",    720,480,  29.97,  0, ILACE_MODE_BOTTOM_FIRST },
        { "720x480   29.97p*",   720,480,  29.97,  0, ILACE_MODE_NOTINTERLACED },
+       { "720x480(w)   29.97i",         720,480,  29.97,  1, ILACE_MODE_BOTTOM_FIRST },
+       { "720x480(w)   29.97p*",        720,480,  29.97,  1, ILACE_MODE_NOTINTERLACED },
+
 };
 
 static struct bd_profile {
@@ -427,6 +432,13 @@ int CreateBD_Thread::create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char
        FFMPEG::set_option_path(option_path, "video/%s", asset->vcodec);
        FFMPEG::load_options(option_path, asset->ff_video_options,
                 sizeof(asset->ff_video_options));
+       if(session->aspect_w == 16) {
+       char aspect_line[100];
+       float par = (float)((float)asset->width / (float)asset->height);
+       sprintf(aspect_line, "aspect=%f\n", asset->aspect_ratio/par);
+       strcat(asset->ff_video_options, aspect_line);
+       //printf("Aspect line: %s par: %f width: %i height: %i\n ", aspect_line, par, asset->width, asset->height);
+       }
        asset->ff_video_bitrate = vid_bitrate;
        asset->ff_video_quality = -1;
        return 0;
@@ -1146,7 +1158,7 @@ int CreateBD_FormatItem::handle_event()
        popup->set_text(text);
        int n = strlen(text)-1;
        int not_standard = n >= 0 && text[n] == '*' ? 1 : 0;
-       popup->gui->non_standard->update(not_standard ? _("* non-standard format") : "", 0);
+       popup->gui->non_standard->update(not_standard ? _("                * non-standard format") : "", 0);
        return popup->handle_event();
 }
 
index cf8bc1bf074dd673cfdc6036c34b1794d04062b0..14ddbf743a66b793e21bd0230af87ce5c4d70ac0 100644 (file)
@@ -229,9 +229,9 @@ TRACE("FileDV::open_file 20")
                encoder->isPAL = isPAL;
                output_size = (isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE);
 
-               // Compare to 16 / 8 rather than == 16 / 9 in case of floating point
-               // rounding errors
-               encoder->is16x9 = asset->aspect_ratio > 16 / 8;
+               //printf("filedv aspect- %f \n", asset->aspect_ratio);
+               if(1.777778 - asset->aspect_ratio < 0.001f)
+               encoder->is16x9 = 1;
        }
        else
        {
@@ -602,6 +602,7 @@ UNTRACE
 int FileDV::write_frames(VFrame ***frames, int len)
 {
        int result = 0;
+       time_t now = time(NULL); 
 
        if(stream == 0) return 1;
 
@@ -619,11 +620,15 @@ int FileDV::write_frames(VFrame ***frames, int len)
 //printf("FileDV::write_frames: 4\n");
                                        dv_encode_full_frame(encoder, temp_frame->get_rows(),
                                                e_dv_color_yuv, video_buffer);
+                                       dv_encode_metadata(video_buffer, encoder->isPAL, encoder->is16x9, &now, 0);
+                                       dv_encode_timecode(video_buffer, encoder->isPAL, 0);
                                        break;
                                case BC_RGB888:
 //printf("FileDV::write_frames: 5\n");
                                        dv_encode_full_frame(encoder, temp_frame->get_rows(),
                                                e_dv_color_rgb, video_buffer);
+                                       dv_encode_metadata(video_buffer, encoder->isPAL, encoder->is16x9, &now, 0);
+                                       dv_encode_timecode(video_buffer, encoder->isPAL, 0);
                                        break;
                                default:
                                        unsigned char *data = new unsigned char[asset->height * asset->width * 2];
index 64e867e9fdf1b9a3401d2c82dc3d0a5bf2e0f0cb..2ae140e610dc361d6dadf84ebfefb01f49ff5c90 100644 (file)
 #include "filebase.h"
 #include "file.inc"
 
-#ifdef DV_USE_FFMPEG
-#include <avcodec.h>
-#endif
-
 #include <libdv/dv.h>