Posts: 329
Threads: 107
Joined: May 2017
different frame counts in the source and in the encoded file.
Mediainfo:
Quote:Frame count : 448
Source frame count : 445
source
Posts: 10.622
Threads: 57
Joined: May 2017
using:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "C:\Users\Selur\Desktop\source.avi" -map 0:0 -an -sn -color_primaries bt470bg -color_trc smpte170m -colorspace bt470bg -color_range tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | NVEnc --y4m -i - --fps 29.970 --codec av1 --sar 1:1 --output-depth 10 --vbr 0 --vbr-quality 23.00 --aq --aq-strength 5 --aq-temporal --gop-len 0 --ref 7 --multiref-l0 3 --multiref-l1 3 --bframes 3 --bref-mode auto --mv-precision Q-pel --preset quality --colorrange limited --colormatrix bt470bg --cuda-schedule sync --output "J:\tmp\source_1_2024-03-01@18_33_03_4410_01.av1"
I get:
Video
Count : 391
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 : AV1
Format : AV1
Format/Info : AOMedia Video 1
Format/Url : http://aomedia.org/
Commercial name : AV1
Format profile : Main@L3.0
Codec ID : av01
Duration : 14847
Duration : 14 s 847 ms
Duration : 14 s 847 ms
Duration : 14 s 847 ms
Duration : 00:00:14.847
Duration : 00:00:14;25
Duration : 00:00:14.847 (00:00:14;25)
Bit rate : 2910402
Bit rate : 2 910 kb/s
Maximum bit rate : 3555928
Maximum bit rate : 3 556 kb/s
Width : 640
Width : 640 pixels
Height : 480
Height : 480 pixels
Sampled_Width : 640
Sampled_Height : 480
Pixel aspect ratio : 1.000
Display aspect ratio : 1.333
Display aspect ratio : 4:3
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 : 445
Color space : YUV
Chroma subsampling : 4:2:0
Chroma subsampling : 4:2:0
Bit depth : 10
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.316
Stream size : 5401773
Stream size : 5.15 MiB (100%)
Stream size : 5 MiB
Stream size : 5.2 MiB
Stream size : 5.15 MiB
Stream size : 5.152 MiB
Stream size : 5.15 MiB (100%)
Proportion of this stream : 0.99949
Encoded date : 2024-03-01 17:33:07 UTC
Tagged date : 2024-03-01 17:33:07 UTC
colour_description_present : Yes
colour_description_present_Source : Container / Stream
Color range : Limited
colour_range_Source : Container / Stream
colour_primaries_Source : Container / Stream
transfer_characteristics_Source : Container / Stream
Matrix coefficients : BT.470 System B/G
matrix_coefficients_Source : Container / Stream
Codec configuration box : av1C
using:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "C:\Users\Selur\Desktop\source.avi" -map 0:0 -an -sn -color_primaries bt470bg -color_trc smpte170m -colorspace bt470bg -color_range tv -pix_fmt yuv420p -vsync 0 -f yuv4mpegpipe - | NVEnc --y4m -i - --fps 29.970 --codec h264 --profile high --level auto --sar 1:1 --lookahead 16 --vbr 0 --vbr-quality 23.00 --aq --aq-strength 5 --aq-temporal --gop-len 0 --ref 7 --multiref-l0 3 --multiref-l1 3 --bframes 3 --direct auto --bref-mode auto --mv-precision Q-pel --cabac --deblock --preset quality --colorrange limited --colormatrix bt470bg --cuda-schedule sync --output "J:\tmp\h264_1_2024-03-01@18_35_47_9610_01.264"
Video
Count : 392
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@L3.1
Format settings : CABAC / 7 Ref Frames
Format settings, CABAC : Yes
Format settings, CABAC : Yes
Format settings, Reference frames : 7
Format settings, Reference frames : 7 frames
Internet media type : video/H264
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 14847
Duration : 14 s 847 ms
Duration : 14 s 847 ms
Duration : 14 s 847 ms
Duration : 00:00:14.847
Duration : 00:00:14;25
Duration : 00:00:14.847 (00:00:14;25)
Bit rate : 2305894
Bit rate : 2 306 kb/s
Maximum bit rate : 2899272
Maximum bit rate : 2 899 kb/s
Width : 640
Width : 640 pixels
Height : 480
Height : 480 pixels
Sampled_Width : 640
Sampled_Height : 480
Pixel aspect ratio : 1.000
Display aspect ratio : 1.333
Display aspect ratio : 4:3
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 : 445
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.250
Stream size : 4279791
Stream size : 4.08 MiB (100%)
Stream size : 4 MiB
Stream size : 4.1 MiB
Stream size : 4.08 MiB
Stream size : 4.082 MiB
Stream size : 4.08 MiB (100%)
Proportion of this stream : 0.99893
Encoded date : 2024-03-01 17:35:54 UTC
Tagged date : 2024-03-01 17:35:54 UTC
colour_description_present : Yes
colour_description_present_Source : Container / Stream
Color range : Limited
colour_range_Source : Container / Stream
colour_primaries_Source : Container / Stream
transfer_characteristics_Source : Container / Stream
Matrix coefficients : BT.470 System B/G
matrix_coefficients_Source : Container / Stream
mdhd_Duration : 14915
Codec configuration box : avcC
Using:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "C:\Users\Selur\Desktop\source.avi" -map 0:0 -an -sn -color_primaries bt470bg -color_trc smpte170m -colorspace bt470bg -color_range tv -pix_fmt yuv420p -vsync 0 -f yuv4mpegpipe - | NVEnc --y4m -i - --fps 29.970 --codec h264 --profile high --level auto --sar 1:1 --lookahead 16 --cqp 20:23:25 --aq --aq-strength 5 --aq-temporal --gop-len 0 --ref 7 --multiref-l0 3 --multiref-l1 3 --bframes 3 --direct auto --bref-mode auto --mv-precision Q-pel --cabac --deblock --preset quality --colorrange limited --colormatrix bt470bg --cuda-schedule sync --output "J:\tmp\h264_const_quant_1_2024-03-01@18_39_08_9610_01.264"
I get:
Video
Count : 392
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@L3.1
Format settings : CABAC / 7 Ref Frames
Format settings, CABAC : Yes
Format settings, CABAC : Yes
Format settings, Reference frames : 7
Format settings, Reference frames : 7 frames
Internet media type : video/H264
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 14847
Duration : 14 s 847 ms
Duration : 14 s 847 ms
Duration : 14 s 847 ms
Duration : 00:00:14.847
Duration : 00:00:14;25
Duration : 00:00:14.847 (00:00:14;25)
Bit rate : 2705904
Bit rate : 2 706 kb/s
Maximum bit rate : 3336200
Maximum bit rate : 3 336 kb/s
Width : 640
Width : 640 pixels
Height : 480
Height : 480 pixels
Sampled_Width : 640
Sampled_Height : 480
Pixel aspect ratio : 1.000
Display aspect ratio : 1.333
Display aspect ratio : 4:3
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 : 445
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.294
Stream size : 5022219
Stream size : 4.79 MiB (100%)
Stream size : 5 MiB
Stream size : 4.8 MiB
Stream size : 4.79 MiB
Stream size : 4.790 MiB
Stream size : 4.79 MiB (100%)
Proportion of this stream : 0.99909
Encoded date : 2024-03-01 17:39:41 UTC
Tagged date : 2024-03-01 17:39:41 UTC
colour_description_present : Yes
colour_description_present_Source : Container / Stream
Color range : Limited
colour_range_Source : Container / Stream
colour_primaries_Source : Container / Stream
transfer_characteristics_Source : Container / Stream
Matrix coefficients : BT.470 System B/G
matrix_coefficients_Source : Container / Stream
mdhd_Duration : 14915
Codec configuration box : avcC
using different containers mp4/mkv doesn't change the output.
=> can't reproduce
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 329
Threads: 107
Joined: May 2017
Not for all files this bug.
Please download the source file from my first post
Posts: 10.622
Threads: 57
Joined: May 2017
01.03.2024, 19:54
(This post was last modified: 01.03.2024, 19:59 by Selur.)
I did and I used that as source for all the encodes,....
"C:\Users\Selur\Desktop\source.avi" is where I downloaded it too,...
by the partial output of mediainfo you posted:
Frame count : 448
Source frame count : 445
it seems like the container somehow indicates more frames,...
Does this also happen, if you ignore the audio?
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 10.622
Threads: 57
Joined: May 2017
My guess this is a mess-up of mediainfo.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 329
Threads: 107
Joined: May 2017
Quote:Does this also happen, if you ignore the audio?
Same result...
Posts: 10.622
Threads: 57
Joined: May 2017
Since you didn't post the whole mediainfo output: You didn't mix up Video&Audio frames, right?
Quote:Video
Count : 390
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 : 532451975017205657
Format : AV1
Format : AV1
Format/Info : AOMedia Video 1
Format/Url : http://aomedia.org/
Commercial name : AV1
Format profile : Main@L3.0
Codec ID : V_AV1
Codec ID/Url : http://aomedia.org/
Duration : 14848.000000
Duration : 14 s 848 ms
Duration : 14 s 848 ms
Duration : 14 s 848 ms
Duration : 00:00:14.848
Duration : 00:00:14;25
Duration : 00:00:14.848 (00:00:14;25)
Bit rate : 2910438
Bit rate : 2 910 kb/s
Width : 640
Width : 640 pixels
Height : 480
Height : 480 pixels
Sampled_Width : 640
Sampled_Height : 480
Pixel aspect ratio : 1.000
Display aspect ratio : 1.333
Display aspect ratio : 4:3
Frame rate mode : CFR
Frame rate mode : Constant
Frame rate : 29.970
Frame rate : 29.970 FPS
Frame count : 445
Color space : YUV
Chroma subsampling : 4:2:0
Chroma subsampling : 4:2:0
Bit depth : 10
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.316
Delay : 0
Delay : 00:00:00.000
Delay : 00:00:00;00
Delay : 00:00:00.000 (00:00:00;00)
Delay, origin : Container
Delay, origin : Container
Stream size : 5401773
Stream size : 5.15 MiB (65%)
Stream size : 5 MiB
Stream size : 5.2 MiB
Stream size : 5.15 MiB
Stream size : 5.152 MiB
Stream size : 5.15 MiB (65%)
Proportion of this stream : 0.65377
Default : Yes
Default : Yes
Forced : Yes
Forced : Yes
colour_description_present : Yes
colour_description_present_Source : Container / Stream
colour_range_Source : Container
colour_range_Original : Limited
colour_range_Original_Source : Stream
colour_primaries_Source : Stream
transfer_characteristics_Source : Stream
Matrix coefficients : BT.470 System B/G
matrix_coefficients_Source : Container / Stream
Audio
Count : 285
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 : 12750930280863998902
Format : PCM
Format : PCM
Commercial name : PCM
Format settings : Little / Signed
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : A_PCM/INT/LIT
Duration : 14848.000000
Duration : 14 s 848 ms
Duration : 14 s 848 ms
Duration : 14 s 848 ms
Duration : 00:00:14.848
Duration : 00:00:14.848
Bit rate mode : CBR
Bit rate mode : Constant
Bit rate : 1536000
Bit rate : 1 536 kb/s
Channel(s) : 2
Channel(s) : 2 channels
Samples per frame : 1916
Sampling rate : 48000
Sampling rate : 48.0 kHz
Samples count : 712704
Frame rate : 25.054
Frame rate : 25.054 FPS (1916 SPF)
Frame count : 372
Bit depth : 16
Bit depth : 16 bits
Delay : 0
Delay : 00:00:00.000
Delay : 00:00:00.000
Delay, origin : Container
Delay, origin : Container
Delay relative to video : 0
Delay relative to video : 00:00:00.000
Delay relative to video : 00:00:00.000
Stream size : 2850848
Stream size : 2.72 MiB (35%)
Stream size : 3 MiB
Stream size : 2.7 MiB
Stream size : 2.72 MiB
Stream size : 2.719 MiB
Stream size : 2.72 MiB (35%)
Proportion of this stream : 0.34503
Default : Yes
Default : Yes
Forced : No
Forced : No
Audio frames: 372 (will change when audio is converted)
Video frames: 445
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 329
Threads: 107
Joined: May 2017
General
Count : 349
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
Audio_Channels_Total : 2
Complete name : D:\My Programms\MPEG Programs\AA-CODECS\Hybrid\bug3\source.mp4
Folder name : D:\My Programms\MPEG Programs\AA-CODECS\Hybrid\bug3
File name extension : source.mp4
File name : source
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 : JVT
Internet media type : video/mp4
Codec ID : avc1
Codec ID : avc1 (isom/avc1)
Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible : isom/avc1
File size : 5007023
File size : 4.78 MiB
File size : 5 MiB
File size : 4.8 MiB
File size : 4.78 MiB
File size : 4.775 MiB
Duration : 14932
Duration : 14 s 932 ms
Duration : 14 s 932 ms
Duration : 14 s 932 ms
Duration : 00:00:14.932
Duration : 00:00:14;28
Duration : 00:00:14.932 (00:00:14;28)
Overall bit rate mode : VBR
Overall bit rate mode : Variable
Overall bit rate : 2682573
Overall bit rate : 2 683 kb/s
Frame rate : 29.970
Frame rate : 29.970 FPS
Frame count : 448
Stream size : 210852
Stream size : 206 KiB (4%)
Stream size : 206 KiB
Stream size : 206 KiB
Stream size : 206 KiB
Stream size : 205.9 KiB
Stream size : 206 KiB (4%)
Proportion of this stream : 0.04211
HeaderSize : 8069
DataSize : 4998878
FooterSize : 76
IsStreamable : Yes
Encoded date : 2024-03-01 16:53:37 UTC
Tagged date : 2024-03-01 16:53:37 UTC
File creation date : 2024-03-01 16:53:37.371 UTC
File creation date (local) : 2024-03-01 20:53:37.371
File last modification date : 2024-03-01 16:53:37.377 UTC
File last modification date (local) : 2024-03-01 20:53:37.377
Writing application : Hybrid 2024.02.24.1
Writing application : Hybrid 2024.02.24.1
Video
Count : 394
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 : 14932
Duration : 14 s 932 ms
Duration : 14 s 932 ms
Duration : 14 s 932 ms
Duration : 00:00:14.932
Duration : 00:00:14;28
Duration : 00:00:14.932 (00:00:14;28)
Source duration : 14848
Source duration : 14 s 848 ms
Source duration : 14 s 848 ms
Source duration : 14 s 848 ms
Source duration : 00:00:14.848
Source duration : 00:00:14;25
Source duration : 00:00:14.848 (00:00:14;25)
Bit rate : 2287411
Bit rate : 2 287 kb/s
Maximum bit rate : 2995888
Maximum bit rate : 2 996 kb/s
Width : 640
Width : 640 pixels
Height : 480
Height : 480 pixels
Sampled_Width : 640
Sampled_Height : 480
Pixel aspect ratio : 1.000
Display aspect ratio : 1.333
Display aspect ratio : 4:3
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 : 448
Source frame count : 445
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.248
Stream size : 4274108
Stream size : 4.08 MiB (85%)
Stream size : 4 MiB
Stream size : 4.1 MiB
Stream size : 4.08 MiB
Stream size : 4.076 MiB
Stream size : 4.08 MiB (85%)
Proportion of this stream : 0.85362
Source stream size : 4476807
Source stream size : 4.27 MiB (89%)
Source stream size : 4 MiB
Source stream size : 4.3 MiB
Source stream size : 4.27 MiB
Source stream size : 4.269 MiB
Source stream size : 4.27 MiB (89%)
Source_StreamSize_Proportion : 0.89411
Encoded date : 2024-03-01 16:53:37 UTC
Tagged date : 2024-03-01 16:53:37 UTC
colour_description_present : Yes
colour_description_present_Source : Container / Stream
Color range : Limited
colour_range_Source : Container / Stream
colour_primaries_Source : Container / Stream
transfer_characteristics_Source : Container / Stream
Matrix coefficients : BT.470 System B/G
matrix_coefficients_Source : Container / Stream
Source_Delay : 52
Source_Delay_Source : Container
mdhd_Duration : 14882
Codec configuration box : avcC
Audio
Count : 285
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 : 14912
Duration : 14 s 912 ms
Duration : 14 s 912 ms
Duration : 14 s 912 ms
Duration : 00:00:14.912
Duration : 00:00:14.912
Bit rate mode : VBR
Bit rate mode : Variable
Bit rate : 280072
Bit rate : 280 kb/s
Maximum bit rate : 299048
Maximum bit rate : 299 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 : 715776
Frame rate : 46.875
Frame rate : 46.875 FPS (1024 SPF)
Frame count : 699
Compression mode : Lossy
Compression mode : Lossy
Stream size : 522063
Stream size : 510 KiB (10%)
Stream size : 510 KiB
Stream size : 510 KiB
Stream size : 510 KiB
Stream size : 509.8 KiB
Stream size : 510 KiB (10%)
Proportion of this stream : 0.10427
Encoded date : 2024-03-01 16:53:35 UTC
Tagged date : 2024-03-01 16:53:37 UTC
Posts: 10.622
Threads: 57
Joined: May 2017
Okay, that's not it.
Sadly, I don't know what you do differently than I.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 329
Threads: 107
Joined: May 2017
Other encoders do not have this bug.
Another source:
Mediainfo the source file:
Quote:Frame count : 29171
Mediainfo the destination file:
Quote:Frame count : 29073
Source frame count : 29071
98 frames lost.
Resync audio and video.