For some reason, perhaps to do with that (I'm not sure), using latest ffmpeg with a small .vpy input to transcode into avc yields a different aspect ratio as compared to the source .mpg.
I wonder why aspect ratio etc is not reported by DGIndexNV ? And it seems possible it may be affecting ffmpeg transcoding aspect ratio (see below) or perhaps something is "swapped" (see below) ? Usually ffmpeg picks up source ratios and the output seems to mirror them (provided no resizing etc).
It is always possible, or even likely, that it is something I've done
Or, maybe ffmpeg has a bug ?
Code: Select all
"C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGIndexNV.exe" -i "D:\VRDTVS-SCRATCH\FILE.VRDTVS.qsf.mpg" -h -o "D:\VRDTVS-SCRATCH\FILE.VRDTVS.qsf.mpg.dgi" -e
Stream Type:
Video Type: MPEG2
Profile:
Coded Size:
Display Size:
Aspect Ratio:
Frame Rate:
Colorimetry:
Frame Structure:
Frame Type:
Coded Number: 153078
Playback Number: 153078
Frame Repeats: 0
Field Repeats: 0
Bitrate:
Bitrate (Avg):
Bitrate (Max):
Elapsed: 0:00:09
Remain: 0:00:00
FPS:
Info: Finished!
Code: Select all
Width : 720
Width : 720 pixels
Height : 576
Height : 576 pixels
Sampled_Width : 720
Sampled_Height : 576
Pixel aspect ratio : 1.422
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Code: Select all
Width : 720
Width : 720 pixels
Height : 576
Height : 576 pixels
Sampled_Width : 720
Sampled_Height : 576
Pixel aspect ratio : 1.778
Display aspect ratio : 2.223
Display aspect ratio : 2.223
Original display aspect ratio : 2.222
Original display aspect ratio : 2.222
Code: Select all
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functools
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
video = core.dgdecodenv.DGSource(r'D:\VRDTVS-SCRATCH\FILE.VRDTVS.qsf.mpg.dgi', deinterlace=0, use_pf=False)
video = core.avs.DGDenoise(video, strength=0.15, chroma=True)
video = core.avs.DGSharpen(video, strength=0.3)
video = vs.core.text.ClipInfo(video)
video.set_output()
Code: Select all
"C:\SOFTWARE\Vapoursynth-x64\ffmpeg.exe" -hide_banner -v verbose -nostats -init_hw_device opencl=ocl:0.0 -filter_hw_device ocl
-f vapoursynth -i "D:\VRDTVS-SCRATCH\FILE.VRDTVS.qsf.mpg.vpy"
-vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental
-c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -rc:v vbr -cq:v 0 -b:v 4000000 -minrate:v 100000 -maxrate:v 8000000 -bufsize 8000000
-profile:v high -level 5.2 -movflags +faststart+write_colr -an
-y "G:\HDTV\000-TO-BE-PROCESSED-MOVIE-ONLY\VRDTVS-Converted\FILE.mp4"
Code: Select all
"C:\software\mediainfo\mediainfo.exe" --full "D:\VRDTVS-SCRATCH\FILE.VRDTVS.qsf.mpg"
Video
Count : 378
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
FirstPacketOrder : 0
ID : 224
ID : 224 (0xE0)
Format : MPEG Video
Format : MPEG Video
Commercial name : MPEG-2 Video
Format version : Version 2
Format profile : Main@Main
Format settings : CustomMatrix / BVOP
Format settings, BVOP : Yes
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, Matrix : Custom
Format_Settings_Matrix_Data : 0808080908090B0B0B0B0B0B0D0C0D0D0D0D0D0D0D0D0D0D0D0E0E0E1111110E0E0E0D0D0E0E10101111121312111111111313141414181817171C1C1D222229 / 10111112121213131313141414141415151515151516161616161616171717171717171718181819181818191A1A1A1A191B1B1B1B1B1C1C1C1C1E1E1E1F1F21
Format settings, GOP : M=3, N=12
Internet media type : video/MPV
Duration : 6123120
Duration : 1 h 42 min
Duration : 1 h 42 min 3 s 120 ms
Duration : 1 h 42 min
Duration : 01:42:03.120
Duration : 01:42:03:03
Duration : 01:42:03.120 (01:42:03:03)
Bit rate mode : VBR
Bit rate mode : Variable
Bit rate : 5174213
Bit rate : 5 174 kb/s
Width : 720
Width : 720 pixels
Height : 576
Height : 576 pixels
Sampled_Width : 720
Sampled_Height : 576
Pixel aspect ratio : 1.422
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Frame rate : 25.000
Frame rate : 25.000 FPS
Frame count : 153078
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Chroma subsampling : 4:2:0
Bit depth : 8
Bit depth : 8 bits
Compression mode : Lossy
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.499
Delay : 240.000000
Delay : 240 ms
Delay : 240 ms
Delay : 240 ms
Delay : 00:00:00.240
Delay_DropFrame : No
Delay, origin : Container
Delay, origin : Container
Delay_Original : 3600000
Delay_Original : 1 h 0 min
Delay_Original : 1 h 0 min 0 s 0 ms
Delay_Original : 1 h 0 min
Delay_Original : 01:00:00.000
Delay_Original_Settings : drop_frame_flag=0 / closed_gop=1 / broken_link=0
Delay_Original_DropFrame : No
Delay_Original_Source : Stream
Time code of first frame : 01:00:00:00
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed : Open
GOP, Open/Closed of first frame : Closed
GOP, Open/Closed of first frame : Closed
Stream size : 3960291115
Stream size : 3.69 GiB (90%)
Stream size : 4 GiB
Stream size : 3.7 GiB
Stream size : 3.69 GiB
Stream size : 3.688 GiB
Stream size : 3.69 GiB (90%)
Proportion of this stream : 0.90200
Buffer size : 229376
intra_dc_precision : 10