This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 39 - Pages: 3 [ 1 2 3 | Next ] - Last Post: 19-May-2018 16:01 Last Post By: RobM Threads: [ Previous | Next ]
JSChasle

Posts: 6
Registered: 2-Jul-2013
Video overlay + video for sale without overlay
Posted: 09-May-2018 15:10
 
  Click to reply to this thread Reply
Hi,

I know I can add an overlay to my videos, but if I want to sell them without the overlay I guess I would need a second video (higher quality encoding) and without the overlay. Is this possible to do automatically?

So when people would preview the video they would have the overlay and lower quality, when they buy it they would receive a link to download the non overlay high quality video.

Thanks,
JeffTucker

Posts: 6,870
Registered: 31-Jan-2006
Re: Video overlay + video for sale without overlay
Posted: 09-May-2018 15:15   in response to: JSChasle in response to: JSChasle
 
  Click to reply to this thread Reply
The overlay appears only on the thumbnail for the video. The video itself isn't touched.

jAlbum currently doesn't provide any way to include two versions of a video (low vs high quality, for example) in a single album. You'd have to handle that on your own - when someone purchases a video, you give them a link to the high quality one for downloading.
JSChasle

Posts: 6
Registered: 2-Jul-2013
Re: Video overlay + video for sale without overlay
Posted: 09-May-2018 23:31   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I dont mind doing 2 versions, but there is no way for jalbum to put an overlay on the video? Only the thumbmail does not really help me.
JeffTucker

Posts: 6,870
Registered: 31-Jan-2006
Re: Video overlay + video for sale without overlay
Posted: 10-May-2018 00:41   in response to: JSChasle in response to: JSChasle
 
  Click to reply to this thread Reply
There's nothing built into jAlbum to do that, but it's just using ffmpeg to process the videos. If you go to Album > Settings > Videos > Advanced and check the Use custom settings box, you can add your own flags to the ffmpeg processing, including a flag to superimpose an icon or image on the video.

I'm afraid you'll have to do your own research and experimentation about how, exactly, to put the attributes together. Do some searching on ffmpeg overlay image.
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 10-May-2018 20:07   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
There's nothing built into jAlbum to do that, but it's just using ffmpeg to process the videos. If you go to Album > Settings > Videos > Advanced and check the Use custom settings box, you can add your own flags to the ffmpeg processing, including a flag to superimpose an icon or image on the video.
Having had a bit of a play with the Advanced settings it doesn’t seem like you can specify multiple inputs, so adding an overlay image won’t work. That leaves either using the command line or writing an external tool to run it within jAlbum, and passing switches like ‘-filter_complex’ is not easy.
JeffTucker

Posts: 6,870
Registered: 31-Jan-2006
Re: Video overlay + video for sale without overlay
Posted: 10-May-2018 20:22   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I haven't had a chance to tinker with this (and won't for a while), so I'll have to take your word for it. But if you're just trying to plant an overlay icon on the video, like a watermark, it looks like you need only a couple of extra flags:
-i watermark.png -filter_complex "overlay=10:10"

Might be tricky to get the path to the overlay correct, but otherwise it looks straightforward enough.

ETA: This is what I was looking at: http://ksloan.net/watermarking-videos-from-the-command-line-using-ffmpeg-filters/

Edited by: jGromit on 10-May-2018 14:24
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 10-May-2018 20:38   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
I haven't had a chance to tinker with this (and won't for a while), so I'll have to take your word for it. But if you're just trying to plant an overlay icon on the video, like a watermark, it looks like you need only a couple of extra flags:
-i watermark.png -filter_complex "overlay=10:10"

Might be tricky to get the path to the overlay correct, but otherwise it looks straightforward enough.

ETA: This is what I was looking at: http://ksloan.net/watermarking-videos-from-the-command-line-using-ffmpeg-filters/

Using an external tool you can use the command
Process ps;
ps = Runtime.getRuntime().exec(new String[]{ffmpeg, "-i", imageFolder + "/original.mp4", "-i", imageFolder + "/mowerman.png", "-filter_complex", "overlay=(W-w)/2:(H-h)/2", imageFolder + "/" + "test.mp4"});
. This is just an example, you would need to code the input video and output video names, instead of original.mp4 and test.mp4.
The additional code to make it all work as an external tool can be found here
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 10-May-2018 20:41   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
But, ffmpeg has a delogo function that will interpolate pixels around a logo to remove it from a video. It would seem that to get around that the logo needs to be big enough to cause interpolation problems but not big enough to obliterate the video itself.
JSChasle

Posts: 6
Registered: 2-Jul-2013
Re: Video overlay + video for sale without overlay
Posted: 11-May-2018 15:06   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thanks try you guys solution this weekend and let you know. Thanks for taking the time to answer my question.
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 13-May-2018 00:58   in response to: JSChasle in response to: JSChasle
 
  Click to reply to this thread Reply
I have created an external tool, if you want to try the attached. It will add a watermark/logo to all videos in a project. It takes the original video and renames it by appending '_Original' to the base filename and then excludes that video from the project. It then creates a watermarked copy of the original using the original files filename.

As usual, no warranty of any sort, use it at your own risk - I have run it successfully on a test project

Instructions
Save the attached in the 'tools' subfolder of the jAlbum configuration folder (*Shift + Cmd/Cntrl + C*, then place in the tools folder).

Add a logo/watermark image to your project's root folder, a transparent png should work best. If the image is not used elsewhere in your project exclude it.

Go to Menu/Tools/External tools and select the watermark videos tool.

Select a location for the watermark, top left, top right, bottom left, bottom right or centre.

Enter the filename of the image added to the root of your project, include the extension.

Click 'OK'. After a while if the videos don't show up press F5 to update the display.

Note, if you add any further videos you will need to temporarily exclude all of the existing watermarked videos, otherwise they will be reprocessed (renamed and another video created). It can probably be updated to optionally process a single folder/file if needed.

Let me know what you think.
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 13-May-2018 22:35   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I have updated the tool to work with links, originally it only worked for videos added to the project. If linked videos are included the link is renamed but the original file is not, the watermarked video is added to the project, not to the location of the original file.

The updated tool is here
davidekholm

Posts: 3,222
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 14-May-2018 15:56   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thanks Rob. I assume you use ffmpeg under the hood? Was there anything stopping you from getting this effect by adding custom parameters to ffmpeg via Settings->Videos->Advanced?
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 14-May-2018 16:04   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Thanks Rob. I assume you use ffmpeg under the hood? Was there anything stopping you from getting this effect by adding custom parameters to ffmpeg via Settings->Videos->Advanced?
Yes, it uses ffmpeg.

When you add a second -i as a name item and hit apply, close the window and reopen it the first -i now shows the value set for the second -1 but the second -i has been removed. In short, you only allow a single input (-i) file reference and an overlay requires two inputs as well as a complex filter setting.
davidekholm

Posts: 3,222
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 15-May-2018 18:00   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
davidekholm wrote:
Thanks Rob. I assume you use ffmpeg under the hood? Was there anything stopping you from getting this effect by adding custom parameters to ffmpeg via Settings->Videos->Advanced?
Yes, it uses ffmpeg.

When you add a second -i as a name item and hit apply, close the window and reopen it the first -i now shows the value set for the second -1 but the second -i has been removed. In short, you only allow a single input (-i) file reference and an overlay requires two inputs as well as a complex filter setting.


I see. Well that's naturally a bug. The underlying data model doesn't allow duplicate name entries. It took some time to rewrite, affecting multiple classes and layers, but I want to support duplicate parameter names as ffmpeg does so and relies on it. Please try this beta: http://jalbum.net/download/beta/jalbum-core.jar
Put it inside jAlbum's lib folder, thereby overwriting your existing jalbum-core.jar file.
RobM

Posts: 3,224
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 15-May-2018 19:11   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
The settings does now allow multiple inputs, but to fully test it I need to know how to set the second input to the path to a specific file in the root folder. I tried $rootPath + "/logo.png" and $rootImageDirectory + "/logo.png" but neither worked.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums