Comments (14)
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.
I believe transform can be changed whilst running.
from omxplayer.
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.
@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.
@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.
used ffmpeg ? why ? you prefer this :
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp#L385
from omxplayer.
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.
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.
Yes, default to what ffmpeg says, but allow command line option to override it.
from omxplayer.
YES :) Detect orientation of stream and possible command line option to override ;)
See You Later
from omxplayer.
Please test latest commit:
f944de7
from omxplayer.
The test is OK for me ;)
from omxplayer.
Rotation on fly by 'r' key pressed
fcarlier@e2149a3
from omxplayer.
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)
- IPTV live stream stop playing HOT 2
- Playing audio to individual HDMI HOT 2
- Volume control while playing HOT 3
- install in other arm machine HOT 1
- Cannot play audio over bluetooth after reboot HOT 1
- Omxplayer and bluealsa
- DBus.Error.ServiceUnknown HOT 1
- Omxplayer with Argon One v2 ir remote
- Package 'libssl1.0-dev' has no installation candidate HOT 1
- when i make -j$(nproc),there have an error HOT 5
- omxplayer doesn't play live stream, playing local mp4 video works though HOT 1
- Will omxplayer stop working eventually? HOT 2
- DBUS Name Control problem HOT 1
- pi and sound HOT 1
- Any plans to adapt for Raspberry Pi 4?
- Fixes #939
- libva1 deprecated HOT 1
- omxplayer has 20s delay on raspberry pi live stream HOT 4
- OMXplayer freezes when trying to seek
- E: Package 'omxplayer' has no installation candidate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omxplayer.