Git Product home page Git Product logo

Comments (14)

fcarlier avatar fcarlier commented on August 16, 2024

The reason is very simple, the OMXVideo.cpp file isn't identical ;)

In official version : https://github.com/popcornmix/omxplayer/blob/master/OMXVideo.cpp (After Line 632)
is different of XBMC Version https://github.com/xbmc/xbmc/blob/master/xbmc/cores/omxplayer/OMXVideo.cpp (Block line 646-660).

No tested but you can add in OMXVideo.cpp:

switch(hints.orientation)
{
case 90:
m_transform = OMX_DISPLAY_ROT90;
break;
case 180:
m_transform = OMX_DISPLAY_ROT180;
break;
case 270:
m_transform = OMX_DISPLAY_ROT270;
break;
default:
m_transform = OMX_DISPLAY_ROT0;
break;
}

and you insert the parameter in omxplayer.cpp

One question for popcornmix > It's possible to change m_transform on the fly and not only start of the video ??

See you later

from omxplayer.

popcornmix avatar popcornmix commented on August 16, 2024

I believe transform can be changed whilst running.

from omxplayer.

fcarlier avatar fcarlier commented on August 16, 2024

Hello,
After reflexion, i can propose you the solution :)

Add in OMXStreamInfo.h :
After Line 61 : int orientation; // orientation of the video in degress counter clockwise

Add in OMXStreamInfo.cpp :
After Line 66 : orientation = 0;

Replace in OMXVideo.cpp :
switch(0) => switch(hints.orientation)

Add in omxplayer.cpp :
in main function : const int orientation_opt = 0x400;
in struct option longopts[] = { :
{ "orientation", required_argument, NULL, orientation_opt },
After threshold_opt case : Add :
case orientation_opt:
m_orientation = atoi(optarg);
break;

Before : if(m_has_video && !m_player_video.Open(m_hints_video, ...
Add :
// insert orientation
m_hints_video.orientation = m_orientation;

AND PLAY AGAIN :) (--orientation n, n with 0 90 180 270)

Topic close ;)
@popcornmix > little commit ? with dbus-daemon ;)

from omxplayer.

andyjagoe avatar andyjagoe commented on August 16, 2024

@fcarlier > That's great news--Thanks for your efforts.
@popcornmix > It would be fantastic if this could be included in the mainline build.

from omxplayer.

popcornmix avatar popcornmix commented on August 16, 2024

@fcarlier
Can't we initialise orientation from ffmpeg? (and also optionally allow command line override). See:
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/dvdplayer/DVDStreamInfo.cpp#L220

from omxplayer.

fcarlier avatar fcarlier commented on August 16, 2024

used ffmpeg ? why ? you prefer this :
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp#L385

from omxplayer.

popcornmix avatar popcornmix commented on August 16, 2024

I believe orientation is encoded in some files (e.g. mov files from iPhone).
I believe ffmpeg demuxer parses this information.
I believe OMXReader.cpp can be edited to fill in hint.orientation so these videos play correctly without a command line option.

from omxplayer.

fcarlier avatar fcarlier commented on August 16, 2024

Ok but in my case, i like so command line for parameter the display ! we can make both (detect stream or command line in option)

from omxplayer.

popcornmix avatar popcornmix commented on August 16, 2024

Yes, default to what ffmpeg says, but allow command line option to override it.

from omxplayer.

fcarlier avatar fcarlier commented on August 16, 2024

YES :) Detect orientation of stream and possible command line option to override ;)

See You Later

from omxplayer.

popcornmix avatar popcornmix commented on August 16, 2024

Please test latest commit:
f944de7

from omxplayer.

fcarlier avatar fcarlier commented on August 16, 2024

The test is OK for me ;)

from omxplayer.

fcarlier avatar fcarlier commented on August 16, 2024

Rotation on fly by 'r' key pressed
fcarlier@e2149a3

from omxplayer.

andyjagoe avatar andyjagoe commented on August 16, 2024

@fcarlier @popcornmix

The build is working well for me, and especially valuable is the auto-rotate via ffmpeg info. One sidenote is that it does seem to require the most recent Raspbian distribution. I ran into quite a few issues running the July distribution that all went away once I did an apt-get upgrade.

I'll leave it to you to close the issue.

from omxplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.