Com­mu­niqué Dig­i­tal Asset Man­age­ment (CQ DAM) pro­vides enterprise-wide shar­ing and dis­tri­b­u­tion of an organization’s key dig­i­tal assets. Users across an orga­ni­za­tion can store, man­age, and access dig­i­tal assets such as images, graph­ics, audio, video, and doc­u­ments through a Web inter­face (or a CIFS or Web­DAV folder). As soon as an asset is uploaded to DAM, a num­ber of asyn­chro­nous work­flows get trig­gered in the back­ground which extract meta­data infor­ma­tion from the asset and gen­er­ated ren­di­tions of dif­fer­ent size/format/resolution for the uploaded image. For any video asset, 3 image ren­di­tions and 3 video ren­di­tions get gen­er­ated by default .CQ DAM relies on ffm­peg exe­cutable for pro­duc­ing video ren­di­tions of the uploaded file. This exe­cutable is not shipped along with CQ and user needs to install it man­u­ally on his sys­tem. The fol­low­ing sec­tion cov­ers instal­la­tion of ffm­peg on Red Hat Server.

 Installing FFm­peg on RHEL [Red hat Enter­prise 5.5]

1.       Down­load and install pack­ages for ffm­peg and its tran­si­tive depen­den­cies . Install them in the fol­low­ing sequence

1.       libavutil51-0.10.2–54.el5.x86_64.rpm

2.       libtheoradec1-1.1.1–13.el5.x86_64.rpm

3.       libtheora-1.1.1–1.fu14.x86_64.rpm

4.       libtheoraenc1-1.1.1–13.el5.x86_64.rpm

5.       libx264_118-0.118-17_20111111.2245.el5.x86_64.rpm

6.       libopencore-amrnb0-0.1.3–1.el5.x86_64.rpm

7.       libopencore-amrwb0-0.1.3–1.el5.x86_64.rpm

8.       libva-

9.       libswscale2-0.10.2–54.el5.x86_64.rpm

10.   libswresample0-0.10.2–54.el5.x86_64.rpm

11.   libpostproc52-0.10.2–54.el5.x86_64.rpm

12.   libdc1394_22-2.0.2–11.el5.x86_64.rpm

13.   libxavs1-0.1.51–2.el5.x86_64.rpm

14.   libmp3lame0-3.99.3–23.el5.x86_64.rpm

15.   libxvidcore4-1.2.2–14.el5.x86_64.rpm

16.   libgsm1-1.0.13–2.el5.x86_64.rpm

17.   libavcodec53-0.10.2–54.el5.x86_64.rpm

18.   librtmp0-2.3–1.el5.x86_64.rpm

19.   libavformat53-0.10.2–54.el5.x86_64.rpm

20.   libavfilter2-0.10.2–54.el5.x86_64.rpm

21.   SDL-1.2.14-2rt.x86_64.rpm

22.   libavdevice53-0.10.2–54.el5.x86_64.rpm

23.   ffmpeg-0.10.2–54.el5.x86_64.rpm

*Please check for the lat­est ver­sion of each of the above dependencies

2.       Mod­ify the audio codec and video codec accord­ing to the server plat­form and ffm­peg build used.

For exam­ple for ffmpeg-0.10.2–54.el5.x86_64.rpmto work on RHEL 5.5, audio codec needs to be changed to alac.

Fol­low the steps below to make the above change:

1.       Go to url http://<server>:<port>/etc/dam/video/hq.html

2.       Click Edit

3.       Go to Audio tab

4.       Set Codec to alac

Video Profile Settings

 Turn­ing ffm­peg for best performance

Media encod­ing is a CPU inten­sive process and hence may result in very high CPU usage on server machine. This might result in ffm­peg hog­ging all the CPU and slow­ing down of CQ instance.

Limit the num­ber of ren­di­tions pro­duced for each video

By default for each video file DAM gen­er­ates ren­di­tions in 3 file for­mats namely ogg,m4v and flv .You might want to limit the num­ber of ren­di­tions depend­ing upon your use case. This can be achieved via fol­low­ing steps.

1.       Go To work­flow con­sole http://<server>:<port>/libs/cq/workflow/content/console.html

2.       Edit DAM Update Asset work­flow

3.       Dou­ble click on work­flow step Ffm­peg transcoding

4.       Go to Process tab

5.       Edit argu­ments to set the required pro­file. Default value is set to profile:firefoxhq,profile:hq,profile:flv for gen­er­at­ing ogg,m4v and flv ren­di­tions respectively.

6.       Click OK.

7.       Click Save

The fol­low­ing snap­shot shows the set­ting for lim­it­ing ren­di­tion to flv.

Limiting Renditions to flv

Limit the num­ber of threads spawned by ffm­peg process

By default, the max­i­mum num­ber of threads spawned by each ffm­peg process is equal to the num­ber of cpu cores avail­able on the server. To limit the num­ber of threads launched by each ffm­peg process, fol­low the below steps:

1.       Go to url http://<server>:<port>/etc/dam/video/hq.html

2.       Click Edit

3.       Go to Advanced tab under Video Pro­file Settings

4.       Add argu­ment –threads X in the Cus­tom ffm­peg argu­ments text box where X is num­ber of threads launched by ffmpeg.

Limiting threads spawn by ffmpeg

*For details on FFm­peg, please refer to http://​ffm​peg​.org/.