0

I am a novice moodle administrator and, in addition, they ask me for things that I think are out of the ordinary. My users need their videos to have a dynamic watermark to prevent piracy.

I have evaluated some options, such as VDO Cipher, but they seem too expensive for a training that is offered almost free of charge.

Can you advise me something else? In addition to being an administrator, I am an application architect and maybe I could do a custom development, maybe using fmpeg or similar.

What do you recommend?

Jose A. Matarán
  • 1,044
  • 3
  • 13
  • 33
  • Assuming that you have a watermark image, you can try this solution to make the watermark move every X seconds : https://write.corbpie.com/creating-a-shifting-watermark-overlay-with-ffmpeg/ – Rems Jan 20 '23 at 08:25
  • @Rems He would need a text, something that he could pass for example as a parameter in the request, validate it and include it – Jose A. Matarán Jan 20 '23 at 10:27

1 Answers1

0

You can try this

ffmpeg -i video.mp4 -vf "drawtext=text='Text':x=w-mod(max(t\,0)*(w+tw)/10\,(w+tw)):y=h-text_h:fontsize=24:fontcolor=black:box=1:boxcolor=white@0.5:boxborderw=5" -c:a copy -y output.mp4

This will create a text that will scroll horizontally, for the duration of the video

"drawtext=text='Text' Change the "Text" here to match what you want

x=w-mod(max(t\,0)*(w+tw)/10\,(w+tw)) makes the text run across the screen in 10 seconds.

y=h-text_h positions the text at the bottom of the video

black:box=1:boxcolor=white@0.5: boxborderw=5 creates a frame around the text to make it more visible, but you can remove it

Note that you can use a font file of your choice by adding the "fontfile" option in the filter

Rems
  • 106
  • 7
  • It looks good, but it would generate a file for each resource and for each student. Is there a way for ffmpeg to act as a server and be able to view it, for example in an hmlt component? – Jose A. Matarán Jan 20 '23 at 15:22
  • 1
    Not sure what you want to do, but ffmpeg doesn't necessarily have to output a file. It can output a stream, if you put this `-` instead of the output file in the command , then you can play this stream in your html component – Rems Jan 20 '23 at 16:22