Skip to main content
edited cmd
Source Link
Gyan
  • 33.8k
  • 3
  • 58
  • 97

Y4M has no timestamps, only framerate in its header. So, if your source has any variability in its framerate, you'll see a shift in apparent timestamp in the Y4M.

e.g.

n     src     y4m
0       0       0
1    0.04    0.04 
2    0.07    0.08
3    0.12    0.12
4    0.21    0.16
5    0.24    0.20
6    0.27    0.24 
...

Over a long period, these perturbations can add up. Here frame #6 in src is at TS of src #5 in Y4M.

Edit: the sample TS file has VFR timestamps.

Use -c:v rawvideo -vsync 0 -enc_time_basevf 1setpts=N/1000FRAME_RATE/TB -an and save to .nut for millisecond precision.

Y4M has no timestamps, only framerate in its header. So, if your source has any variability in its framerate, you'll see a shift in apparent timestamp in the Y4M.

e.g.

n     src     y4m
0       0       0
1    0.04    0.04 
2    0.07    0.08
3    0.12    0.12
4    0.21    0.16
5    0.24    0.20
6    0.27    0.24 
...

Over a long period, these perturbations can add up. Here frame #6 in src is at TS of src #5 in Y4M.

Use -c:v rawvideo -vsync 0 -enc_time_base 1/1000 and save to .nut for millisecond precision.

Y4M has no timestamps, only framerate in its header. So, if your source has any variability in its framerate, you'll see a shift in apparent timestamp in the Y4M.

e.g.

n     src     y4m
0       0       0
1    0.04    0.04 
2    0.07    0.08
3    0.12    0.12
4    0.21    0.16
5    0.24    0.20
6    0.27    0.24 
...

Over a long period, these perturbations can add up. Here frame #6 in src is at TS of src #5 in Y4M.

Edit: the sample TS file has VFR timestamps.

Use -c:v rawvideo -vsync 0 -vf setpts=N/FRAME_RATE/TB -an and save to .nut.

Source Link
Gyan
  • 33.8k
  • 3
  • 58
  • 97

Y4M has no timestamps, only framerate in its header. So, if your source has any variability in its framerate, you'll see a shift in apparent timestamp in the Y4M.

e.g.

n     src     y4m
0       0       0
1    0.04    0.04 
2    0.07    0.08
3    0.12    0.12
4    0.21    0.16
5    0.24    0.20
6    0.27    0.24 
...

Over a long period, these perturbations can add up. Here frame #6 in src is at TS of src #5 in Y4M.

Use -c:v rawvideo -vsync 0 -enc_time_base 1/1000 and save to .nut for millisecond precision.