[Cin] DV to DVD rendering - questions and issues

Andrew Randrianasulu randrianasulu at gmail.com
Mon May 29 23:46:39 CEST 2023


пн, 29 мая 2023 г., 23:47 Phyllis Smith <phylsmith2017 at gmail.com>:

> More feedback to add to Andrew's reply.
>
> 2. Deinterlacing:
>>
>
>>> The input PAL DV source file is Interlaced, Bottom Field First
>>>
>>> ffprobe:
>>>   Stream #0:0: Video: dvvideo, none, 25000 kb/s, SAR 16:15 DAR 0:0, 25
>>> fps, 25 tbr, 25 tbn
>>>   Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
>>> Unsupported codec with id 24 for input stream 0
>>>
>>> mediainfo:
>>> Width                                    : 720 pixels
>>> Height                                   : 576 pixels
>>> Color space                              : YUV
>>> Scan type                                : Interlaced
>>> Scan order                               : Bottom Field First
>>>
>>>
>>> Why does deinterlacing with dvd default rendering (mpeg2enc) still come
>>> out as Interlaced, but Top Field first?
>>>
>>
>>
>> May be bug in mpeg2 output? Does it look interlaced, or it just flag set
>> wrongly?
>>
>> It does seem that it really is Top Field First all of the time when doing
> a DVD render despite whether or not the input is Top or Bottom first.  I
> temporarily modified filempeg.C for the "mpegenc" line to change the -I
> parameter from 1 to 2 as in:
>    Running /tmp/cinelerra-5.1/bin//mpeg2enc -v 0  -b 8000 -q 1 -a 2 -F 4
> -H *-I 1* -M 8 -z t -f 8 -g 15 -G 15 -R 0 -o
> '/tmp/dvd_20230529-140337/dvd.m2v'
>


try also to change " -z b" as recommended by manual

*-z|--playback-field-order* b|t

This flag overrides the field-order specified in the interlacing tag of the
input stream header. (If you need this option, it indicates a problem in
the capturing/encoding process where the temporal order of the two fields
in each frame has been mislabeled. The effect of this is weird "juddering"
when playing back the stream on a TV. Check the mjpeg-howto for more
information about interlacing problems.)


===


Also interesting settings are


*-c|--closed-GOPs*

Setting this flag causes the encoder to generate only "closed" GOPs (Groups
of Pictures) that can be decoded without reference to their predecessor.
This is useful for streams that are supposed to be used in multi-angle
DVD's and applications where more easily edittable MPEG is required.

*-P|--force-b-b-p*

This flag forces the GOP size selection to choose sizes that ensure 2 B
frames appear between adjacent I/P frames. Several common MPEG-1 decoders
can't handle streams where less than 2 B-frames appear between I/P frames.


but be sure you modify correct profiles ...


Also, not sure if consumer DV especially can be bottom field first? Still,
getting this setting from session parameters probably important , will look
more into code ...




> but that leads to a SIGPIPE and/or hangs in Cinelerra and when I run
> manually.  I am not even sure that "-I 2" really preserves Bottom Field
> First as I can not tell from the documentation (Andrew?).  Documentation on
> mpeg2enc is at:
>    https://linux.die.net/man/1/mpeg2enc
> specifically:
>
>> *-I|--interlace-mode* 0|1|2
>>
>> Set the sequence picture structure and block encoding type for MPEG-2
>> streams. By default, this value is inferred from the interlacing tag of the
>> input stream. Setting 0 encodes frame-by-frame with support for interlaced
>> video turned off, and specifies that progressive chroma subsampling has
>> been used. Setting 1 encodes frame-by-frame with interlace-adapted motion
>> compensation and block encoding, and specifies that interlaced chroma
>> subsampling has been used. Setting *2* encodes interlaced material
>> field-by-field, which will produce more accurate results for highly
>> textured interlaced material with lots of motion, at the expense of
>> generally less efficiency.
>>
>
>
>>
>> But the result is visually better than without deinterlacing, which is
>> awful jagged at camera movements zoom/pan, at least on my 2560x1440 res
>> monitor using VLC.
>>
> I do not understand the above sentence.  Which result is better? with
> deinterlacing or without deinterlacing? So Progressive is better? which
> makes more sense to me in this day and age.  As far as I read on the
> internet, DVDs can be either Progressive or Interlaced.
>
>> 3. Dvd Interlaced Chroma
>>>
>>> With reference to the CinGG manual
>>>
>>> https://cinelerra-gg.org/download/CinelerraGG_Manual/Dvd_Interlaced_Chroma.html
>>>
>>> *Now you can use the YUV420P DVD Interlace Mode when rendering DV
>>> directly to mpeg2 through a yuv4mpeg stream and when using video effects on
>>> HDV video.*
>>> *With this option enabled, improved chroma results will be obtained from
>>> your DV or HDV source. Editing DV or HDV and rendering it back to the same
>>> format does not require any special handling. In order to perform
>>> colorspace conversions correctly in CINELERRA-GG and avoid Chroma errors
>>> for interlaced 4:2:0 video, check the box as follows:*
>>>
>>> Settings → Performance → YUV420P DVD Interlace Mode
>>>
>>>
>>> I can't find this option and is it relevant for DVD rendering?
>>>
>>
>>
>>
>> Its in Interface section ..
>>
>> I can attach screenshot separately.
>>
>>
>> Thx, I found it. Then there is a need to correct this in the manual.
>>
> Fixed this and checked into GIT for the manual (which will only be updated
> with the next release).
>
>
>> Wonder if there is a reason why YUV420P DVD Interlace Mode is not set as
>> default?
>>
> It is used in "filempeg.C" and it is safer to not assume that it is
> needed.  Read simple example/explanation at:
>      https://renomath.org/ejolson/video/dv/chroma.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20230530/00071ca3/attachment-0001.htm>


More information about the Cin mailing list