tzwenn / PyOpenAirMirror

An open source AirPlay mirroring server in Python for iOS 6-8
Other
92 stars 24 forks source link

On Raspberry Pi make use of OpenMAX (VideoCore) for decoding+rendering #6

Open tzwenn opened 9 years ago

tzwenn commented 9 years ago

Pretty slow with current setup. First investigate if delay is in decryption, decoding or rendering.

tzwenn commented 9 years ago

Profiling on rPi B shows most delay comes from ffmpeg h264 decoding, but also SDL rendering is at sub-interactive rates.

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
56    8.515    0.152    8.515    0.152 {method 'decodeFrame' of 'h264decode.Decoder' objects}
43    1.335    0.031    1.335    0.031 {method 'display' of 'pygame.overlay' objects}
56    0.003    0.000    0.096    0.002 blockalgo.py:246(decrypt)

Comparison to ffmpeg on i7 (hardware accelerated AES+H.264):

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
267    2.874    0.011    2.874    0.011 {method 'display' of 'pygame.overlay' objects}
267    0.824    0.003    0.824    0.003 {method 'decodeFrame' of 'h264decode.Decoder' objects}
267    0.001    0.000    0.033    0.000 blockalgo.py:246(decrypt)
joole commented 7 years ago

How to do it ? can u tell me the step ?

tzwenn commented 7 years ago

Haven't done it yet, since for a weekend project the first glimpse of the OpenMAX API was a bit discouraging.

joole commented 7 years ago

Yes,I know how to decode h264 packet, but i don't know how to run PyOpenAirMirror on Raspberry, I never success run it on ubuntu ,so please tell me how to run the PyOpenAirMirror on rpi,if i can,i will decode using OPENMAX API to decode it and re-coded it using c++,please help me

tzwenn commented 7 years ago

Well, I haven't had any issues after installing avahi. And I used a macOS and fplyServer for an external fp-setup handshake. Alternatively you can use https://github.com/espes/Slave-in-the-Magic-Mirror, if you don't have access to macOS.

joole commented 7 years ago

Thank,I will try it right now