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


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

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 15 May 18, 22:46   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
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.

Ah, I made yet another update to the beta file introducing $projectPath (I didn't want to reuse rootPath as that's a relative path referring to the root output directory). Let me know how this works for you! Example use:
$projectPath/jalbum.png


Now I guess you will want to know how to programmatically manipulate the advanced video settings. Please pass me a project file containing a working logo overlay example and I'll see what I can do.
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 15 May 18, 23:19   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Attachment Video overly.zip (556.6 KB)
I think this is going to be tough :(
I now get this error
The following files could not be processed due to errors:
/Users/robert/My Albums/Video overly/slideshow.mp4: java.io.IOException: Error during video creation. Please review video settings. 
ffmpeg process terminated abnormally with code 1:
-vf/-af/-filter and -filter_complex cannot be used together for the same stream.
The -vf filter creates the video and the -complex_filter adds the watermark/overlay logo image,

More information on how to get round this is https://superuser.com/questions/781875/ffmpeg-error-vf-af-filter-and-filter-complex-cannot-be-used-together

I need to play about with the settings to see if I can use that solution.

Attached a minimal project of one video and one excluded logo.png, the video settings use
-i  $projectPath/logo.png
-complex_filter  overlay=10:10
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 15 May 18, 23:23   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thanks. Yes I also bumped into that nasty error. The ffmpeg developer seems rather responsive. Perhaps you can ask him what's the best way forward. We have a rather complex use of the -vf parameter to get the scaling right and can't leave out that parameter.
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 00:30   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
From what I can see about asking for help it seems as though you need to sign up to https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-user/
Then email the list with a question. I don't see anything about contacting the developer directly about asking a usage question.

If you have a better link than above can you let me know?
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 15:46   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I don't think so. I'd love if if you could dig into how to combine the overlay mechanism with the -vf argument somehow. To make it simple for the ffmpeg developer, ask him how to modify the following command line so it also applies a PNG logo overlay:
 ffmpeg -y -i video.mp4 -vf hqdn3d=1.5:1.5:6:6,scale=min(iw\,trunc(iw*min(10000/iw\,480/ih)*0.5)*2):min(ih\,trunc(ih*min(10000/iw\,480/ih)*0.5)*2),unsharp=3:3:1.0:3:3:0.0 -threads 0 -b:a 96k -ac 2 -ar 44100 -vcodec libx264 -crf 28 -metadata:s:v:0 rotate=0 -movflags faststart -pix_fmt yuv420p final-video.mp4


Edited by: RobM on 16-May-2018 14:47
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 15:58   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I have signed up to the listing, it makes posting questions quicker, and will post the question tonight - I’m off out for a while.

Having read some more and looked at a previous question in the mailing list about the difference between -vf and -filter_complex it seems that replacing -vf with -filter_complex should work.
These two commands produce the same result:
 
ffmpeg -f lavfi -i testsrc2=r=1:d=5 -f lavfi -i testsrc2=r=1:d=5
-filter_complex scale=flags=bicubic,format=yuv422p10le  -f framemd5 -
 
ffmpeg -f lavfi -i testsrc2=r=1:d=5 -f lavfi -i testsrc2=r=1:d=5 -vf
scale=flags=bicubic,format=yuv422p10le -f framemd5
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 16:12   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I tried to simple switch -vf to -filter_complex but that failed with a "No such filter "" " message. I then put quotes around all arguments and got: No such filter: '"hqdn3d' :-(
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 21:41   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I got the logo added to the movie, but can't get it to scale the video. Updated project attached.

I'll post a question to ffmpeg support later tonight, unless any wizard here has an answer :)

Edited by: RobM on 16-May-2018 21:03
Removed outdated project
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 22:03   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Attachment Video overly.zip (549.8 KB)
One Wizard found ;)
Attached final project with updated settings.

Edited by: RobM on 17-May-2018 10:38
For anyone trying the project on Windows you will probably need to change the path to the logo from $projectPath/logo.png to $projectPath\logo.png.
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 16 May 18, 22:26   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
What would be nice now, to go with this sort of thing, is to be able to use the custom settings and the quality and size settings in the GUI. At the moment you either have to set the quality and size (I used 'Use image bounds) and then select custom setting and change the settings, as in the attached project, or you need to replace all of those variables with fixed values.
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 17 May 18, 14:06   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thanks Rob. You're right. The only reason I blanked-out those quality and resolution fields was that if you use custom settings, they may not be respected (i.e. if you leave-out the $variables). However, this is an advanced feature after all so we shouldn't be overly "helpful". I've released another beta update which allows you to keep advanced settings open while playing with the quality and resolution controls.
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 17 May 18, 14:13   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Rob: Can you update the wiki docs to mention the variables that are now respected: projectPath, inputPath, outputPath, videoWidth, videoHeight, videoQuality, clipStart and clipLength ?

(To be complete, we also have the following variables: fileName, label, inputDirectory, outputDirectory and normalizeOrientation)
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 17 May 18, 16:33   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Rob: Can you update the wiki docs to mention the variables that are now respected: projectPath, inputPath, outputPath, videoWidth, videoHeight, videoQuality, clipStart and clipLength ?

(To be complete, we also have the following variables: fileName, label, inputDirectory, outputDirectory and normalizeOrientation)

I’ll do it tonight, when I fire up the Mac, also I’ll add the video overlay metho as a coding example for video advanced settings.
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Video overlay + video for sale without overlay
Posted: 17 May 18, 17:18   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Great! Thanks Rob.
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Video overlay + video for sale without overlay
Posted: 18 May 18, 00:48   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Rob: Can you update the wiki docs to mention the variables that are now respected: projectPath, inputPath, outputPath, videoWidth, videoHeight, videoQuality, clipStart and clipLength ?

(To be complete, we also have the following variables: fileName, label, inputDirectory, outputDirectory and normalizeOrientation)

I have updated the video settings wiki page to the best of my ability, though I might not have everything right! If anyone reading this thread spots any errors please let me know or jump in and correct them.
Legend
Forum admins
Helpful Answer
Correct Answer

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