There doesn't seem to be a lot on the ffmpeg rotate filter since it was added later (or so I've read) and I am trying to rotate a video at an angle such as 30 degrees without showing background, which is what the documentation says c=none does. I am using the ffplay script to test before encoding. ffplay accepts rotate filter ok but the background color specified as none shows up Green (as does ffmpeg if I try it). I also noticed if I use the color in hex such as "0x000000AA, the Alpha components have no effect???
the script i am using is:
I do not really care at the moment how the video is stretched or disproportion at the moment, as I will correct that with an algorithm that addresses the aspects of a video and its Cosine functions to display a correct frame.Code:ffmpeg -i <video> -vf rotate=30*PI/180:ow=hypot(iw,ih):oh=ow:c=none
The real kicker is that I swear it used to work and now does not, even though it worked at night and doesn't the next day. AS I say I'm not sure but really thought it did before. It is also baffling that the colors all show up, although with out the alpha component but none gives green.
I would appreciate any information on this as I have read and experimented for hours without any headway.
+ Reply to Thread
Results 1 to 8 of 8
-
-
Does the video format even support alpha? I mean both: The internal format after loading your source video, and the format you chose to save the video as. If you call the color "green", I suppose it is in a YUV format, not in e.g. RGBA, internally.
-
Maybe I misunderstand, but can't you simply leave 'c=none' away? I don't know how the 'none' color is defined or what 'none' should default to.
-
Probably helpful: The leading text in chapter 2.7 Colors in ffmpeg's utility manual.
It can be the name of a color as defined below (case insensitive match) or a [0x|#]RRGGBB[AA] sequence, possibly followed by @ and a string representing the alpha component.
The alpha component may be a string composed by "0x" followed by an hexadecimal number or a decimal number between 0.0 and 1.0, which represents the opacity value (‘0x00’ or ‘0.0’ means completely transparent, ‘0xff’ or ‘1.0’ completely opaque). If the alpha component is not specified then ‘0xff’ is assumed. -
Thanks to everyone for their help. The mpr video is indeed yuv 4.2.0 format. This makes sense since, I suspected it worked previously, perhaps on an rgb video. I bbc will test and let everyone know. If th is is th he case, wish it was listed under 'FFMPEG ROTATE FILTER' documentation lol
-
NO luck so far. Changed to RGB32 but the entire video seems to show as Alpha. I have not found a way to designate the background as the transparent color and have not been able to achieve any video with a editable transparency. Working with RGB video causes the background to be black instead of green with color set to 'None'
Guess its not possible..
Thanks for help from everyone though. -
"c=none" means not replacing the background with each rotation. It becomes obvious with a command like:
Code:ffmpeg -y -i input.mkv -vf rotate='PI*t/10:ow=hypot(iw,ih):oh=ow:c=none' output.mkv
floor(hypot(iw,ih)/2)*2.
This worked for me:
Code:ffmpeg -y -i input.mkv -vf format=rgba,rotate='PI*t/10:ow=floor(hypot(iw,ih)/2)*2:oh=ow:c=0xff000000' -c:v rawvideo output.avi
Last edited by jagabo; 20th Mar 2021 at 09:39.
Similar Threads
-
Neat video "colorizes" wrong color hands and face
By mammo1789 in forum RestorationReplies: 4Last Post: 25th Aug 2020, 15:21 -
Color discrepancy on "catch-up" TV videos from the same programs
By abolibibelot in forum Newbie / General discussionsReplies: 15Last Post: 6th Aug 2020, 16:11 -
ffmpeg 4.1.4 question regarding "limited color range" output file
By bokeron2020 in forum Newbie / General discussionsReplies: 12Last Post: 1st Aug 2019, 17:28 -
Video color to "black & chrome" conversion
By leghorn in forum EditingReplies: 6Last Post: 4th Feb 2018, 08:35 -
[Sony Vegas] how to automate the "color gradient" plugin's Control Points?
By rocco123 in forum Newbie / General discussionsReplies: 1Last Post: 31st Jan 2017, 23:34