FFMPEG Crop black line down edge











up vote
0
down vote

favorite












I'm using FFMPEG to merge an equirectangular image with an equirectangular video. The image is scaled to fit the video, and then I need to adjust the rotation of the image by 90 degrees so I cut 25% off the left and put it on the right.



THe problem is the width is extending to 3458 with this process and I'm getting a black line down the edge.



[1:v]scale=3456:1728[hs11];
[hs11]colorkey=0x00ff00:0.9:0.1[hs12];
[hs12]split=2[hs1l][hs1r];
[hs1l]crop=out_w=864:out_h=1728:x=0:y=0[hs1lx];
[hs1r]crop=out_w=2592:out_h=1728:x=864:y=0[hs1rx];
[hs1rx][hs1lx]hstack=inputs=2[hs13];


Here is the command for this part with Fluent FFMPEG



  filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index+1}:v]`, outputs: `[hs${index+1}1]`})
filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}1]`, outputs: `[hs${index+1}2]`})
filter.push({filter: 'split',options: '2', inputs: `[hs${index+1}2]`, outputs: [`[hs${index+1}l]`,`[hs${index+1}r]`]})
filter.push({filter: 'crop',options: {out_w: width * 0.25, out_h: height, x: 0, y: 0}, inputs: `[hs${index+1}l]`, outputs: `[hs${index+1}lx]`})
filter.push({filter: 'crop',options: {out_w: width * 0.75, out_h: height, x: width * 0.25, y: 0}, inputs:`[hs${index+1}r]`, outputs: `[hs${index+1}rx]`})
filter.push({filter: 'hstack',options: {inputs : 2}, inputs: [ `[hs${index+1}rx]`, `[hs${index+1}lx]`], outputs: `[hs${index+1}3]`})
filter.push({filter: 'overlay', options: {enable: `between(t,${options.start},${options.end})`}, inputs: [init,`[hs${index+1}3]`], outputs: `[hs${index+1}x]`})


Here is one of the images I'm adjusting.



I'm trying to get that text into the centre hence cutting 25% off one side and putting it on the other side.



This would probably be better done with a remap filter but I'm not sure how to use that.



enter image description here










share|improve this question




















  • 2




    Share full command and, if you can, inputs
    – Gyan
    Nov 21 at 8:52










  • Thanks I have done
    – beek
    Nov 21 at 20:04















up vote
0
down vote

favorite












I'm using FFMPEG to merge an equirectangular image with an equirectangular video. The image is scaled to fit the video, and then I need to adjust the rotation of the image by 90 degrees so I cut 25% off the left and put it on the right.



THe problem is the width is extending to 3458 with this process and I'm getting a black line down the edge.



[1:v]scale=3456:1728[hs11];
[hs11]colorkey=0x00ff00:0.9:0.1[hs12];
[hs12]split=2[hs1l][hs1r];
[hs1l]crop=out_w=864:out_h=1728:x=0:y=0[hs1lx];
[hs1r]crop=out_w=2592:out_h=1728:x=864:y=0[hs1rx];
[hs1rx][hs1lx]hstack=inputs=2[hs13];


Here is the command for this part with Fluent FFMPEG



  filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index+1}:v]`, outputs: `[hs${index+1}1]`})
filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}1]`, outputs: `[hs${index+1}2]`})
filter.push({filter: 'split',options: '2', inputs: `[hs${index+1}2]`, outputs: [`[hs${index+1}l]`,`[hs${index+1}r]`]})
filter.push({filter: 'crop',options: {out_w: width * 0.25, out_h: height, x: 0, y: 0}, inputs: `[hs${index+1}l]`, outputs: `[hs${index+1}lx]`})
filter.push({filter: 'crop',options: {out_w: width * 0.75, out_h: height, x: width * 0.25, y: 0}, inputs:`[hs${index+1}r]`, outputs: `[hs${index+1}rx]`})
filter.push({filter: 'hstack',options: {inputs : 2}, inputs: [ `[hs${index+1}rx]`, `[hs${index+1}lx]`], outputs: `[hs${index+1}3]`})
filter.push({filter: 'overlay', options: {enable: `between(t,${options.start},${options.end})`}, inputs: [init,`[hs${index+1}3]`], outputs: `[hs${index+1}x]`})


Here is one of the images I'm adjusting.



I'm trying to get that text into the centre hence cutting 25% off one side and putting it on the other side.



This would probably be better done with a remap filter but I'm not sure how to use that.



enter image description here










share|improve this question




















  • 2




    Share full command and, if you can, inputs
    – Gyan
    Nov 21 at 8:52










  • Thanks I have done
    – beek
    Nov 21 at 20:04













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm using FFMPEG to merge an equirectangular image with an equirectangular video. The image is scaled to fit the video, and then I need to adjust the rotation of the image by 90 degrees so I cut 25% off the left and put it on the right.



THe problem is the width is extending to 3458 with this process and I'm getting a black line down the edge.



[1:v]scale=3456:1728[hs11];
[hs11]colorkey=0x00ff00:0.9:0.1[hs12];
[hs12]split=2[hs1l][hs1r];
[hs1l]crop=out_w=864:out_h=1728:x=0:y=0[hs1lx];
[hs1r]crop=out_w=2592:out_h=1728:x=864:y=0[hs1rx];
[hs1rx][hs1lx]hstack=inputs=2[hs13];


Here is the command for this part with Fluent FFMPEG



  filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index+1}:v]`, outputs: `[hs${index+1}1]`})
filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}1]`, outputs: `[hs${index+1}2]`})
filter.push({filter: 'split',options: '2', inputs: `[hs${index+1}2]`, outputs: [`[hs${index+1}l]`,`[hs${index+1}r]`]})
filter.push({filter: 'crop',options: {out_w: width * 0.25, out_h: height, x: 0, y: 0}, inputs: `[hs${index+1}l]`, outputs: `[hs${index+1}lx]`})
filter.push({filter: 'crop',options: {out_w: width * 0.75, out_h: height, x: width * 0.25, y: 0}, inputs:`[hs${index+1}r]`, outputs: `[hs${index+1}rx]`})
filter.push({filter: 'hstack',options: {inputs : 2}, inputs: [ `[hs${index+1}rx]`, `[hs${index+1}lx]`], outputs: `[hs${index+1}3]`})
filter.push({filter: 'overlay', options: {enable: `between(t,${options.start},${options.end})`}, inputs: [init,`[hs${index+1}3]`], outputs: `[hs${index+1}x]`})


Here is one of the images I'm adjusting.



I'm trying to get that text into the centre hence cutting 25% off one side and putting it on the other side.



This would probably be better done with a remap filter but I'm not sure how to use that.



enter image description here










share|improve this question















I'm using FFMPEG to merge an equirectangular image with an equirectangular video. The image is scaled to fit the video, and then I need to adjust the rotation of the image by 90 degrees so I cut 25% off the left and put it on the right.



THe problem is the width is extending to 3458 with this process and I'm getting a black line down the edge.



[1:v]scale=3456:1728[hs11];
[hs11]colorkey=0x00ff00:0.9:0.1[hs12];
[hs12]split=2[hs1l][hs1r];
[hs1l]crop=out_w=864:out_h=1728:x=0:y=0[hs1lx];
[hs1r]crop=out_w=2592:out_h=1728:x=864:y=0[hs1rx];
[hs1rx][hs1lx]hstack=inputs=2[hs13];


Here is the command for this part with Fluent FFMPEG



  filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index+1}:v]`, outputs: `[hs${index+1}1]`})
filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}1]`, outputs: `[hs${index+1}2]`})
filter.push({filter: 'split',options: '2', inputs: `[hs${index+1}2]`, outputs: [`[hs${index+1}l]`,`[hs${index+1}r]`]})
filter.push({filter: 'crop',options: {out_w: width * 0.25, out_h: height, x: 0, y: 0}, inputs: `[hs${index+1}l]`, outputs: `[hs${index+1}lx]`})
filter.push({filter: 'crop',options: {out_w: width * 0.75, out_h: height, x: width * 0.25, y: 0}, inputs:`[hs${index+1}r]`, outputs: `[hs${index+1}rx]`})
filter.push({filter: 'hstack',options: {inputs : 2}, inputs: [ `[hs${index+1}rx]`, `[hs${index+1}lx]`], outputs: `[hs${index+1}3]`})
filter.push({filter: 'overlay', options: {enable: `between(t,${options.start},${options.end})`}, inputs: [init,`[hs${index+1}3]`], outputs: `[hs${index+1}x]`})


Here is one of the images I'm adjusting.



I'm trying to get that text into the centre hence cutting 25% off one side and putting it on the other side.



This would probably be better done with a remap filter but I'm not sure how to use that.



enter image description here







video ffmpeg






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 at 2:41

























asked Nov 21 at 8:15









beek

132116




132116








  • 2




    Share full command and, if you can, inputs
    – Gyan
    Nov 21 at 8:52










  • Thanks I have done
    – beek
    Nov 21 at 20:04














  • 2




    Share full command and, if you can, inputs
    – Gyan
    Nov 21 at 8:52










  • Thanks I have done
    – beek
    Nov 21 at 20:04








2




2




Share full command and, if you can, inputs
– Gyan
Nov 21 at 8:52




Share full command and, if you can, inputs
– Gyan
Nov 21 at 8:52












Thanks I have done
– beek
Nov 21 at 20:04




Thanks I have done
– beek
Nov 21 at 20:04















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377195%2fffmpeg-crop-black-line-down-edge%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377195%2fffmpeg-crop-black-line-down-edge%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

AnyDesk - Fatal Program Failure

How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

QoS: MAC-Priority for clients behind a repeater