# File recording with Caspar 2.3 (Broadcast) Examples

**URL:** <https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402>\
**Category:** General\
**Tags:** amcp, howto, server\
**Created:** [August 13, 2020, 4:30pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402 "2020-08-13T16:30:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theo](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/a87d85/32.png) [@Theo](https://casparcgforum.org/u/Theo)\
**Post date:** [August 13, 2020, 4:30pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/1 "2020-08-13T16:30:11Z")

</div>

Here you can find examples how to create broadcast MXF or mp4 files with Caspar 2.3.  
Because there is a newer version of FFmpeg in this build, the recording commands are different then  
with earlier versions.  
Also if no extented options are used you get 8 channels audio, with yuv 444 coding…  
The recorded files need to be compatible with Adobe Premiere  
NOTE, CasparCG 2.3 always writes one multichannel audio stream, in vlc player you can’t select a single channel.  
Premiere handles this without any problem.

settings in CasparCG config in the part…  
  
1080i5000  
matrix or  
stereo

Examples… tested 13-8-2020

**Broadcast XDcam EX 35 PAL 50i (1080i50) YUV420 HD stereo recording**

ADD 1 FILE “Test stereo feed.mxf” -b:v 35000000 -codec:a pcm\_s24le -codec:v mpeg2video -filter:v interlace,zscale=rangein=full:range=limited:primaries=709:transfer=709:matrix=709,format=yuv420p -alternate\_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 35000k -maxrate:v 35000k -color\_primaries:v bt709 -color\_trc:v 1 -colorspace:v 1 -filter:a pan=stereo|c0=c0|c1=c1

**Broadcast XDcam EX 35 PAL 50i (1080i50) YUV420 HD multichannel recording**  
**with 4 audio channels**

ADD 1 FILE “Test2 4ch audio.mxf” -b:v 35000000 -codec:a pcm\_s24le -codec:v mpeg2video -filter:v interlace,zscale=rangein=full:range=limited:primaries=709:transfer=709:matrix=709,format=yuv420p -alternate\_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 35000k -maxrate:v 35000k -color\_primaries:v bt709 -color\_trc:v 1 -colorspace:v 1 -filter:a pan=4c|c0=c0|c1=c1|c2=c3|c3=c3

here in de last part mapping of the audio channels  
pan=4c|c0=c0|c1=c1|c2=c3|c3=c3  
for 8 channels use  
pan=8c|c0=c0|c1=c1|c2=c3|c3=c3|c4=c4|c5=c5|c6=c6|c7=c7

**Broadcast XDcam HD50 PAL 50i (1080i50) YUV422 HD stereo (from multichannel input)**

ADD 1 FILE “Test 422.mxf” -b:v 50000000 -codec:a pcm\_s24le -codec:v mpeg2video -filter:v interlace,zscale=rangein=full:range=limited:primaries=709:transfer=709:matrix=709,format=yuv422p -alternate\_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 50000k -maxrate:v 50000k -color\_primaries:v bt709 -color\_trc:v 1 -colorspace:v 1 -filter:a pan=stereo|c0=c0|c1=c1

**Broadcast XDcam HD50 PAL 50i (1080i50) YUV422 HD 4 channel audio (from multichannel input)**

ADD 1 FILE “Test 422.mxf” -b:v 50000000 -codec:a pcm\_s24le -codec:v mpeg2video -filter:v interlace,zscale=rangein=full:range=limited:primaries=709:transfer=709:matrix=709,format=yuv422p -alternate\_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 50000k -maxrate:v 50000k -color\_primaries:v bt709 -color\_trc:v 1 -colorspace:v 1 -filter:a pan=4c|c0=c0|c1=c1|c2=c3|c3=c3

MP4 recording examples follow soon, right now mp4 files from CasparCG 2.3 can’t be opened by Premiere…

---

<div class="post-metadata">

**Author:** ![TonyKrist](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/bb73d2/32.png) [@TonyKrist](https://casparcgforum.org/u/TonyKrist)\
**Post date:** [October 2, 2020, 12:52pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/2 "2020-10-02T12:52:19Z")

</div>

Thanks. Looking forward for H264 examples. I have tested on 2.3 LTS 1080i5000 stereo configuration and after few seconds recoring is broken (speed is doubled). HW is fine. CPU 30% GPU 10%. Have you experienced that issue? I have not found any format working on 1080i5000. Works well only on 1080p2500.

---

<div class="post-metadata">

**Author:** ![vimlesh1975](https://casparcgforum.org/user_avatar/casparcgforum.org/vimlesh1975/32/1608_2.png) [@vimlesh1975](https://casparcgforum.org/u/vimlesh1975)\
**Post date:** [October 2, 2020, 1:30pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/3 "2020-10-02T13:30:00Z")

</div>

> [@Theo](#):
>
> right now mp4 files from CasparCG 2.3 can’t be opened by Premiere

This is a long pending issue. It needs to be solved.

---

<div class="post-metadata">

**Author:** ![Theo](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/a87d85/32.png) [@Theo](https://casparcgforum.org/u/Theo)\
**Post date:** [January 23, 2021, 9:55am UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/4 "2021-01-23T09:55:09Z")

</div>

Is this still broken?

---

<div class="post-metadata">

**Author:** ![didikunz](https://casparcgforum.org/user_avatar/casparcgforum.org/didikunz/32/7_2.png) [@didikunz](https://casparcgforum.org/u/didikunz)\
**Post date:** [January 23, 2021, 11:14am UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/5 "2021-01-23T11:14:07Z")

</div>

Have you posted a bug report at GitHub?

---

<div class="post-metadata">

**Author:** ![Theo](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/a87d85/32.png) [@Theo](https://casparcgforum.org/u/Theo)\
**Post date:** [January 23, 2021, 2:11pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/6 "2021-01-23T14:11:15Z")

</div>

sure, long time ago…

---

<div class="post-metadata">

**Author:** ![Theo](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/a87d85/32.png) [@Theo](https://casparcgforum.org/u/Theo)\
**Post date:** [May 19, 2021, 1:39pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/7 "2021-05-19T13:39:04Z")

</div>

UPDATE recording problem with mp4 files with CasparCG 2.3

When we try to record a mp4 file with CasparCG 2.3 latest build, the resulting clip can’t be imported in Adobe Premiere.  
When we use FFMPEG.exe within the Caspar directory with a cmd command to record from a Decklinkcard, we get a good mp4 file.  
So there’s something wrong in the CasparCG build regarding FFmpeg control.

so this CasperCG command results in mp4 file with can’t be opened with Premiere Pro

ADD 1 FILE “myfile 1.mp4” -codec:v libx264 -crf:v 23 -preset:v veryfast -filter:v format=pix\_fmts=yuv420p,tinterlace=4 -flags:v +ildct+ilme -codec:a aac -b:a 128k -ar:a 48k -filter:a pan=stereo|c0=c0|c1=c2

running this via cmd prompt give a good mp4 for import with Premiere Pro

ffmpeg -f dshow -video\_size 1920x1080 -pixel\_format uyvy422 -rtbufsize 200k -framerate 25.00 -i video=“Decklink Video Capture” -f dshow -i audio=“Decklink Audio Capture” -map 0:v -map 1:a -filter:v format=pix\_fmts=yuv420p -flags:v +ildct+ilme -codec:v libx264 -crf:v 23 -preset:v veryfast -r 25 -codec:a aac -b:a 128k -ar:a 48k testclip.mp4

---

<div class="post-metadata">

**Author:** ![STL](https://casparcgforum.org/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@STL](https://casparcgforum.org/u/STL)\
**Post date:** [May 19, 2021, 3:40pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/8 "2021-05-19T15:40:02Z")

</div>

It sounds like problems I see with stream consumers where CasparCG doesn’t send frame size and frame rate ([https://casparcgforum.org/t/streaming-to-twitter-periscope/3245](https://casparcgforum.org/t/streaming-to-twitter-periscope/3245))

---

<div class="post-metadata">

**Author:** ![Theo](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/a87d85/32.png) [@Theo](https://casparcgforum.org/u/Theo)\
**Post date:** [May 19, 2021, 6:39pm UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/9 "2021-05-19T18:39:48Z")

</div>

Yes, this could be that problem too, I mentioned this a while ago on github, but no one seems to take care to fix this problem.  
It’s there with every build higher then 2.1.  
You have to note however that setup of the ffmpeg parameters is much more complex then with earlier builds.

---

<div class="post-metadata">

**Author:** ![Jesper](https://casparcgforum.org/user_avatar/casparcgforum.org/jesper/32/9_2.png) [@Jesper](https://casparcgforum.org/u/Jesper)\
**Post date:** [September 9, 2021, 9:24am UTC](https://casparcgforum.org/t/file-recording-with-caspar-2-3-broadcast-examples/3402/11 "2021-09-09T09:24:38Z")

</div>

Brilliant. Perhaps you could make an article in the wiki on this? [https://github.com/CasparCG/help/wiki](https://github.com/CasparCG/help/wiki)
