<operation
id="composite"
if="${publishToYouTube}"
fail-on-error="true"
exception-handler-workflow="error"
description="Puts several input videos on a single canvas for Youtube publication">
<configurations>
<configuration key="source-flavor-upper">presentation/trimmed</configuration>
<configuration key="source-flavor-lower">presenter/trimmed</configuration>
<configuration key="source-tags-upper">comp,rss</configuration>
<configuration key="source-tags-lower">comp,rss</configuration>
<!--<configuration key="source-tags-watermark">branding</configuration>
<configuration key="source-flavor-watermark">image/work</configuration>
<configuration key="source-url-watermark">file:///Users/me/logo.jpg</configuration> -->
<configuration key="encoding-profile">composite.http</configuration>
<configuration key="target-tags">composite,rss,atom,archive</configuration>
<configuration key="target-flavor">composite/delivery</configuration>
<configuration key="output-resolution">1920x1080</configuration>
<configuration key="output-background">black</configuration>
<configuration key="layout">topleft</configuration>
<configuration key="layout-topleft">
{"horizontalCoverage":1.0,"anchorOffset":{"referring":{"left":1.0,"top":1.0},"offset":{"y":-20,"x":-20},"reference":{"left":1.0,"top":1.0}}};
{"horizontalCoverage":0.2,"anchorOffset":{"referring":{"left":0.0,"top":0.0},"offset":{"y":-20,"x":-20},"reference":{"left":0.0,"top":0.0}}};
{"horizontalCoverage":1.0,"anchorOffset":{"referring":{"left":1.0,"top":0.0},"offset":{"y":20,"x":20},"reference":{"left":1.0,"top":0.0}}}
</configuration>
<configuration key="layout-topright">
{"horizontalCoverage":1.0,"anchorOffset":{"referring":{"left":1.0,"top":1.0},"offset":{"y":-20,"x":-20},"reference":{"left":1.0,"top":1.0}}};
{"horizontalCoverage":0.2,"anchorOffset":{"referring":{"left":1.0,"top":0.0},"offset":{"y":-20,"x":-20},"reference":{"left":1.0,"top":0.0}}};
{"horizontalCoverage":1.0,"anchorOffset":{"referring":{"left":0.0,"top":0.0},"offset":{"y":20,"x":20},"reference":{"left":0.0,"top":0.0}}}
</configuration>
</configurations>
</operation>
(FFmpegEncoderEngine:189) - Invalid file index 1 in filtergraph description [0:v]scale=1920:1080,pad=1920:1080:0:0:black[lower];[1:v]scale=384:216[upper];[lower] [upper]overlay=0:0[out];[0:a][1:a]amix=inputs=2[aout].
The upper video 'http://somewhere.com/archive/archive/mediapackage/b7459b0b-479f-491e-97ad-370bd5869bf5/061806ef-1d2a-484a-ac51-4725c6b96db5/2/track.mp4' and lower video 'http://somewhere.com/archive/archive/mediapackage/b7459b0b-479f-491e-97ad-370bd5869bf5/4afe9afa-4c0f-4e39-8e4d-40e5ff2842aa/2/track.mp4' with the optional watermark '#{watermark}' could not be composite by the encoding profile 'composite.http' with the properties '{compositeCommand=-i /srv/opencast/workspace/http_classture.pucv.cl/archive/archive/mediapackage/b7459b0b-479f-491e-97ad-370bd5869bf5/061806ef-1d2a-484a-ac51-4725c6b96db5/2/track.mp4 -filter_complex [0:v]scale=1920:1080,pad=1920:1080:0:0:black[lower];[1:v]scale=384:216[upper];[lower][upper]overlay=0:0[out];[0:a][1:a]amix=inputs=2[aout] -map [out] -map [aout]}'.
--
You received this message because you are subscribed to the Google Groups "Opencast Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.
Hi Sven,
would that cause the composite woh to not include one input file in the
FFmpeg command line? If so, then it sounds definitely like a bug. If it
already detects the mistake, it should complain and not build a
mismatching filter chain.
[root@abrams-mk3 mlira]#
ffmpeg -nostats -i
/srv/opencast/workspace/somewhere/archive/archive/mediapackage-4c0f-4e39-8e4d-40e5ff2842aa/2/track.mp4
-filter:v -i
/srv/opencast/workspace/somewhere/archive/archive/me5/061806ef-1d2a-484a-ac51-4725c6b96db5/2/track.mp4
-filter_complex
'[0:v]scale=1920:1080,pad=1920:1080:0:0:black[lower]ay=0:0[out];[0:a][1:a]amix=inputs=2[aout]'
-map [out] -map [aout] -c:a flac -c:v libx264 -crf 10 -preset fast
/srv/openarchive/mediapackage/b7459b0b-479f-491e-97ad-370bd5869bf5/4afe9afa-4c0f-4e39-8e4d-40e5ff2842aa/2/track_c8f81b00-1521-40
ffmpeg version 3.2.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-4) 20161202
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio tconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enablee-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-mrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0,
mov,mp4,m4a,3gp,3g2,mj2, from
'/srv/opencast/workspace/somewhere/archive/archive/mediapackage/b70f-4e39-8e4d-40e5ff2842aa/2/track.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.25.101
Duration: 01:16:03.44, start: 0.000000, bitrate: 290 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 189 lt)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
Metadata:
handler_name : SoundHandler
Invalid file index 1 in filtergraph description [0:v]scale=1920:1080,pad=1920:1080:0:0:black[lower];[1:v]scale=384:216[a]amix=inputs=2[aout].
ffmpeg -i pipInput2.flv -i pipInput1.flv -filter_complex "[1]scale=iw/5:ih/5 [pip]; [0][pip] overlay=main_w-overlay_w-10:10" -profile:v main -level 3.1 -b:v 440k -ar 44100 -ab 128k -s 720x400 -vcodec h264 -acodec libfaac PIP_output3.mp40:v]scale=1920:1080,pad=1920:1080:0:0:black[lower];[1:v]scale=384:216[a]amix=inputs=2[aout]Hi Max,
I was in your position 2 years ago. Although ffmpeg cmds actually worked
unfortunately OC uses json values to put the two streams.
I will give you an example from our videos.
We have a coverimage in png in 1280x720
<operation
id="composite"
fail-on-error="true"
exception-handler-workflow="ng-partial-error"
description="Add coverimage to the combined video">
<configurations>
<configuration
key="source-flavor-upper">presentation/resized</configuration>
<configuration
key="source-flavor-lower">presenter/trimmed</configuration>
<configuration
key="source-tags-watermark">branding</configuration>
<configuration
key="source-flavor-watermark">image/cover</configuration>
<configuration
key="encoding-profile">composite.http</configuration>
<configuration
key="target-flavor">composite/delivery</configuration>
<configuration key="output-resolution">1280x720</configuration>
<configuration key="output-background">blue</configuration>
<configuration key="layout">topleft</configuration>
<configuration key="layout-topleft">
{"horizontalCoverage":0.375,"anchorOffset":{"referring":{"left":0.0,"top":0.133},"reference":{"left":0.0,"top":0.133},"offset":{"x":0,"y":0}}};
{"horizontalCoverage":0.625,"anchorOffset":{"referring":{"left":1.0,"top":0.5},"reference":{"left":1.0,"top":0.5},"offset":{"x":0,"y":0}}};
{"horizontalCoverage":1.000,"anchorOffset":{"referring":{"left":1.0,"top":0.0},"reference":{"left":1.0,"top":0.0},"offset":{"x":0,"y":0}}};
</configuration>
<configuration key="layout-topright">
{"horizontalCoverage":0.375,"anchorOffset":{"referring":{"left":0.0,"top":0.133},"reference":{"left":0.0,"top":0.133},"offset":{"x":0,"y":0}}};
{"horizontalCoverage":0.625,"anchorOffset":{"referring":{"left":1.0,"top":0.5},"reference":{"left":1.0,"top":0.5},"offset":{"x":0,"y":0}}};
{"horizontalCoverage":1.000,"anchorOffset":{"referring":{"left":1.0,"top":0.0},"reference":{"left":1.0,"top":0.0},"offset":{"x":0,"y":0}}};
</configuration>
</configurations>
</operation>
This is our step. In the left side we have a presenter video with
480x330 and in the right a presentation with 800x600. Padding top 30px,
padding bottom 30px(as you can see from the png). Sven explained to me
at that time how this WOH works. Unfortunately I cannot find the
email/thread any more.
But in general you have to do the math. In our case I remember only
{"horizontalCoverage":0.375 -> 480/1280
{"horizontalCoverage":0.625 -> 800/1280
{"horizontalCoverage":1.000 -> 1280/1280
The another values came also with the same way (y divided with total
length) and after a lot of testing.
Sotake some painkillers and start doing the math for you case.
Hope my email helps you a bit.
Regards
Stefanos
On 02/09/2017 11:47 PM, Max Lira wrote:
for posting the data.
Regards,
Lars
On Thu, 9 Feb 2017 13:16:46 -0800 (PST)
Max Lira <max...@gmail.com <javascript:>> wrote:
> Thanks for your Answers guys, Im still with the problem, but I have
> some findings.
>
> - The WOH is using the two video streams (presenter and presentation)
> and changed from trimmed to themed (like the compose WOH).
>
> - I commented the source-tag-flavour and the watermark configuration
> keys, still with the problem.
>
> -Trying to manually with ffmpeg to make this (using the parameters
> Opencast is using gave me this error:
>
> [root@abrams-mk3 mlira]#
> ffmpeg -nostats -i
>
/srv/opencast/workspace/somewhere/archive/archive/mediapackage-4c0f-4e39-
> 8e4d-40e5ff2842aa/2/track.mp4
> -filter:v -i
>
/srv/opencast/workspace/somewhere/archive/archive/me5/061806ef-1d2a-484a-
> ac51-4725c6b96db5/2/track.mp4
> -filter_complex
>
'[0:v]scale=1920:1080,pad=1920:1080:0:0:black[lower]ay=0:0[out];[0:a][1:a]amix=inputs=2[aout]'
> -map [out] -map [aout] -c:a flac -c:v libx264 -crf 10 -preset fast
>
/srv/openarchive/mediapackage/b7459b0b-479f-491e-97ad-370bd5869bf5/4afe9afa-
> 4c0f-4e39-8e4d-40e5ff2842aa/2/track_c8f81b00-1521-40
> ffmpeg version 3.2.2-static http://johnvansickle.com/ffmpeg/>to
> make PIP, worked without problems.
>
> ffmpeg -i pipInput2.flv -i pipInput1.flv -filter_complex
> "[1]scale=iw/5:ih/5 [pip]; [0][pip] overlay=main_w-overlay_w-10:10"
> -profile:v main -level 3.1 - b:v 440k -ar 44100 -ab 128k -s 720x400
> -vcodec h264 -acodec libfaac PIP_output3.mp4
>
>
>
> -Trying with the Opencast videos but using the console commands from
> above without problems I get the PIP video without problems
>
> - Sven: I tried changing what you say but the problem persist.
>
> With all of this tests I can asuume that the line:
>
0:v]scale=1920:1080,pad=1920:1080:0:0:black[lower];[1:v]scale=384:216[a]amix
> =inputs=2[aout]
>
> In ffmpeg have problems, so, can someone with this WOH to helpme with
> the JSON parameters?
>
> El jueves, 9 de febrero de 2017, 16:56:44 (UTC-3), Sven Stauber
> escribió:
> >
> > Hi Lars,
> >
> > Hi Sven,
> >> would that cause the composite woh to not include one input file
> >> in the FFmpeg command line? If so, then it sounds definitely like
> >> a bug. If it already detects the mistake, it should complain and
> >> not build a mismatching filter chain.
> >>
> >
> > No, it wouldn't. But as far as I know, WOH composite expects the
> > streams to fit onto the canvas.
> >
> > Best,
> > Sven
> >
>
--
You received this message because you are subscribed to the Google
Groups "Opencast Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to users+un...@opencast.org
<mailto:users+un...@opencast.org>.