It is currently 30 Mar 2017, 09:49



CasparCG Conformer

CasparCG Server, Client and development

Moderators: Macey, Jonas Hummelstrand, didikunz

CasparCG Conformer

Postby Peter Karlsson » 29 Mar 2012, 10:59

Hi all,

There is a new project in the source code repository: CasparCG Conformer, which can be used for transcoding video files from one format to another. Use the specification.xml file to specify format and FFmpeg flags. The transcoder will also re-interleave frame packages which will speedup the read operation in CasparCG Server.

You can see the difference in the graph below. The right yellow FFmpeg curve is a litte choppy. The left corresponding graph is much smoother which indicates better read performance. This can be useful when you must read a lot of HD material from disk.

Disk Performance.png
Disk Performance.png (169.11 KiB) Viewed 17363 times


By default the application will use the number of cores to determind the max number of simultaneous files to transcode. You can override this by changing the MaxThreadOffset in the config file. The machine can be quite busy when transcoding so be careful with this setting.

TaskManagerConformer.png
TaskManagerConformer.png (58.35 KiB) Viewed 17363 times


In the future I will add support for multiple outputs and possibility to run it as a service.

We'll package this up and provide a compiled version soon, but please try it out in the mean-time!
Former CasparCG Client Lead Developer
Feel free to contact me if you need any CasparCG related support, development or other consulting.
Peter Karlsson
 
Posts: 305
Joined: 05 Nov 2010, 09:35
Location: Sweden

Re: CasparCG Conformer

Postby Jesper Stærkær » 29 Mar 2012, 11:03

WOW!!
Jesper Stærkær
Independent Consultant at SuperFly.tv
User avatar
Jesper Stærkær
 
Posts: 835
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: CasparCG Conformer

Postby didikunz » 29 Mar 2012, 11:43

COOOOOOOOOOOOOOOOOOOOOL!!!!!!!!!!!!!!
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3401
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: CasparCG Conformer

Postby Mohamed Hefny » 01 Apr 2012, 23:29

Pretty coool,

If "Conformer Tool" is meant to "conform" that a specific media file is going to be played by the server correctly
"by transcoding it to a specific encoding format" , I'd like to suggest parsing output file name , like omitting 'space character' or any other character considered as "escape" one by the server . Or may be replacing it with "_" .

e.g: Input file: "Clip 715.avi" Output file: "Clip_715.avi"
Mohamed Hefny
DVB Engineer
m.hefny@nilesat.com.eg
User avatar
Mohamed Hefny
 
Posts: 26
Joined: 04 Jan 2012, 02:51
Location: Cairo, Egypt

Re: CasparCG Conformer

Postby Peter Karlsson » 02 Apr 2012, 08:44

Good idea!
Former CasparCG Client Lead Developer
Feel free to contact me if you need any CasparCG related support, development or other consulting.
Peter Karlsson
 
Posts: 305
Joined: 05 Nov 2010, 09:35
Location: Sweden

Re: CasparCG Conformer

Postby Ken » 28 Apr 2012, 14:51

Hi,

I can't get it to work, output file is filesize 0 byte. Is a special version of ffmpeg? I used the latest I font online.

"Specification.xml" is like this:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<Targets>
    <Target extension=".mp4" command="-vcodec qtrle -acodec copy" />
</Targets>


here is the log from Conformer:

Code: Select all
ffmpeg version N-40126-ga4b58fd Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 26 2012 03:33:03 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 47.100 / 51. 47.100
  libavcodec     54. 15.100 / 54. 15.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.100 /  2. 72.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input/AMB.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.3.0
  Duration: 00:01:04.00, start: 0.000000, bitrate: 342 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 339 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
[buffer @ 0000000001e02e20] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:64/45 sws_param:flags=2
[buffersink @ 0000000001e0ee10] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0000000001e0f000] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 h:576 fmt:rgb24 sar:64/45 flags:0x4
[mp4 @ 0000000001e02240] track 0: could not find tag, codec not currently supported in container
Output #0, mp4, to 'Output/AMB.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf54.3.100
    Stream #0:0(eng): Video: qtrle, rgb24, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> qtrle)
Could not write header for output file #0 (incorrect codec parameters ?)


What did I do wrong?
Ken
 
Posts: 25
Joined: 26 Mar 2012, 10:00
Location: Malmo, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 28 Apr 2012, 15:10

could not find tag, codec not currently supported in container Output #0, mp4


You cannot put a qtrle stream into a .mp4 container, try .mov instead.
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby Ken » 28 Apr 2012, 19:37

OK, I try a .mov

I ask since I have problems with audio/video sync on some .mp4 (these are all 1280x720, fps 23.9760). mp4 in 25 fps works fine. Is there any way to convert/transcode a .mp4?

I run 1080p5000 with a screen consumer
Ken
 
Posts: 25
Joined: 26 Mar 2012, 10:00
Location: Malmo, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 28 Apr 2012, 19:42

Something along the lines of:

Code: Select all
-vcodec copy -acodec copy -r 25
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby Ken » 28 Apr 2012, 21:13

Robert Nagy wrote:Something along the lines of:

Code: Select all
-vcodec copy -acodec copy -r 25


Works on .mov but it looks like it only copy the file... On .mp4 ffmpeg crashes.


Is there some what to get Caspar to play the video with audio/video in sync, any flags on the PLAY/LOAD command? Like the PLAY 1-1 DECKLINK DEVICE 1 FORMAT 720p5000 for Decklink?
Ken
 
Posts: 25
Joined: 26 Mar 2012, 10:00
Location: Malmo, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 28 Apr 2012, 21:22

Ken this is more of a ffmpeg problem, you can get better help at the ffmpeg user mailing list https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-user/.

You can try to use libav.org instead of ffmpeg, which maybe doesn't crash. If it's only one small file I can transcode it for you if you wish.

The current CasparCG release can only play 25 fps or 50 fps files. Though future versions will probably be able to play any framerate.
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby Ken » 28 Apr 2012, 21:56

Robert Nagy wrote:You can try to use libav.org instead of ffmpeg, which maybe doesn't crash. If it's only one small file I can transcode it for you if you wish.


That ffmpeg version don't crash on mp4, but the video is still 23.9760 fps, and the convert takes only a second (on my Intel i7 laptop, Win7 x64), is it really that fast?

Code: Select all
<Targets>
    <Target extension=".mp4" command="-vcodec copy -acodec copy -r 25" />
</Targets>


Thanks for the offer on transcoding, but it's a few hundred music videos ;-)
Ken
 
Posts: 25
Joined: 26 Mar 2012, 10:00
Location: Malmo, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 28 Apr 2012, 22:00

use this then

Code: Select all
-vcodec libx264 -acodec copy -r 25 -tune fastdecode -crf 5
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 28 Apr 2012, 22:15

This would go a lot faster if you just jumped on IRC, #casparcg@freenode.net.
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby Ken » 28 Apr 2012, 22:56

Robert Nagy wrote:use this then

Code: Select all
-vcodec libx264 -acodec copy -r 25 -tune fastdecode -crf 5


That give me an error:
Code: Select all
failed to set value 'fastdecode' for option 'tune'


Here is a video if you feel for testing (22mb) vtest.mp4
Ken
 
Posts: 25
Joined: 26 Mar 2012, 10:00
Location: Malmo, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 28 Apr 2012, 23:04

The following works for me

Code: Select all
-i vtest.mp4 -vcodec libx264 -r 25 -tune fastdecode -crf 5 -acodec copy vtest2.mp4
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby Ken » 29 Apr 2012, 12:03

Robert Nagy wrote:The following works for me

Code: Select all
-i vtest.mp4 -vcodec libx264 -r 25 -tune fastdecode -crf 5 -acodec copy vtest2.mp4


Thanks,

I got it working with "64-bit Builds (Shared)" from http://ffmpeg.zeranoe.com

But ffmpeg still crashes on some mp4 files, like on "CG1080i50.mp4" but "CG1080i50_A.mp4" works (the files from CasparCG install)

Code: Select all
<Targets>
    <Target extension=".mp4" command="-vcodec libx264 -r 25  -tune fastdecode -crf 5 -acodec copy" />
</Targets>


This is mush faster conversion
Code: Select all
<Targets>
    <Target extension=".mp4" command="-vcodec libx264 -r 25 -preset superfast -tune fastdecode -crf 5 -acodec copy" />
</Targets>


Do I loose mush quality in my video by doing this conversion?
Ken
 
Posts: 25
Joined: 26 Mar 2012, 10:00
Location: Malmo, Sweden

Re: CasparCG Conformer

Postby Robert Nagy » 29 Apr 2012, 17:05

Ken wrote:Do I loose mush quality in my video by doing this conversion?


Some. You can set -crf to an even lower value if it is a problem. I don't see why you need to set superfast, I assume you are doing this conversion offline?
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby siconova » 13 Jun 2012, 02:07

Peter Karlsson wrote:We'll package this up and provide a compiled version soon, but please try it out in the mean-time!


Hi,s

It's there any update on the compiled version? It looks very interesting but I can't test it cause I don't have how to compile it.

Best regard
siconova
 
Posts: 81
Joined: 04 May 2011, 20:02

Re: CasparCG Conformer

Postby Peter Karlsson » 13 Jun 2012, 11:49

Send me a mail and i will reply with a binary.
Former CasparCG Client Lead Developer
Feel free to contact me if you need any CasparCG related support, development or other consulting.
Peter Karlsson
 
Posts: 305
Joined: 05 Nov 2010, 09:35
Location: Sweden

Re: CasparCG Conformer

Postby siconova » 19 Jun 2012, 22:19

Hi,

I'm testing the casparcg conformer with the default qtlre Codec and I'm getting really big files.

My question is, in wich situation do you sugest to use with casparcg those qtlre files?

Best regards
siconova
 
Posts: 81
Joined: 04 May 2011, 20:02

Re: CasparCG Conformer

Postby Robert Nagy » 19 Jun 2012, 23:09

siconova: You would need SSD drives to use qtrle.

There are quite a few options for video playback, here are some, what is best depends on your needs and hardware.

Here is a few alternatives:

  • qtrle (lossless w/ alpha) - Horrible compression. This option is most tested and used by SVT.
  • huffyuv (lossless w/ alpha) - Better compression than qtrle.
  • libx264 (lossy w/o alpha) - Very good compression, use the -tune fastdecode parameter.
  • 2x libx264 (lossy w/ alpha) - Two h264 files, one for fill one for alpha.
  • vp6 (lossy w/ alpha) - Good compression. Unfortunately some encoders can't encode to a bitrate above 10Mbit/s.
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: CasparCG Conformer

Postby siconova » 01 Aug 2012, 22:05

Hi Robert,

I tested RLE, DNxHD, huffyuv, ffvhuff, mjpeg, lagarith and ffv1 codecs and the winer was QT animation (ffvhuff is really nice).. CasparCG server works like a charm and I´m amazed how low power requires from the hardware.. I´m playing lots of logos, stingers, flash templates and full hd videos at the same time on an intel 7i (8 cores), 6gb ram with a nvidia gtx 550 ti and I´m only using 25% of processor.

Thanks a lot for this fantastic tool!!!
siconova
 
Posts: 81
Joined: 04 May 2011, 20:02

Re: CasparCG Conformer

Postby jalowin » 19 Sep 2013, 11:00

Hi everybody

I have modified the code of caspar conformer for two things

1.- Now can you pass a file with spaces or another symbol with problem and the file output is the same
2.- Now can you pass the extension for the file in the xml and now can you convert for example the avi to mp4 or mov to avi or ... to ...

This is the change for xml

<Target extension=".avi" command="-s 480x360 -aspect 4:3 -r 25 -vcodec libx264 -async 1 -g 25 -acodec libmp3lame -ab 64k -ar 48000 -ac 2 -threads 4 -vpre libx264-medium -b 550k" result=".mp4"/>
Attachments
CasparCG.Conformer.Core.rar
(2.38 KiB) Downloaded 532 times
jalowin
 
Posts: 24
Joined: 10 Sep 2013, 13:03

Re: CasparCG Conformer

Postby westis » 11 Dec 2013, 22:37

Is there anything like this for Linux? We are creating a transcoding server, and would love something like this for to convert files to a common format. But we are using Linux on that server.
westis
 
Posts: 19
Joined: 04 Nov 2013, 09:08

Re: CasparCG Conformer

Postby LukasG » 27 Oct 2014, 11:17

Hi, Is anywhere compiled version of CCG Conformer? Or can it someone compile for me?
Thanks
User avatar
LukasG
 
Posts: 42
Joined: 27 May 2012, 10:38

Re: CasparCG Conformer

Postby Oceanwatcher » 09 Feb 2016, 18:29

Is this project dead?
--
Regards,

Svein Wisnaes
http://www.oceanwatcher.com/
User avatar
Oceanwatcher
 
Posts: 41
Joined: 18 Jul 2012, 20:45
Location: Itajubá, MG, Brazil


Return to Tech and Development

Who is online

Users browsing this forum: No registered users and 5 guests