Caspar Client and Companion: different video duration with recording

Hello,

i use caspar 2.1.0.3 and send via caspar client a custom command to record a decklink input to a file via ffmpeg. I using the same commands in Companion.

When i do a 3h record with the client the file is as it should 3h long. If i do a 3h record with Companion the file is after 3h only 2:37 long. The only difference is that the client is placing the file to a layer around 21000 or 64000 automatically. In Companion i use layer 20 for the file (i also tried some of the high numbers, no change.

The command i send via Companion is is:
ADD 1-20 FILE “0900.mp4” -vcodec libx264 -preset medium -g 25 -keyint_min 25 -sc_threshold 0 -tune fastdecode -crf 24 -vf fps=25 -vf yadif\r\n

The command from the client is:
ADD 1-21298 FILE “0900.mp4” -vcodec libx264 -preset medium -g 25 -keyint_min 25 -sc_threshold 0 -tune fastdecode -crf 24 -vf fps=25 -vf yadif\r\n

Command for Decklink input: PLAY 1-10 DECKLINK DEVICE 1 FORMAT 1080i5000

Any ideas why the lenght is so different or where i should look deeper into?

thx in advance
Wolfgang

AFAIK layer numbers above 9999 are not allowed, what would result in a command without a layer argument, like so:

ADD 1 FILE “0900.mp4”...

Do you mind trying this from Companion?

Ah! Let me test this, i’ll come back with the result asap!

Unfortunately it didn’t work. Start-Stop was 4h 28min, videoduration is 3h 48min…

Found the issue: caspar needs a special syntax if you want to talk to ffmpeg via caspar. For example -crf 24 needs to be -crf:v 24 and so on.