Rey777
Posts: 4
Joined: Mon Dec 25, 2017 9:11 pm

Omxplayer Sync

Mon Apr 09, 2018 9:07 am

Hi,
I am not sure this is the right section, apologize if not.
I am building a media center with multiple raspberry that play video in sync (master/slave).
I am writing my app in C++ so I don't want use the turing machine solution because is in python, but I use its dbuscontrol.sh script to interact with omxplayer via dbus.
The communication works, but when I use setposition command that would set the video time at specific position (in microseconds), it sets at greater position than the value I send.
For example if I launch:

Code: Select all

dbuscontrol.sh setposition 11560000
and then check the position with:

Code: Select all

dbuscontrol.sh status
It return 16543173.
Anyone know why happen this or have any other solution to control omxplayer position via c++?

Thanks.

Add some log of the same command called 3 times

Code: Select all

08:35:27 T:1736748884   DEBUG: OMXReader::SeekTime(11560) - seek ended up on time -2147483648
08:35:27 T:1736749192   DEBUG: OMXClock::OMXStop
08:35:27 T:1736749987   DEBUG: OMXClock::OMXSetSpeed(0.00) pause_resume:1
08:35:27 T:1736884697   DEBUG: OMXClock::OMXMediaTime set config OMX_IndexConfigTimeCurrentVideoReference = 11560000.00
08:35:27 T:1736896025   DEBUG: Seeked 11560002 11560000 11560000
08:35:27 T:1736896100   DEBUG: Normal M:11560000 (A:0 V:-4503599627370496) P:1 A:-11.56 V:0.00/T:0.20 (0,0,1,0) A:0% V:0% (0.00,0.00)
08:35:27 T:1736896151   DEBUG: COMXPlayer::HandleMessages - player started RESET
08:35:27 T:1736896332   DEBUG: OMXClock::OMXReset audio / video : 0 / 1 wait mask 0->2 state : 2->1
08:35:27 T:1736896550    INFO: CDVDPlayerVideo::Decode dts:8274933 pts:8341667 cur:8341667, size:1529
08:35:27 T:1736896603   DEBUG: OMXVideo::Decode VDec : setStartTime 8.341667
08:35:27 T:1736896712   DEBUG: Normal M:11560000 (A:0 V:8341667) P:1 A:-11.56 V:-3.22/T:0.20 (0,1,1,0) A:0% V:0% (0.00,0.00)



08:35:30 T:1740330514   DEBUG: OMXReader::SeekTime(11560) - seek ended up on time -2147483648
08:35:30 T:1740331328   DEBUG: OMXClock::OMXStop
08:35:30 T:1740332258   DEBUG: OMXClock::OMXSetSpeed(0.00) pause_resume:1
08:35:30 T:1740446402   DEBUG: OMXClock::OMXMediaTime set config OMX_IndexConfigTimeCurrentVideoReference = 11560000.00
08:35:30 T:1740458286   DEBUG: Seeked 11560003 11560000 11560000
08:35:30 T:1740458345   DEBUG: Normal M:11560000 (A:0 V:-4503599627370496) P:1 A:-11.56 V:0.00/T:0.20 (0,0,1,0) A:0% V:0% (0.00,0.00)
08:35:30 T:1740458395   DEBUG: COMXPlayer::HandleMessages - player started RESET
08:35:30 T:1740458533   DEBUG: OMXClock::OMXReset audio / video : 0 / 1 wait mask 0->2 state : 2->1
08:35:30 T:1740458787    INFO: CDVDPlayerVideo::Decode dts:16616600 pts:16683333 cur:16683333, size:1427
08:35:30 T:1740458836   DEBUG: OMXVideo::Decode VDec : setStartTime 16.683333
08:35:30 T:1740458906   DEBUG: Normal M:11560000 (A:0 V:16683333) P:1 A:-11.56 V:5.12/T:0.20 (0,0,1,1) A:0% V:0% (0.00,0.00)
08:35:30 T:1740458957   DEBUG: Resume -11.56,5.12 (0,0,1,1) EOF:0 PKT:(nil)
08:35:30 T:1740458990   DEBUG: OMXClock::OMXSetSpeed(1.00) pause_resume:1



08:35:32 T:1741639642   DEBUG: OMXReader::SeekTime(11560) - seek ended up on time -2147483648
08:35:32 T:1741639792   DEBUG: OMXClock::OMXStop
08:35:32 T:1741640117   DEBUG: OMXClock::OMXSetSpeed(0.00) pause_resume:1
08:35:32 T:1741719106   DEBUG: OMXClock::OMXMediaTime set config OMX_IndexConfigTimeCurrentVideoReference = 11560000.00
08:35:32 T:1741729824   DEBUG: Seeked 11560002 11560000 11560000
08:35:32 T:1741729877   DEBUG: Normal M:11560000 (A:0 V:-4503599627370496) P:1 A:-11.56 V:0.00/T:0.20 (0,0,1,0) A:0% V:0% (0.00,0.00)
08:35:32 T:1741729928   DEBUG: COMXPlayer::HandleMessages - player started RESET
08:35:32 T:1741730070   DEBUG: OMXClock::OMXReset audio / video : 0 / 1 wait mask 0->2 state : 2->1
08:35:32 T:1741730283    INFO: CDVDPlayerVideo::Decode dts:8274933 pts:8341667 cur:8341667, size:1529
08:35:32 T:1741730337   DEBUG: OMXVideo::Decode VDec : setStartTime 8.341667
08:35:32 T:1741730400   DEBUG: Normal M:11560000 (A:0 V:8341667) P:1 A:-11.56 V:-3.22/T:0.20 (0,1,1,0) A:0% V:0% (0.00,0.00)

As you can see all 3 times it setStartTime at wrong time and every time at different time, 8.341667 and 16.683333

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 11 guests