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

File recorder write files with crackling audio after about 20 hours #606

Closed TKooijmans closed 6 years ago

TKooijmans commented 7 years ago

I use build v3440 to record mp4 files and create a stream in 720p25 format. I use format 720p25 for 2 channels. One channel is for recording, the second channel is for a live stream with png logo. The recording settings are -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune film -crf 18 I record a mp4 file every hour from 0600h to 2000h.

At night CasperCG doesn't need to do anything and is set in preview stop mode

Every hour I restart recording by sending this command, ADD 1 FILE "newname.mp4" -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune film -crf 18 With v3440 after about 20 hour operation the recorded files starts to get clicks and cracks in the audio. The only way to reset this problem is to restart the CasperCG server. Stop en start a new recording does not fix this problem. When this problem occurs only the recorded files have bad audio, the live stream is not affected and still sounds good.

The only thing I see everywhere in the error logs is this, but this does not match the time when files start recording with bad audio. I'm going to test with MXF recordings now to see if the same problem occurs after a longer time..

logs: 2017-06-05 07:00:00.209] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.021 [2017-06-05 07:02:32.081] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.025 [2017-06-05 07:03:40.756] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.044 [2017-06-05 07:24:28.752] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.044 [2017-06-05 07:43:41.934] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.033 [2017-06-05 07:51:28.583] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.034 [2017-06-05 08:00:00.671] [3700] [warning] [ffmpeg] [mp4 @ 000000004314D420] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead. [2017-06-05 08:00:00.671] [3700] [warning] [2017-06-05 08:00:00.671] [3700] [warning] [ffmpeg] [mp4 @ 000000004314D420] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead. [2017-06-05 08:00:00.671] [3700] [warning] [2017-06-05 08:00:00.679] [2000] [warning] Assertion Failed: counter < 8 file:core\consumer\frame_consumer.cpp line:104 [2017-06-05 08:02:40.060] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.024 [2017-06-05 08:36:27.231] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.034 [2017-06-05 08:52:44.192] [3192] [warning] [buffer] Performance warning. Buffer mapping blocked: 0.025

TKooijmans commented 7 years ago

I got some extra info on the problem. The crackling sound seem to be caused by the Decklink input. If I clear channel 1 and send after that PLAY 1-1 Decklink 1 FORMAT 1080i5000 All is right again. So I don't need to restart CasperCG to fix the problem.

toontoet commented 7 years ago

I'm experiencing the same thing. Only not after 20 hours but after some random interval. Just had it after +/- 90 mins of DECKLINK playing. CLEAR and re-PLAY fixes the audio indeed.

Also, I'm not recording the channel, but playing it via a route:// on another channel with a decklink output.

IE: PLAY 3-1 DECKLINK 8 FORMAT 1080i5000 PLAY 1-1 route://3

with channel 1 having only a Decklink consumer

dotarmin commented 7 years ago

I use build v3440

@TKooijmans Where did you find this build?

TKooijmans commented 7 years ago

http://casparcg.com/builds/CasparCG%20Server/2.1.0/CasparCG%20Server%20f15ba601fe06a7f57512c14c5958cadebf56d970_windows.zip

dotarmin commented 7 years ago

@TKooijmans Thanks!

Just a funny thing, maybe I'm tiered or so but where did you get build number v3440 from?

vimlesh1975 commented 6 years ago

I am also having this problem. I can hear the noise in input itself. Server 2.07 stable. Clearing the layer and playing the Decklink again solves the problem.

TKooijmans commented 6 years ago

Yesterday I got this problem again and I could playback the recorded file and check the Casper logs at that timeframe. In the recorded file the audio started to get ticks after about 30 minutes in the file. In the Casper logs there where no errors shown at that point. (debug mode) It seems like a buffer underrun. I will try to get the casper system monitor running while this happens.

ronag commented 6 years ago

Closed in favor of #637. If you still have the issue after #637 have been resolved please open a new issue.

TKooijmans commented 6 years ago

How can we test this? I don't see a new build in http://www.casparcg.com/builds/CasparCG%20Server/2.1.0/ (For windows)

Julusian commented 6 years ago

Ronag hadn't finished the issues referenced, so there won't be anything to test until they are done or almost done.

On 19 Dec 2017 09:20, "TKooijmans" notifications@github.com wrote:

How can we test this? I don't see a new build in http://www.casparcg.com/ builds/CasparCG%20Server/2.1.0/ (For windows)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CasparCG/Server/issues/606#issuecomment-352685371, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRBdMNJk3zr3mPqJ2uSSc_bw7scB6JZks5tB3_WgaJpZM4NxgF- .