I encode with ffmpeg and noticed that when I encode a y4m video in 29,97 FPS into a h265 video with libx265, the parameter of the two videos are the following :
original y4m :
29.97 fps, tbc : 29.97 tbr 29.97 **tbn : 29.97**
H265 converted file :
29.97 fps, tbc : 29.97 tbr 29.97 **tbn : 1k**
I noticed the problem when I tried to compare the two videos with metrics like VMAF or SSIM, it says that the timestamps are 30000/1001 in one case and another thing in the other case and the metric result is clearly false.
The exact message when I call with SSIM : "not matching timebases found between first input: 100/2997 and second input 1001/30000, results may be incorrect!"
Where first input is the H265 and second input the y4m.
As far as I understand, tbn mean the internal time interval used by the codec to place the images and it should be a number that can help to get the FPS easily, but I don't see how 1k will help in any way to place images at precise 29.97FPS (30000/1001). Or I miss something ? On the net it seems that classical number is more or less things like 90k, which seem more logical.
My main question : This is, here a simple conversion with default parameters, why this default parameter is used in this case ?
Subsidiary questions :
I guess it is possible to force the tbn to another factor during conversion, but is it costless or have this an impact on the quality or size of the compressed video ?
Why in the y4m, the tbn is simply the FPS (29,97) what does it mean ?