-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The filter complex does not put te quotation marks and null problem #53
Comments
It's just a log message, there is no need to escape spaces or wrap
parameters with quotes because it's done by Java process executor. So if it
works, it's ok.
пн, 26 авг. 2019, 15:12 Tarık Kılıç <notifications@github.com>:
… I try to trim videos and concat them. I want to create the following
command like that
./ffmpeg -i ../Desktop/ramb.mp4 -filter_complex
"[0:v]trim=start=0:end=5,setpts=PTS-STARTPTS[0]; [0:v]trim=start=10 :
end=15,setpts=PTS-STARTPTS[1]; [0][1]concat[2];
[0:v]trim=start=25,setpts=PTS-STARTPTS[3]; [2][3]concat [out1]" -map [out1]
../Desktop/cut_ramb2.mp4
but command constructed like this:
ffmpeg -i /var/www/contents/rawVideo/30_Rambo.mp4 -y -filter_complex
[0:v]trim=start=0.0:end=2.0:setpts:PTS-STARTPTS[0];
[0:v]trim=start=5.0:end=15.0:setpts:PTS-STARTPTS[1]; [0][1]null=concat[2];
[0:v]trim=start=40.0:end=45.0:setpts:PTS-STARTPTS[3]; [2][3]null=concat[4]
-map [4] /var/www/contents/trimmedVideo/trimmed_30_Rambo.mp4
and I am using Jaffre-wrapper in Java Code like this:
` FilterChain filterChain = new FilterChain();
filterChain.addFilter(
Filter.fromInputLink(StreamSpecifier.withInputIndexAndType(0,StreamType.VIDEO)).
setName("trim").
addArgument("start",start.toString()).
addArgument("end",end.toString()).
addArgument("setpts").
addArgument("PTS-STARTPTS").
addOutputLink(String.valueOf(outIndex++))
);
filterChainList.add(filterChain);
if(i != 0){
FilterChain filterChain1 = new FilterChain();
filterChain1.addFilter(
Filter.fromInputLink(String.valueOf(outIndex-2)).
addInputLink(String.valueOf(outIndex-1)).
addArgumentEscaped("concat").
addOutputLink(String.valueOf(outIndex++))
);
filterChainList.add(filterChain1);
}`
return FilterGraph.of().addFilterChains(filterChainList);
` FilterGraph filterGraph = createFilterChain();
FFmpegResult result = FFmpeg.atPath(ffmpegBin)
.addInput(UrlInput.fromPath(input))
.setOverwriteOutput(true)
.setFilter(filterGraph.getValue())
.addArgument("-map")
.addArgument("[" + out + "]")
.addOutput(UrlOutput.toPath(output))
.execute();`
Thanks for this project. This project helped me a lot.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#53?email_source=notifications&email_token=AAIJ47FDZLEVHSOHWNW53YDQGPCC7A5CNFSM4IPO7472YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHLUEDQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIJ47E5GE6BRADL4H64WLDQGPCC7ANCNFSM4IPO747Q>
.
|
@tarikkilic when constructing filter you have to specify filter name, but you specify
Also note the difference bnetween FilterChain and Filter:
|
To get detailed message you need to enable trace logs for Jaffree. Paste logs here if you need more help. |
Is that what you meant? and my ffmpeg code:
|
Yes, the error message is the following:
With Java process executor you don't need to escape or quot arguments. Probably you can't escape or quot. So just remove |
Problem Solved! Thanks a lot. But If I write ffmpeg in command-line, I must put quotationmarks to filter. But with Java process executor, I don't put quotation marks and works ffmpeg. I'm confused. Issue can be closed. Again thanks. |
I try to trim videos and concat them. Doesn't put quatation marks and null=concat instead of only using concat. And [0:v]trim=start=0.0:end=2.0:setpts:PTS-STARTPTS[0]; after could be setpts=PTS-STARTPTS but couldn't. I want to create the following command like that
./ffmpeg -i ../Desktop/ramb.mp4 -filter_complex "[0:v]trim=start=0:end=5,setpts=PTS-STARTPTS[0]; [0:v]trim=start=10 : end=15,setpts=PTS-STARTPTS[1]; [0][1]concat[2]; [0:v]trim=start=25,setpts=PTS-STARTPTS[3]; [2][3]concat [out1]" -map [out1] ../Desktop/cut_ramb2.mp4
but command constructed like this:
ffmpeg -i /var/www/contents/rawVideo/30_Rambo.mp4 -y -filter_complex [0:v]trim=start=0.0:end=2.0:setpts:PTS-STARTPTS[0]; [0:v]trim=start=5.0:end=15.0:setpts:PTS-STARTPTS[1]; [0][1]null=concat[2]; [0:v]trim=start=40.0:end=45.0:setpts:PTS-STARTPTS[3]; [2][3]null=concat[4] -map [4] /var/www/contents/trimmedVideo/trimmed_30_Rambo.mp4
and I am using Jaffre-wrapper in Java Code like this:
FilterChain filterChain = new FilterChain();
return FilterGraph.of().addFilterChains(filterChainList);
FilterGraph filterGraph = createFilterChain();
Thanks for this project. This project helped me a lot.
The text was updated successfully, but these errors were encountered: