cancel
Showing results for 
Search instead for 
Did you mean: 

FFMPEG ${opts}

patdelaney
Champ on-the-rise
Champ on-the-rise
We are running Alfresco 4.2.c and I an having an issue with Alfresco creating thumbnails for shot video clips. I can see in the alfresco log why it's failing. It's sending the following:/home/Administrator/Downloads/ffmpeg/ffmpeg -y -ss 10 -i /opt/alfresco-…

The issue is that it's sending -ss 10 which means grab a thumbnail 10 seconds in. I see in the video-thumbnail-context.xml the following line:
<value>${ffmpeg.exe} ${opts} ${infile_opts} -i '${source}' ${outfile_opts} '${target}' 2&gt; /dev/null</value>

But I can't find where the ${opts} are defined in any configuration file.

Does anyone have any thoughts on this?


Pat
7 REPLIES 7

rjohnson
Star Contributor
Star Contributor
You need to read down the video-thumbnail-context.xml file a bit. You will see a line


<prop key="opts">-y</prop>


You worked on the same principal I did when I first started which is that the definition must come before use, but that doesn't have to be true, the XML is read, then processed so definitions can come after the instructions for use.

Thanks Bob -
I see the prop key and it's defined as -y but in the alfresco log I see more options: -y -ss 10 -i

This is the log entry:
/home/Administrator/Downloads/ffmpeg/ffmpeg -y -ss 10 -i /opt/alfresco-4.2.c/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_5804825514778967776.mov -f image2 -vframes 1 /opt/alfresco-4.2.c/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_2452132013963075601.jpg

So where is -ss 10 -i coming from

Read the next line down in my file it reads


<prop key="infile_opts">-ss 10</prop>


the -i is in the command line itself


<value>${ffmpeg.exe} ${opts} ${infile_opts} -i "${source}" ${outfile_opts} "${target}" 2&gt; NUL</value>


So the the file I was checking (video-thumbnail-context.xml) did not have that setting, but I had a version called video-thumbnail-context.xml.orig and that had the -ss 10 settings. It appears that the settings were being picked up by that file? I renamed the video-thumbnail-context.xml.orig tp x-video-thumbnail-context.xml.orig and restarted the Alfresco server. and I am still getting the -ss 10. It must be reading a differnt config file. Do I need to jack up the logging to see what file ffmpeg or the bean is using?  Please fell free to email me pat.delaney@avid.com and I can setup a webex if you would like to look or your self.

Alfresco.log attached as well as video-thumbnail-context.xml.

rjohnson
Star Contributor
Star Contributor
I suspect that you have more than one video-thumbnail-context.xml file in your system; I can think of no other reason. Can you do a file search and tell me the paths that your context files are in?

There are backups of the file but with differnt names. there are no other instances that I can fine.
UGH

rjohnson
Star Contributor
Star Contributor
Your video-thumbnail-context.xml is slightly different from mine in that yous has the following at the top


<!–
    THE FOLLOWING alfresco-global.properties MUST ALSO BE SET
    =========================================================

# ffmpeg.thumbnail
# ================
content.transformer.ffmpeg.thumbnail.priority=50
content.transformer.ffmpeg.thumbnail.extensions.3g2.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.3gp.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.asf.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.avi.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.avx.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.flv.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mov.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.movie.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mp4.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mpeg2.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mpg.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.ogv.jpg.supported=true
content.transformer.ffmpeg.thumbnail.extensions.wmv.jpg.supported=true

–>

Mine doesn't. Now I have some explicit transform definitions that you don't, and that made me wonder if the options that seem to be being ignored are being set in alfresco-global.properties. There is some chat about changes in 4.2d and your context looks like the 4.2d one because of these comments. See

https://issues.alfresco.com/jira/browse/ALF-19056?attachmentOrder=desc

If thats not it, I'm a bit stumped.

Please do let me know how you get on.