Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #205969 > unrolled thread
| Started by | Gerardo Ballabio <gerardo.ballabio@gmail.com> |
|---|---|
| First post | 2019-03-03 18:40 +0100 |
| Last post | 2019-03-06 15:20 +0100 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.debian.user
Help with video editing with ffmpeg Gerardo Ballabio <gerardo.ballabio@gmail.com> - 2019-03-03 18:40 +0100
Re: Help with video editing with ffmpeg Gerardo Ballabio <gerardo.ballabio@gmail.com> - 2019-03-06 12:10 +0100
Re: Help with video editing with ffmpeg mick crane <mick.crane@gmail.com> - 2019-03-06 13:30 +0100
Re: Help with video editing with ffmpeg rhkramer@gmail.com - 2019-03-06 17:30 +0100
Re: Help with video editing with ffmpeg Gerardo Ballabio <gerardo.ballabio@gmail.com> - 2019-03-13 10:40 +0100
Re: Help with video editing with ffmpeg mick crane <mick.crane@gmail.com> - 2019-03-13 16:40 +0100
Re: Help with video editing with ffmpeg Dan Ritter <dsr@randomstring.org> - 2019-03-06 15:20 +0100
| From | Gerardo Ballabio <gerardo.ballabio@gmail.com> |
|---|---|
| Date | 2019-03-03 18:40 +0100 |
| Subject | Help with video editing with ffmpeg |
| Message-ID | <xxDfH-74E-3@gated-at.bofh.it> |
Hello all, I have a video that was filmed under bad lighting conditions, the background is too bright and people in the foreground are dark. I'm trying to use ffmpeg to correct it. Please kindly help me. Here you can find a snippet: https://drive.google.com/drive/folders/1aG04znyHdDio7cvgaQlovYTb8bX8NTLL?usp=sharing video1.mts is the original file. video2.mp4 was created by a friend of mine using proprietary software on Windows. I've been trying to reproduce that. video3.mts is the best result I obtained (see below) but the contrast is still too high and the colors aren't quite right. I've tried several of ffmpeg's effects but maybe there are some better ones that I missed? - "eq=brightness=..." turns black into grey and gives the video a "foggy" look, no good - "colorlevels=..." I tried many parameter sets but couldn't do much better, in the end I concluded that probably linear scaling isn't good enough and I need nonlinear - "curves=..." was indeed better but when I stretched the curve beyond a certain point I obtained distorted colors - I tried "geq=..." too but it doesn't seem to work, I always get an error like this: ffmpeg -i video1.mts -vf geq='r=r(X,Y):g=g(X,Y):b=b(X,Y)' video3.mts [Parsed_geq_0 @ 0x55a01bb0aa60] [Eval @ 0x7ffd3d63afb0] Missing ')' or too many args in 'r(X' [AVFilterGraph @ 0x55a01bb09e80] Error initializing filter 'geq' with args 'r=r(X' Error opening filters! These are the commands that I used to produce video3.mts: ffmpeg -i video1.mts -vf colorlevels=romax=0.8:gomax=1.0:bomax=0.9 -b 12M temp.mts ffmpeg -i temp.mts -vf curves=r='0/0.05 0.1/0.25 1/0.8':g='0/0.05 0.1/0.25 1/0.8':b='0/0.05 0.1/0.25 1/0.8' -b 12M video3.mts Thanks Gerardo
[toc] | [next] | [standalone]
| From | Gerardo Ballabio <gerardo.ballabio@gmail.com> |
|---|---|
| Date | 2019-03-06 12:10 +0100 |
| Message-ID | <xyCAV-3F5-9@gated-at.bofh.it> |
| In reply to | #205969 |
I guess my question was too specific. I'll try asking directly on ffmpeg mailing list. Thanks Gerardo Il giorno dom 3 mar 2019 alle ore 18:16 Gerardo Ballabio <gerardo.ballabio@gmail.com> ha scritto: > > Hello all, > I have a video that was filmed under bad lighting conditions, the > background is too bright and people in the foreground are dark. I'm > trying to use ffmpeg to correct it. Please kindly help me. > > Here you can find a snippet: > https://drive.google.com/drive/folders/1aG04znyHdDio7cvgaQlovYTb8bX8NTLL?usp=sharing > > video1.mts is the original file. video2.mp4 was created by a friend of > mine using proprietary software on Windows. I've been trying to > reproduce that. video3.mts is the best result I obtained (see below) > but the contrast is still too high and the colors aren't quite right. > > I've tried several of ffmpeg's effects but maybe there are some better > ones that I missed? > > - "eq=brightness=..." turns black into grey and gives the video a > "foggy" look, no good > - "colorlevels=..." I tried many parameter sets but couldn't do much > better, in the end I concluded that probably linear scaling isn't good > enough and I need nonlinear > - "curves=..." was indeed better but when I stretched the curve beyond > a certain point I obtained distorted colors > - I tried "geq=..." too but it doesn't seem to work, I always get an > error like this: > > ffmpeg -i video1.mts -vf geq='r=r(X,Y):g=g(X,Y):b=b(X,Y)' video3.mts > [Parsed_geq_0 @ 0x55a01bb0aa60] [Eval @ 0x7ffd3d63afb0] Missing ')' or > too many args in 'r(X' > [AVFilterGraph @ 0x55a01bb09e80] Error initializing filter 'geq' with > args 'r=r(X' > Error opening filters! > > These are the commands that I used to produce video3.mts: > > ffmpeg -i video1.mts -vf colorlevels=romax=0.8:gomax=1.0:bomax=0.9 -b > 12M temp.mts > ffmpeg -i temp.mts -vf curves=r='0/0.05 0.1/0.25 1/0.8':g='0/0.05 > 0.1/0.25 1/0.8':b='0/0.05 0.1/0.25 1/0.8' -b 12M video3.mts > > Thanks > Gerardo
[toc] | [prev] | [next] | [standalone]
| From | mick crane <mick.crane@gmail.com> |
|---|---|
| Date | 2019-03-06 13:30 +0100 |
| Message-ID | <xyDQm-4nr-3@gated-at.bofh.it> |
| In reply to | #206030 |
On 2019-03-06 10:48, Gerardo Ballabio wrote: > I guess my question was too specific. I'll try asking directly on > ffmpeg mailing list. > Thanks > Gerardo > probably best. I've only used ffmpeg to extract frames. The syntax can be a bit daunting. What I'd probably do is extract a frame of concern and see if there is a way to adjust curves by eye in Gimp and get/translate numbers from Gimp for use in ffmpeg. mick -- Key ID 4BFEBB31
[toc] | [prev] | [next] | [standalone]
| From | rhkramer@gmail.com |
|---|---|
| Date | 2019-03-06 17:30 +0100 |
| Message-ID | <xyHAB-6Hi-1@gated-at.bofh.it> |
| In reply to | #206030 |
On Wednesday, March 06, 2019 05:48:59 AM Gerardo Ballabio wrote: > I guess my question was too specific. I'll try asking directly on > ffmpeg mailing list. If you get it figured out, I (and probably others) would be interested in how to do it -- maybe you could post a summary here with a link to the thread on the ffmpeg mailing list. Thanks!
[toc] | [prev] | [next] | [standalone]
| From | Gerardo Ballabio <gerardo.ballabio@gmail.com> |
|---|---|
| Date | 2019-03-13 10:40 +0100 |
| Message-ID | <xB8wF-1AY-3@gated-at.bofh.it> |
| In reply to | #206030 |
For the record, here's the thread on ffmpeg-user mailing list: http://ffmpeg.org/pipermail/ffmpeg-user/2019-March/043677.html Gerardo Il giorno mer 6 mar 2019 alle ore 11:48 Gerardo Ballabio <gerardo.ballabio@gmail.com> ha scritto: > > I guess my question was too specific. I'll try asking directly on > ffmpeg mailing list. > Thanks > Gerardo > > > Il giorno dom 3 mar 2019 alle ore 18:16 Gerardo Ballabio > <gerardo.ballabio@gmail.com> ha scritto: > > > > Hello all, > > I have a video that was filmed under bad lighting conditions, the > > background is too bright and people in the foreground are dark. I'm > > trying to use ffmpeg to correct it. Please kindly help me. > > > > Here you can find a snippet: > > https://drive.google.com/drive/folders/1aG04znyHdDio7cvgaQlovYTb8bX8NTLL?usp=sharing > > > > video1.mts is the original file. video2.mp4 was created by a friend of > > mine using proprietary software on Windows. I've been trying to > > reproduce that. video3.mts is the best result I obtained (see below) > > but the contrast is still too high and the colors aren't quite right. > > > > I've tried several of ffmpeg's effects but maybe there are some better > > ones that I missed? > > > > - "eq=brightness=..." turns black into grey and gives the video a > > "foggy" look, no good > > - "colorlevels=..." I tried many parameter sets but couldn't do much > > better, in the end I concluded that probably linear scaling isn't good > > enough and I need nonlinear > > - "curves=..." was indeed better but when I stretched the curve beyond > > a certain point I obtained distorted colors > > - I tried "geq=..." too but it doesn't seem to work, I always get an > > error like this: > > > > ffmpeg -i video1.mts -vf geq='r=r(X,Y):g=g(X,Y):b=b(X,Y)' video3.mts > > [Parsed_geq_0 @ 0x55a01bb0aa60] [Eval @ 0x7ffd3d63afb0] Missing ')' or > > too many args in 'r(X' > > [AVFilterGraph @ 0x55a01bb09e80] Error initializing filter 'geq' with > > args 'r=r(X' > > Error opening filters! > > > > These are the commands that I used to produce video3.mts: > > > > ffmpeg -i video1.mts -vf colorlevels=romax=0.8:gomax=1.0:bomax=0.9 -b > > 12M temp.mts > > ffmpeg -i temp.mts -vf curves=r='0/0.05 0.1/0.25 1/0.8':g='0/0.05 > > 0.1/0.25 1/0.8':b='0/0.05 0.1/0.25 1/0.8' -b 12M video3.mts > > > > Thanks > > Gerardo
[toc] | [prev] | [next] | [standalone]
| From | mick crane <mick.crane@gmail.com> |
|---|---|
| Date | 2019-03-13 16:40 +0100 |
| Message-ID | <xBe93-57R-1@gated-at.bofh.it> |
| In reply to | #206216 |
On 2019-03-13 09:16, Gerardo Ballabio wrote: > For the record, here's the thread on ffmpeg-user mailing list: > http://ffmpeg.org/pipermail/ffmpeg-user/2019-March/043677.html > > Gerardo cheers, that's neat that you can import values directly from a .png. mick -- Key ID 4BFEBB31
[toc] | [prev] | [next] | [standalone]
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Date | 2019-03-06 15:20 +0100 |
| Message-ID | <xyFyO-5tW-3@gated-at.bofh.it> |
| In reply to | #205969 |
Gerardo Ballabio wrote: > Hello all, > I have a video that was filmed under bad lighting conditions, the > background is too bright and people in the foreground are dark. I'm > trying to use ffmpeg to correct it. Please kindly help me. > You will probably be happiest with a non-linear editor, most of which have color correction systems. Debian packages several -- non-linear is a good keyword. -dsr-
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web