No, apparently pulldown option requres more handling: from x264.h /* Pulldown: * The correct pic_struct must be passed with each input frame. * The input timebase should be the timebase corresponding to the output framerate. This should be constant. * e.g. for 3:2 pulldown timebase should be 1001/30000 * The PTS passed with each frame must be the PTS of the frame after pulldown is applied. * Frame doubling and tripling require b_vfr_input set to zero (see H.264 Table D-1) * * Pulldown changes are not clearly defined in H.264. Therefore, it is the calling app's responsibility to manage this. */ so, no for now. I tried to see if scaling checkbox in BD creation dialog worked, but for some rason it only worked in LANG=en_EN.utf8 LANG=en_EN.utf8 LANGUAGE=ru cin Cinelerra: Could not set locale. Cinelerra Infinity - built: Nov 14 2019 14:17:05 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2019 Heroine Virtual Ltd. by Adam Williams (c) 2007-2019 cin5 derivative by W.P. Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra. FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi Mesa: User error: GL_INVALID_OPERATION in glDeleteShader Session time: 0:00:20 Cpu time: user: 0:00:03.192 sys: 0:00:01.071 LANG=ru_RU.utf8 LANGUAGE=ru cin Cinelerra Infinity - built: Nov 14 2019 14:17:05 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2019 Heroine Virtual Ltd. by Adam Williams (c) 2007-2019 cin5 derivative by W.P. Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra. FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi Device type none is not supported. Available device types: vdpau cuda vaapi opencl FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi Device type none is not supported. Available device types: vdpau cuda vaapi opencl FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi Device type none is not supported. Available device types: vdpau cuda vaapi opencl FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi AttachmentPoint::attach_virtual_plugin attempt to attach when no plugin_server. Mesa: User error: GL_INVALID_OPERATION in glDeleteShader Session time: 0:00:23 Cpu time: user: 0:00:03.833 sys: 0:00:01.340 AttachmentPoint::attach_virtual_plugin attempt to attach when no plugin_server. - apparently indicator of error? Effect itself attaches, but I can't control its parameters, and composer and resulted output are all black :( Actually, with LANG set to en_US.utf8 LANGUAGE=ru cin still run into problem Only LANG=en_US.utf8 cin with LANGUAGE unset works LANG=fr_FR.utf8 cin fails too (in this autoattach mode from bdcreate.C), same for German locale (de) sorry .... ---------- Пересланное сообщение ---------- Тема: Re2: [Cin] Blu-ray encoding again Дата: Суббота 16 ноября 2019 Отправитель: Andrew Randrianasulu <[email protected]> Получатель: "Cinelerra.GG" <[email protected]> actually, I think for current time jsut commented bluray.m2ts opts file should work.... with just struct bd_format expansion, because I don't know how to add correctly line or two inside already-read opts file (my x264-opts editing was not accepted by ffmpeg) ---------- Пересланное сообщение ---------- Тема: Re: [Cin] Blu-ray encoding again Дата: Суббота 16 ноября 2019 Отправитель: Andrew Randrianasulu <[email protected]> Получатель: "Cinelerra.GG" <[email protected]> В сообщении от Friday 15 November 2019 02:40:35 Phyllis Smith написал(а):
Andrew:
File I used for test was named 1080p25.ts and I found it ...
Thanks for this test file. I have been testing the bluray.m2ts that you provided off and on all day. Everything seems to work just fine on our bluray burner and when played on the bluray player connected to the TV. The fake-interlaced=1 parameter was quite intriguing so at least once, I was able to get a failure with the provided media when I left out this fake parameter. So I guess it really does what it says it does! So this opts file will get checked in with, as always, a few gg tweaks. Thanks, Phyllis/gg
I tried to patch bdcreate.C but while it worked I'm sure i did it wrong (and you need to fix keyint by hand anyway): cat /dev/shm/bdcreate.patch diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C index 863c5d0..fdafa5c 100644 --- a/cinelerra-5.1/cinelerra/bdcreate.C +++ b/cinelerra-5.1/cinelerra/bdcreate.C @@ -44,6 +44,7 @@ static struct bd_format { { "1920x1080 29.97p*", 1920,1080, 29.97, 1, ILACE_MODE_NOTINTERLACED }, { "1920x1080 24p", 1920,1080, 24., 1, ILACE_MODE_NOTINTERLACED }, { "1920x1080 25i", 1920,1080, 25., 1, ILACE_MODE_TOP_FIRST }, + { "1920x1080 25p", 1920,1080, 25., 1, ILACE_MODE_NOTINTERLACED }, { "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 }, @@ -51,6 +52,8 @@ static struct bd_format { { "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 }, + { "1280x720 25p", 1280,720, 25., 1, ILACE_MODE_NOTINTERLACED }, { "1280x720 24p", 1280,720, 24., 1, ILACE_MODE_NOTINTERLACED }, { "1280x720 23.976p", 1280,720, 23.976, 1, ILACE_MODE_NOTINTERLACED }, { "720x576 25i", 720,576, 25., 0, ILACE_MODE_BOTTOM_FIRST }, @@ -325,11 +328,23 @@ 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)); - const char *opts = 0; + char *opts = 0; + char *opts1 = 0; switch( asset->interlace_mode ) { case ILACE_MODE_TOP_FIRST: opts = ":tff\n"; break; case ILACE_MODE_BOTTOM_FIRST: opts = ":bff\n"; break; } + + if ((asset->width == 1920) && (asset->height == 1080) && (asset->frame_rate != 24) && (asset->interlace_mode==ILACE_MODE_NOTINTERLACED)) + opts1="fake-interlaced=1\n"; + if ((asset->width == 1280) && (asset->height == 720) && (asset->frame_rate == 25 || asset->frame_rate == 29.97 ) && (asset->interlace_mode==ILACE_MODE_NOTINTERLACED)) + opts1="pulldown=double\n"; + + if ((opts1) && (opts)) { + int len1 = strlen(opts); + char *cp1 = opts + len1-1; + strncpy(cp1, opts1, sizeof(opts)-len1); + } if( opts ) { int len = strlen(asset->ff_video_options); char *cp = asset->ff_video_options + len-1; ------------------------------------------------------- -------------------------------------------------------
Andrew, just trying to keep up with you but not really able to. Just some feedback and a question. With the fake-interlaced=1, a "real" interlace media file came out progressive too, so besides your bluray.m2ts, gg created bluray_tff.m2ts and bluray_bff.m2ts and made changes to bdcreate.C to pick that one based on ILACE. I have yet to have him look into the bdcreate.C changes you tested but hopefully I can do so today will still testing more bluray media on the TV. BUT, BIG QUESTION here and I already re-read the x264 url on deprecation of x264opts to be replaced by x264-params. I can not get x264-params to work with tff or bff added at the end of the statement. I even tried tff=1 and still does not work. The only way I can get the interlace options to work is with x264opts. So the question I have for you is, in your bluray.m2ts, can you verify that the vbv-maxrate=40000:vbv-bufsize=30000 actually take effect? I notice that you have them commented in the main section and added them to the end of the x264opts. Thanks, Phyllis On Sat, Nov 16, 2019 at 12:57 AM Andrew Randrianasulu < [email protected]> wrote:
No, apparently pulldown option requres more handling:
from x264.h
В сообщении от Saturday 16 November 2019 19:18:05 Phyllis Smith написал(а):
Andrew, just trying to keep up with you but not really able to. Just some feedback and a question.
With the fake-interlaced=1, a "real" interlace media file came out progressive too, so besides your bluray.m2ts, gg created bluray_tff.m2ts and bluray_bff.m2ts and made changes to bdcreate.C to pick that one based on ILACE. I have yet to have him look into the bdcreate.C changes you tested but hopefully I can do so today will still testing more bluray media on the TV.
Unfortunately, those changes apparently made no effect after all - because only x264 command line encoder knows how to deal with --pulldown option.
BUT, BIG QUESTION here and I already re-read the x264 url on deprecation of x264opts to be replaced by x264-params. I can not get x264-params to work with tff or bff added at the end of the statement. I even tried tff=1 and still does not work. The only way I can get the interlace options to work is with x264opts. So the question I have for you is, in your bluray.m2ts, can you verify that the vbv-maxrate=40000:vbv-bufsize=30000 actually take effect? I notice that you have them commented in the main section and added them to the end of the x264opts. Thanks, Phyllis
well, while libx264 recognizes changes I made there [libx264 @ 0xe93ebf40] using mv_range_thread = 56 [libx264 @ 0xe93ebf40] using SAR=1/1 [libx264 @ 0xe93ebf40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1 [libx264 @ 0xe93ebf40] HRD bitrate: 15000000 bits/sec [libx264 @ 0xe93ebf40] CPB size: 12000000 bits [libx264 @ 0xe93ebf40] profile High, level 4.1 for x264-params keyint=25:min-keyint=4:qpmin=3:qpmax=33:qp_step=4:merange=8:vbv-maxrate=15000:vbv-bufsize=12000 line in bluray.m2ts but resulting fiile still around 90 Mb for 1 minute (1280x720, 24p) ediainfo bd.m2ts General ID : 1 (0x1) Complete name : bd.m2ts Format : BDAV Format/Info : Blu-ray Video File size : 94.2 MiB Duration : 1 min 17 s Overall bit rate mode : Variable Overall bit rate : 10.2 Mb/s Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : [email protected] Format settings : CABAC / 3 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 3 frames Codec ID : 27 Duration : 1 min 17 s Bit rate mode : Variable Bit rate : 10 000 kb/s Maximum bit rate : 15.0 Mb/s Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 24.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.452 Stream size : 88.6 MiB (94%) Writing library : x264 core 155 Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=abr / mbtree=1 / bitrate=10000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=15000 / vbv_bufsize=12000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 I can try to reduce them further, and see if file will be any smaller ... for same input file /BD settings, but with further reduced bitrate/bufsze: [libx264 @ 0xe3932000] max bitrate less than average bitrate, assuming CBR [libx264 @ 0xe3932000] using mv_range_thread = 56 [libx264 @ 0xe3932000] using SAR=1/1 [libx264 @ 0xe3932000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1 [libx264 @ 0xe3932000] HRD bitrate: 8000000 bits/sec [libx264 @ 0xe3932000] CPB size: 6000000 bits [libx264 @ 0xe3932000] profile High, level 4.1 mediainfo bd.m2ts General ID : 1 (0x1) Complete name : bd.m2ts Format : BDAV Format/Info : Blu-ray Video File size : 78.9 MiB Duration : 1 min 17 s Overall bit rate mode : Variable Overall bit rate : 8 583 kb/s Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : [email protected] Format settings : CABAC / 3 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 3 frames Codec ID : 27 Duration : 1 min 17 s Bit rate mode : Variable Bit rate : 8 000 kb/s Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 24.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.362 Stream size : 73.9 MiB (94%) Writing library : x264 core 155 Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=cbr / mbtree=1 / bitrate=8000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=8000 / vbv_bufsize=6000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 so, it seems those parameters encoded..somewhere, even if resulting file not much smaller.
On Sat, Nov 16, 2019 at 12:57 AM Andrew Randrianasulu < [email protected]> wrote:
No, apparently pulldown option requres more handling:
from x264.h
Andrew,
I can not get x264-params to work with tff or bff added at the end of the statement. I even tried tff=1 and still does not work.
I did finally get x264-params to work correctly so I withdraw that question. Apparently, I just kept making mistakes. have yet to have him look into the bdcreate.C changes
GG did look at your patch. Previously he had changed "putting the bff and tff" on the end of the opts line to be smarter so that these could go into the options files instead. So we can at least add the 3 missing 1920x1080p... possible types. And I "think" that you are saying below that the "pulldown" option is not complete so we should not add it. On Sat, Nov 16, 2019 at 12:57 AM Andrew Randrianasulu < [email protected]> wrote:
No, apparently pulldown option requres more handling:
from x264.h
/* Pulldown: * The correct pic_struct must be passed with each input frame. * The input timebase should be the timebase corresponding to the output framerate. This should be constant. * e.g. for 3:2 pulldown timebase should be 1001/30000 * The PTS passed with each frame must be the PTS of the frame after pulldown is applied. * Frame doubling and tripling require b_vfr_input set to zero (see H.264 Table D-1) * * Pulldown changes are not clearly defined in H.264. Therefore, it is the calling app's responsibility to manage this. */
so, no for now.
I tried to see if scaling checkbox in BD creation dialog worked,
I will look into scaling as it was working but I have not looked at it for a long time so need to refresh my memory.
actually, I think for current time jsut commented bluray.m2ts opts file should work.... with just struct bd_format expansion, because I don't know how to add correctly line or two inside already-read opts file (my x264-opts editing was not accepted by ffmpeg)
В сообщении от Sunday 17 November 2019 04:12:52 Phyllis Smith написал(а):
Andrew,
I can not get x264-params to work with tff or bff added at the end of the statement. I even tried tff=1 and still does not work.
I did finally get x264-params to work correctly so I withdraw that question. Apparently, I just kept making mistakes.
have yet to have him look into the bdcreate.C changes
GG did look at your patch. Previously he had changed "putting the bff and tff" on the end of the opts line to be smarter so that these could go into the options files instead. So we can at least add the 3 missing 1920x1080p... possible types. And I "think" that you are saying below that the "pulldown" option is not complete so we should not add it.
Yes, while I was thinking about just reusing complied x264 binary much like mpeg2enc was used. But this will complicate muxing. I'll try to patch libx264 inside ffmpeg, but those frame-time manipulations still not something I can easily check (may be in Avidemux2?)
On Sat, Nov 16, 2019 at 12:57 AM Andrew Randrianasulu < [email protected]> wrote:
No, apparently pulldown option requres more handling:
from x264.h
/* Pulldown: * The correct pic_struct must be passed with each input frame. * The input timebase should be the timebase corresponding to the output framerate. This should be constant. * e.g. for 3:2 pulldown timebase should be 1001/30000 * The PTS passed with each frame must be the PTS of the frame after pulldown is applied. * Frame doubling and tripling require b_vfr_input set to zero (see H.264 Table D-1) * * Pulldown changes are not clearly defined in H.264. Therefore, it is the calling app's responsibility to manage this. */
so, no for now.
I tried to see if scaling checkbox in BD creation dialog worked,
I will look into scaling as it was working but I have not looked at it for a long time so need to refresh my memory.
I think they still work in English locale, so try few non-English ones too? I tried to put setlocale call into bdcreate.C, but it was not enough ....
actually, I think for current time jsut commented bluray.m2ts opts file should work.... with just struct bd_format expansion, because I don't know how to add correctly line or two inside already-read opts file (my x264-opts editing was not accepted by ffmpeg)
participants (2)
-
Andrew Randrianasulu -
Phyllis Smith