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.
video ffmpeg
add a comment |
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.
video ffmpeg
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
add a comment |
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.
video ffmpeg
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.
video ffmpeg
video ffmpeg
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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