CasparCG / server

CasparCG Server is a Windows and Linux software used to play out professional graphics, audio and video to multiple outputs. It has been in 24/7 broadcast production since 2006. Ready-to-use downloads are available under the Releases tab https://casparcg.com.
GNU General Public License v3.0
904 stars 269 forks source link

MP4 files created with Adobe Media Encoder cause dropped frames with crossfades #684

Closed TKooijmans closed 6 years ago

TKooijmans commented 6 years ago

With build 8737 and earlier I get dropped frames when I make a crossfade between HD MP4 clips created with Adobe Premiere or Adobe Media Encoder. This seems a performance problem with CasperCG server with higher bitrate MP4 files

The DIAG show this afbeelding

Steps to repro, render a clip in Adobe Premiere from a HD interlaced sequence to HD h264 preset Match Source - High bitrate Play this clip with Casper CG and make a crossfade to the same clip. Watch DIAG

You get a file with this info HD MP4= (encoded by Adobe Media encoder) Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 3 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 5mn 35s Bit rate mode : Variable Bit rate : 10.2 Mbps Maximum bit rate : 12.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 fps Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.198 Stream size : 410 MiB (97%)

Audio Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40

Duration : 5mn 35s Source duration : 5mn 35s Bit rate mode : Variable Bit rate : 317 Kbps Maximum bit rate : 413 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 12.7 MiB (3%)

TKooijmans commented 6 years ago

I like to add, If I export a mp4 file in progressive mode the performance spikes are almost gone So it seems to occur with h264 interlaced format.

file info from working progressive clip ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 5mn 35s Bit rate : 10.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 fps Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.193 Stream size : 401 MiB (97%) Language : English Encoded date : UTC 2018-01-26 13:14:20 Tagged date : UTC 2018-01-26 13:14:20 Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709

Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 5mn 35s Source duration : 5mn 35s Bit rate mode : Variable Bit rate : 317 Kbps Maximum bit rate : 397 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 12.7 MiB (3%) Source stream size : 12.7 MiB (3%)

ronag commented 6 years ago

@TKooijmans can you provide me with the files and AMCP commands to I can try and reproduce it in the latest build?

TKooijmans commented 6 years ago

Hi Robert, You can download the mp4 test file to reproduce the problem. https://we.tl/4GTpnXoDsu (this is a wetransfer link, about 7 days available)

Just just PLAY 1-1 "clipname" to test. The server is setup with one Decklink card for output in HD 1080i50

When you open a DIAG window you can see heavey spikes while starting this MP4 file. This seems to be related to the interlaced format of the file.

I tested the same clip with CasperCG 2.07, that works fine even with a crossdisolve between the same clip. With CasperCG 2.1 build 3440 this is impossible without dropped frames.

CasperCG 207 (no dropped frames at the start) afbeelding

CasperCG 2.1 build 3440 (dropped frames at the start) afbeelding

ronag commented 6 years ago

This is fixed in 2.2.0