Good afternoon
Is there any way to delay the entry of a watermark?
I need the first five seconds of the video to be without the watermark and then appear and continue until the end.
Any ideas?
Thank you
Delayed watermark
Re: Delayed watermark
Hey Transferred!
Welcome to the forum and thank you for using ffastrans!
nice first question. The best way to do this that comes to my head is using a "custom avisynth script" processor (from category Filters).
We can e.g. use the avisynth "Conditional Filter", in the example below it checks for framenumber > 20.
Don't forget to replace the path to your image in the ImageSource function and look up the settings for the "Layer" function here:
http://avisynth.nl/index.php/Layer
Welcome to the forum and thank you for using ffastrans!
nice first question. The best way to do this that comes to my head is using a "custom avisynth script" processor (from category Filters).
We can e.g. use the avisynth "Conditional Filter", in the example below it checks for framenumber > 20.
Code: Select all
m_clip = ConvertTo8Bit(m_clip)
LoadPlugin("%s_ffastrans_dir%\processors\ffmpeg\x64\plugins+\ImageSeq.dll")
m_clip = ConvertToRGB32(m_clip)
watermark = ImageSource("C:\Users\bussi\Pictures\ffas\app_full.jpg", start=20, end=m_clip.FrameCount, pixel_type = "rgb32")
watermark_clip = Layer(m_clip, watermark, "add", 257, x=Round(0), y=Round(0))
m_clip = ConditionalFilter(m_clip, watermark_clip, m_clip, "current_frame", ">", "20")
m_clip = ConvertToYUV444(m_clip)
Return m_clip
http://avisynth.nl/index.php/Layer
emcodem, wrapping since 2009 you got the rhyme?
-
- Posts: 4
- Joined: Wed Dec 25, 2019 11:18 pm
Re: Delayed watermark
Thank you very much for your response emcodem
I tried with your custom avisynth script, but there is an error:
Job ended with error on H.264@OLD: Encoding failed - No video or audio found in media.
The avisynth script is:
The workflows have:
Monitor folder - A/V Media - ChannelMapper - Custom AviSynth script - Encode H.264 - Deliveries folder
I submit a *.avi file codec:MPEG-4 Video (Xvid)
Thanks for your time
I tried with your custom avisynth script, but there is an error:
Job ended with error on H.264@OLD: Encoding failed - No video or audio found in media.
The avisynth script is:
Code: Select all
m_clip = ConvertTo8Bit(m_clip)
LoadPlugin("%s_ffastrans_dir%\processors\ffmpeg\x64\plugins+\ImageSeq.dll")
m_clip = ConvertToRGB32(m_clip)
watermark = ImageSource("C:\IN\logo.png", start=125, end=m_clip.FrameCount, pixel_type = "rgb32")
watermark_clip = Layer(m_clip, watermark, "add", 257, x=Round(0), y=Round(0))
m_clip = ConditionalFilter(m_clip, watermark_clip, m_clip, "current_frame", ">", "125")
m_clip = ConvertToYUV420(m_clip)
Return m_clip
Monitor folder - A/V Media - ChannelMapper - Custom AviSynth script - Encode H.264 - Deliveries folder
I submit a *.avi file codec:MPEG-4 Video (Xvid)
Thanks for your time
Re: Delayed watermark
Hey,
unfortunately i cannot reproduce your problems, but i have 2 things:
Change start=125 to start=0 (read about what start means for imagesource function here: http://avisynth.nl/index.php/ImageSource)
And could you try with another sourcefile than an .avi file please?
If it still does not work, please disconnect the h264 encoding node and connect the output of the custom avisynth filter with the deliver node.
In the output folder that you did set in the deliver node, you find a .avs file then, please upload the contents here. (you may need to rename the file to .txt before uploadig here)
Thanks!
unfortunately i cannot reproduce your problems, but i have 2 things:
Change start=125 to start=0 (read about what start means for imagesource function here: http://avisynth.nl/index.php/ImageSource)
Code: Select all
watermark = ImageSource("C:\IN\logo.png",start=125, end=m_clip.FrameCount, pixel_type = "rgb32")
If it still does not work, please disconnect the h264 encoding node and connect the output of the custom avisynth filter with the deliver node.
In the output folder that you did set in the deliver node, you find a .avs file then, please upload the contents here. (you may need to rename the file to .txt before uploadig here)
Thanks!
emcodem, wrapping since 2009 you got the rhyme?
-
- Posts: 4
- Joined: Wed Dec 25, 2019 11:18 pm
Re: Delayed watermark
This is amazing, thanks for your help.
It works very well. The delay time can be set in the last argument, changing "XX" to the number of delay frames:
I have submitted several types of files (* .avi, * .mov, * .mxf) and everything has been processed correctly.
I'm very grateful!
It works very well. The delay time can be set in the last argument, changing "XX" to the number of delay frames:
Code: Select all
m_clip = ConditionalFilter (m_clip, watermark_clip, m_clip, "current_frame", ">", "XX")
I'm very grateful!