Server: Wrong Frame Calculation in Server 2.1 curent build

Created on 23 Feb 2017  路  5Comments  路  Source: CasparCG/server

this is an xml generated from INFO 1-0 after layer 0 of channel 1 finished playing. a look at the frame-left says it all, the calculation is not right. i expect to see 0. Also producer/file-frame-number is not correct, it should have been 773

<?xml version="1.0" encoding="utf-8"?>
<layer>
   <auto_delta>null</auto_delta>
   <frame-number>1264</frame-number>
   <nb_frames>773</nb_frames>
   <frames-left>4294966805</frames-left>
   <frame-age>83</frame-age>
   <producer>
      <type>ffmpeg-producer</type>
      <filename>media\ff.mp4</filename>
      <width>720</width>
      <height>576</height>
      <progressive>true</progressive>
      <fps>25</fps>
      <loop>false</loop>
      <frame-number>1264</frame-number>
      <nb-frames>773</nb-frames>
      <file-frame-number>746</file-frame-number>
      <file-nb-frames>773</file-nb-frames>
   </producer>
   <background>
      <producer>
         <type>empty-producer</type>
      </producer>
   </background>
   <index>0</index>
</layer>
ffmpeg-consumer typbug

All 5 comments

what i have realized is that the last frame of the file is not played. when i play the same file with media player i could here every thing from start to finish. i wanted to attach the file so that you play it at your end but the system says mp4 files are not supported.

I have just had a look into this and can see 3 seperate issues here.
1) The frames-left counter is comparing frame-number and nb_frames. frame-number currently keeps on incrementing after the video has finished playing, I am unsure whether that it intentional. As the number doesnt increment when the producer is paused, I would suspect it to be a bug. nb_frames is the length reported by the producer. Comparing them in the current state will yield bad results. A workaround is to do the math manually with producer/file-frame-number and producer/file-nb-frames.
2) producer/file-frame being wrong looks to be an issue with how ffmpeg is playing h264 encoded files. I converted the go1080p25.mp4 sample file with adobe premiere cc17 to a h264 mp4, and a dnxhd mov and the dnx version skips only the last frame. the h264 version skips more frames, with the number reported matching what I am seeing.
3) As stated, the last frame of the file is not being played, and from my testing the first frame is often skipped also unless the file is loaded before playing. (and the numbers when doing so are also a bit off)

I've just run the same files in 2.0, and it plays the first frame for both, but skips the last for both. the h264 version skips an additional frame at the end too.

Anything update on this issue?

This will be fixed through https://github.com/CasparCG/Server/issues/636#issuecomment-355753697

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jesperstarkar picture jesperstarkar  路  6Comments

premultiply picture premultiply  路  6Comments

luckcfm picture luckcfm  路  5Comments

Phil403 picture Phil403  路  3Comments

Julusian picture Julusian  路  5Comments