Page 1 of 2

Camera Upside-down

Posted: Mon May 14, 2018 3:22 pm
by mrmajik45
When my grandma uses her camera, the video is shown upside-down. I have the laptop so I can actually work on it. But I haven't gotten any actual results. Help.

Re: Camera Upside-down

Posted: Mon May 14, 2018 3:29 pm
by AZgl1500
Look at the camera settings, does it offer a sensor to detect "UP"?

most do, and it is real common with cellphones.

older cameras do not though.

Re: Camera Upside-down

Posted: Mon May 14, 2018 3:51 pm
by Flemur
mrmajik45 wrote:
Mon May 14, 2018 3:22 pm
When my grandma uses her camera, the video is shown upside-down.
Shown on what? The camera? Linux programs? Windows programs? Which ones?

Anyway, various video converters can flip or rotate the image; you might check ffmpeg/avconv, which are command line, but IIRC they can correct the image orientation by changing some metadata rather than re-encoding the video.

"Rotate a video with FFmpeg (100% lossless, and quick) "
https://gist.github.com/ViktorNova/1dd6 ... 9507c73ee2

Code: Select all

ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
https://stackoverflow.com/questions/393 ... ith-ffmpeg

Code: Select all

Rotate 90 clockwise:
ffmpeg -i in.mov -vf "transpose=1" out.mov

For the transpose parameter you can pass:
0 = 90 CounterCLockwise and Vertical Flip (default)
1 = 90 Clockwise
2 = 90 CounterClockwise
3 = 90 Clockwise and Vertical Flip

Re: Camera Upside-down

Posted: Mon May 14, 2018 3:53 pm
by absque fenestris
As far as I understand a landscape / portrait problem.
But your question: what do you want to do? Convert an upright image / video to a horizontal one?

Re: Camera Upside-down

Posted: Mon May 14, 2018 3:53 pm
by mrmajik45
Google Chrome. KDE. Camera is built-in. And she is using it on Facebook for her streams

Re: Camera Upside-down

Posted: Mon May 14, 2018 3:56 pm
by mrmajik45
I want to know if there is a way to change how the system would show the output. Like make the system flip the output before giving it the program that needs it

Re: Camera Upside-down

Posted: Mon May 14, 2018 4:14 pm
by absque fenestris
Question and answer, respectively problem and solution are here on a Monty Python level: what do you want to do - and what could you do on a Mint-Linux level? There is definitely no new grandmother...

Re: Camera Upside-down

Posted: Tue May 15, 2018 1:05 am
by andersau
A few years ago I had a HP laptop that did have the camera module installed upside down. Apparently it wasn't unusual. I had difficulty correcting the problem using software - it was actually a hardware issue. I eventually fixed it by taking the computer apart and putting the camera back in the correct orientation. You should be able to find some information about how to do it online, depending on what model the computer is. It could also be a warranty issue that the manufacturer will correct.

Re: Camera Upside-down

Posted: Tue May 15, 2018 2:16 am
by catweazel
Flemur wrote:
Mon May 14, 2018 3:51 pm
Anyway, various video converters can flip or rotate the image
Which sort of defeats the purpose of having a camera in the first place.

Re: Camera Upside-down

Posted: Tue May 15, 2018 2:19 am
by catweazel
mrmajik45 wrote:
Mon May 14, 2018 3:22 pm
When my grandma uses her camera, the video is shown upside-down. I have the laptop so I can actually work on it. But I haven't gotten any actual results. Help.
https://askubuntu.com/questions/796082/ ... bcam-video

See the response about v4l-utils.

Or try this: https://ubuntuforums.org/showthread.php?t=870681&page=2

"Apparently, the fix for this is to add a parameter to the driver when the module is loaded, like so..."

Re: Camera Upside-down

Posted: Tue May 15, 2018 2:21 am
by catweazel
absque fenestris wrote:
Mon May 14, 2018 4:14 pm
Question and answer, respectively problem and solution are here on a Monty Python level: what do you want to do - and what could you do on a Mint-Linux level? There is definitely no new grandmother...
It's blatantly obvious what @mrmajik45 wants to do.

Re: Camera Upside-down

Posted: Tue May 15, 2018 2:34 am
by absque fenestris
1. turn over the just filming grandmother
2. turn over the camera that is filming
3. turn over the film in progress

Re: Camera Upside-down

Posted: Tue May 15, 2018 2:52 am
by catweazel
absque fenestris wrote:
Tue May 15, 2018 2:34 am
1. turn over the just filming grandmother
2. turn over the camera that is filming
3. turn over the film in progress
I don't feel that humour would be appreciated in direct response to a technical issue. It sidetracks the thread, which isn't in the interests of fixing the OP's issue. At the end, ok, but not while the OP still has the issue. It's not too far removed from hijacking.

Re: Camera Upside-down

Posted: Tue May 15, 2018 4:47 am
by absque fenestris
This works:
ffmpeg -i in.mov -vf "transpose=1" out.mov

my example
ffmpeg -i '/home/msz/Downloads/Lus.mp4' -vf "transpose=1" '/home/msz/Downloads/neu.mp4'

This command has nothing changed:
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO

Re: Camera Upside-down

Posted: Tue May 15, 2018 5:14 pm
by mrmajik45
Nothing... I got the camera:

Code: Select all

Bus 001 Device 002: ID 064e:a116 Suyin Corp. UVC 1.3MPixel WebCam

Re: Camera Upside-down

Posted: Tue May 15, 2018 5:16 pm
by mrmajik45
And I said stream not video.

Re: Camera Upside-down

Posted: Wed May 16, 2018 1:54 pm
by absque fenestris
Same problem here:
Do videos have metadata for orientation?
Post by jimallyn » Fri May 11, 2018 2:13 am

viewtopic.php?f=58&t=269236&p=1468138&h ... n#p1468138

Maybe it helps.

Re: Camera Upside-down

Posted: Wed May 16, 2018 3:02 pm
by mrmajik45
It's not a video. Stop giving me this. Pls. It's directly from the camera. Being used for a LIVESTREAM on Facebook. I've already told you this before. And no it's not just Facebook.

Re: Camera Upside-down

Posted: Wed May 16, 2018 3:35 pm
by AZgl1500
Facebook does NOT honor the camera's internal geo settings.

I do NOT ever post a picture from a cellphone/tablet camera on Facebook anymore, UNLESS, I look at it with GIMP and let GIMP correct the rotation. Then I post it up with my PC.

Re: Camera Upside-down

Posted: Wed May 16, 2018 4:22 pm
by MrEen
Looks like it could be a driver issue. This site is the best I could find quickly: Why Is My Webcam Showing Me Upside Down?