This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Content change from 60FPS to 58FPS after convertion
#1
Hey bro I have an issue and I hope you can help me with it. So I have multiple 1920X1080 16:9 videos that are AV1 and they are 60FPS. I use NVENC and set constant bit rate HQ and set the bit rate to 10000k and use h265 or even h264 or even leave it AV1 but no matter what the result is 58FPS instead of 60FPS.
 Interlace is disabled and I'm not using any filters or anything simply changing the codec and reducing the bit rate. Everything else is default options from when I installed the program. My question is is there anything I need to disable or change to fix this? Thank you in advance.
Reply
#2
Without a debug output (read the sticky) and any real details, I can only suspect what is happening.
So my guess is that your source if vfr input and the time codes get either ignored in the process or they are not ignored but the first or a few entries in them get fixed and that causes the average frame rate to change.
-> share a debug output, then I can look at that and see what's happening.

Cu Selur
Reply
#3
Here is a zip file containing the debug as you requested.
Reply
#4
Quote:I have multiple 1920X1080 16:9 videos that are AV1 and they are 60FPS.
Did you share the right debug output, since the source gets reported by mediainfo as:
Video
Count                                    : 381
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                                : 7136786160922341380
Format                                   : AV1
Format                                   : AV1
Format/Info                              : AOMedia Video 1
Format/Url                               : http://aomedia.org/
Commercial name                          : AV1
Format profile                           : Main@L5.0
Codec ID                                 : V_AV1
Codec ID/Url                             : http://aomedia.org/
Duration                                 : 1325949.000000
Duration                                 : 22 min 5 s
Duration                                 : 22 min 5 s 949 ms
Duration                                 : 22 min 5 s
Duration                                 : 00:22:05.949
Duration                                 : 00:22:06;08
Duration                                 : 00:22:05.949 (00:22:06;08)
Bit rate                                 : 4248653
Bit rate                                 : 4 249 kb/s
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Sampled_Width                            : 1920
Sampled_Height                           : 1080
Pixel aspect ratio                       : 1.001
Display aspect ratio                     : 1.779
Display aspect ratio                     : 16:9
Frame rate mode                          : VFR
Frame rate mode                          : Variable
Frame rate                               : 23.976
Frame rate                               : 23.976 (23976/1000) FPS
FrameRate_Num                            : 23976
FrameRate_Den                            : 1000
Frame count                              : 31792
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.085
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                              : 704210130
Stream size                              : 672 MiB (12%)
Stream size                              : 672 MiB
Stream size                              : 672 MiB
Stream size                              : 672 MiB
Stream size                              : 671.6 MiB
Stream size                              : 672 MiB (12%)
Proportion of this stream                : 0.11902
Writing library                          : Lavc59.52.102 av1_nvenc
Writing library                          : Lavc59.52.102 av1_nvenc
Default                                  : No
Default                                  : No
Forced                                   : No
Forced                                   : No
colour_description_present               : Yes
colour_description_present_Source        : Container / Stream
Color range                              : Limited
colour_range_Source                      : Container / Stream
colour_primaries_Source                  : Stream
transfer_characteristics_Source          : Stream
Matrix coefficients                      : BT.470 System B/G
matrix_coefficients_Source               : Container / Stream
Video gets encoded with:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "D:\Video stuff\FOTNS\Yu-Gi-Oh! Duel Monsters - 022 - Duel of Destiny! Yugi vs Kaiba_new_chr2_amq13.mkv" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | "C:\Program Files\Hybrid\64bit\NVEncC.exe" --y4m -i - --fps 23.976 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --cbrhq 500 --max-bitrate 800000 --gop-len 0 --ref 3 --bframes 3 --bref-mode disabled --no-b-adapt --mv-precision Q-pel --preset default --colorrange limited --colormatrix bt470bg --cuda-schedule sync --output "C:\Users\thebl\AppData\Local\Temp\TEST VIDEO_2023-01-08@11_01_31_4410_02.265"
Encoder reports:
OS Version     Windows 11 x64 (22621) [UTF-8]
CPU            13th Gen Intel Core i9-13900KF [5.52GHz] (8P+16E,24C/32T)
GPU            #0: NVIDIA GeForce RTX 4090 (16384 cores, 2535 MHz)[PCIe4x16][528.02]
NVENC / CUDA   NVENC API 12.0, CUDA 12.0, schedule mode: sync
Input Buffers  CUDA, 32 frames
Input Info     y4m(yv12(10bit))->p010 [AVX2], 1920x1080, 24000/1001 fps
Vpp Filters    copyHtoD
Output Info    H.265/HEVC main10 @ Level auto
               1920x1080p 1:1 23.976fps (24000/1001fps)
Encoder Preset default
Rate Control   CBR
Multipass      2pass-full
Bitrate        500 kbps (Max: 800000 kbps)
Target Quality auto
Initial QP     I:20  P:23  B:25
QP Offset      cb:0  cr:0
VBV buf size   auto
Lookahead      on, 16 frames, Adaptive I Insert
GOP length     240 frames
B frames       3 frames [ref mode: disabled]
Ref frames     3 frames, MultiRef L0:auto L1:auto
AQ             off
CU max / min   auto / auto
VUI            matrix:bt470bg,range:limited
Others         mv:Q-pel
(seems like when encoding the video stream fps of the video wasn't properly set, normally the frame rate of the video should indicate the average frame rate.)

Since the content is vfr, Hybrid, by default, does passthrough the time codes:
"C:\Program Files\Hybrid\64bit\mkvmerge.exe" --ui-language en -o "D:\2023-01-08@11_01_31_4410__03.mkv" --global-tags "C:\Users\thebl\AppData\Local\Temp\mkvtags_2023-01-08@11_01_31_4410__03.xml" -d 0 --default-track 0:yes --default-duration "0:24000/1001fps" --aspect-ratio-factor 0:1/1 --no-chapters --compression -1:none --forced-track 0:yes --field-order 0:0 --no-audio --no-subtitles --timecodes 0:"C:\Users\thebl\AppData\Local\Temp\timecodeV2_2023-01-08@11_01_31_4410.tc" "C:\Users\thebl\AppData\Local\Temp\TEST VIDEO_2023-01-08@11_01_31_4410_02.265"

So there should be no 60fps or 59.xx fps unless the time codes indicate such a frame rate.
Looking at the time codes:
# timestamp format v2
  0
  17
  33
  50
  67
  83
  100
  117
  133
  150
  167
  183
  200
  217
  233
  250
  267
  283
  300
  317
  333
  350
  367
  383
  400
  417
  433
  450
  467
  483
  500
  517
  533
  550
  567
  583
  600
  617
  633
  650
  667
  683
  700
....
Hybrid did not change the time codes, so the output should still be sync and the difference is just a cosmetic difference caused by the tool you used to check the time codes.
Time codes jump per frame between 16ms and 17ms per frame, so the frame rate is between 1000/16=62.5 and 58,82.. fps.
1000/60 is 16.66.. ms per frame, which would fit, Hybrid did calculate the average frame rate and reported:
[quote]Current frame rate: 59.944 differs from average time code frame rate: 23.976.
This will be ignored since 'Check average fps of mkv/mp4 files' is disabled.[/code]
If 'Config->Automation->Matroska Settings->Adjust fps to average fps' were enabled, Hybrid would have changed the fps to 59.944fps.
So not 60fps. (Side note: you might to work over your process to create these files, so that they are not vfr and are flagged properly.)

To fix the fps indicated in the video stream, you could:
  • enabled 'Filtering->Speed Change->Speed Settings->Change speed' and set it to 60 fps
this will not change the sync due to the time codes, but might help with what players indicate.

Since the time codes seem to match, 60fps with not 'bumps', you could also:
  • enable 'Filtering->Internals->Handling->Ignore all input time codes', this will cause Hybrid to ignore the time codes and simply detect the source as 23.976 fps as indicated by the video streams and then,
  • enabled 'Filtering->Speed Change->Speed Settings->Change speed' and set it to 60 fps
This would probably be the best option since it would remove the time codes and make sure the output is flagged as 60fps.

Cu Selur
Reply
#5
I will do as you suggested. Yes I did upload the correct video debug. I notice the mediainfo report the same thing on mine which is strange because the video is really 1920x1080 and it is 60FPS. I will use the options mentioned by you and will let you know how it will turn out. Thank you so much for getting back to me with a possible fix.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)