About A python based Apple Quicktime protocol,you can record audio and video from real iOS devices

Overview

介绍

本应用程序使用 python 实现,可以通过 USB 连接 iOS 设备进行屏幕共享

  • 高帧率(30〜60fps)
  • 高画质
  • 低延迟(<200ms)
  • 非侵入性
  • 支持多设备并行

Mac OSX 安装

python >=3.7

  1. brew install libusb pkg-config
  2. 如需使用 gstreamer 则需要安装 brew install gstreamer gst-plugins-bad gst-plugins-good gst-plugins-base gst-plugins-ugly
  3. pip install ioscreen

使用

# vlc 工具播放udp地址: udp/h264://@:8880
# 转发 h264 udp 广播  
$ ioscreen --udid=xxxx udp

# 录制 h264/wav 文件
$ ioscreen --udid=xxxx record -h264File=/home/out.h264  -wavFile=/home/out.wav

# gstreamer 渲染显示画面
$ ioscreen --udid=xxxx gstreamer
Comments
  • 使用gstreamer发生异常,这个是什么原因?

    使用gstreamer发生异常,这个是什么原因?

    使用udp或录制文件功能正常。但是使用gstreamer就报错,这个是什么原因? 环境:macOS Monterey 12.3.1 gstreamer 1.20.1

    image

    $ python3 main.py --udid=d9109d1133548f70456c8c150a63cdc610a6ddd8 gstreamer 2022-05-02 20:06:17,642 - util.py[line:58] - INFO: Find Device UDID: d9109d1133548f70456c8c150a63cdc610a6ddd8 2022-05-02 20:06:17,731 - gstreamer.py[line:124] - INFO: Starting Gstreamer.. Traceback (most recent call last): File "/Users/weiyansheng/work/Owner/ios-screen-record/ioscreen/main.py", line 60, in <module> main() File "/Users/weiyansheng/work/Owner/ios-screen-record/ioscreen/main.py", line 56, in main args.func(args) File "/Users/weiyansheng/work/Owner/ios-screen-record/ioscreen/main.py", line 28, in cmd_record_gstreamer consumer = GstAdapter.new(stopSignal) File "/usr/local/lib/python3.9/site-packages/ioscreen/coremedia/gstreamer.py", line 126, in new videoAppSrc = setup_video_pipeline(pipe) File "/usr/local/lib/python3.9/site-packages/ioscreen/coremedia/gstreamer.py", line 27, in setup_video_pipeline src.set_property("is-live", True) AttributeError: 'NoneType' object has no attribute 'set_property'

    opened by bxxmwys 7
  • gstreamer 渲染显示画面命令报错

    gstreamer 渲染显示画面命令报错

    报错信息: image

    执行命令: ioscreen --udid=00008020-000E08CC1A38002E gstreamer 报错说找不到设备,后来看了下issue,把-删除变成这样: ioscreen --udid=00008020000E08CC1A38002E gstreamer 依旧报错如上图

    opened by suzhenyu006 2
  • 这个工具能支持在Windows连接iPhone场景下录屏吗

    这个工具能支持在Windows连接iPhone场景下录屏吗

    执行:pip install ioscreen,出现以下错误: Building wheel for PyGObject (PEP 517) ... error ERROR: Command errored out with exit status 1: command: 'F:\GitLab\apprunner\venv\Scripts\python.exe' 'F:\GitLab\apprunner\venv\lib\site-packages\pip_ven dor\pep517_in_process.py' build_wheel 'D:\Users\yl1150\AppData\Local\Temp\tmpg86y3yx1' cwd: D:\Users\yl1150\AppData\Local\Temp\pip-install-ia3oem36\pygobject_e138554edb0d49deb98def802edfefc4

    Complete output (42 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\pygtkcompat copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.8\pygtkcompat copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.8\pygtkcompat copying pygtkcompat_init_.py -> build\lib.win-amd64-3.8\pygtkcompat creating build\lib.win-amd64-3.8\gi copying gi\docstring.py -> build\lib.win-amd64-3.8\gi copying gi\importer.py -> build\lib.win-amd64-3.8\gi copying gi\module.py -> build\lib.win-amd64-3.8\gi copying gi\pygtkcompat.py -> build\lib.win-amd64-3.8\gi copying gi\types.py -> build\lib.win-amd64-3.8\gi copying gi_constants.py -> build\lib.win-amd64-3.8\gi copying gi_error.py -> build\lib.win-amd64-3.8\gi copying gi_gtktemplate.py -> build\lib.win-amd64-3.8\gi copying gi_option.py -> build\lib.win-amd64-3.8\gi copying gi_ossighelper.py -> build\lib.win-amd64-3.8\gi copying gi_propertyhelper.py -> build\lib.win-amd64-3.8\gi copying gi_signalhelper.py -> build\lib.win-amd64-3.8\gi copying gi_init_.py -> build\lib.win-amd64-3.8\gi creating build\lib.win-amd64-3.8\gi\repository copying gi\repository_init_.py -> build\lib.win-amd64-3.8\gi\repository creating build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\GdkPixbuf.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\Gio.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\GLib.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\GObject.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides\Pango.py -> build\lib.win-amd64-3.8\gi\overrides copying gi\overrides_init_.py -> build\lib.win-amd64-3.8\gi\overrides running build_ext pycairo: new API pycairo: trying include directory: 'D:\Users\yl1150\AppData\Local\Temp\pip-build-env-46pn1i2p\overlay \Lib\site-packages\cairo\include' pycairo: found 'D:\Users\yl1150\AppData\Local\Temp\pip-build-env-46pn1i2p\overlay\Lib\site-packages \cairo\include\py3cairo.h' building 'gi._gi' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://vi sualstudio.microsoft.com/visual-cpp-build-tools/

    ERROR: Failed building wheel for PyGObject Failed to build PyGObject ERROR: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly

    opened by linmscat 2
  • fixes issue #11

    fixes issue #11

    brew gstream 安装路径:/usr/local/Cellar/gstreamer/1.20.3;gstreamer默认搜索其下子目录lib中的插件,而brew把gsteamer的插件安装在了/usr/local/lib/gstreamer-1.0中,导致出错。

    通过查找plugin是否存在,判断是否需要重新扫描新路径,从而解决问题。

    opened by truebit 1
  • 若udid 中含有符号 - 则提示找不到手机,ioscreen -u 694a32 udp运行,提示超时并关闭程序

    若udid 中含有符号 - 则提示找不到手机,ioscreen -u 694a32 udp运行,提示超时并关闭程序

    1.(testdevice) MacBook-Pro ~ % ioscreen -u 694a32 udp

    • util.py[line:58] - INFO: Find Device UDID: 694a32
    • consumer.py[line:100] - INFO: listen UDP: udp/h264://127.0.0.1:8880
    • util.py[line:91] - INFO: Disabling hidden QT config
    • util.py[line:152] - INFO: enable_qt_config..
    • util.py[line:71] - INFO: Enabling hidden QT config
    • util.py[line:58] - INFO: Find Device UDID: 694a32
    • util.py[line:175] - INFO: USB connection ready, waiting for ping..
    • meaasge.py[line:148] - INFO: AudioVideo-Stream has start success
    • util.py[line:190] - WARNING: [Errno 60] Operation timed out
    • meaasge.py[line:159] - INFO: Telling device to stop streaming..
    • util.py[line:91] - INFO: Disabling hidden QT config 手机运行ioscreen -u 694a32 udp ,AudioVideo-Stream提示成功,过几秒后,提示超时,程序自动关闭 2.若udid 中含有符号 - 则提示找不到手机
    opened by junjunsay 1
  • ubuntu下空闲设备接入,执行record时显示usb.core.USBError: [Errno 16] Resource busy错误

    ubuntu下空闲设备接入,执行record时显示usb.core.USBError: [Errno 16] Resource busy错误

    2022-08-24 04:53:58,088 - util.py[line:91] - INFO: Disabling hidden QT config  
    Traceback (most recent call last):  
    File "/home/root/.local/bin/ioscreen", line 8, in  
    sys.exit(main())  
    File "/home/root/.local/lib/python3.8/site-packages/ioscreen/main.py", line 56, in main  
    args.func(args)  
    File "/home/root/.local/lib/python3.8/site-packages/ioscreen/main.py", line 12, in cmd_record_wavstart_reading(consumer, device, stopSignal)  
    File "/home/root/.local/lib/python3.8/site-packages/ioscreen/util.py", line 152, in start_reading
    device.set_configuration()  
    File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 905, in set_configuration
    self._ctx.managed_set_configuration(self, configuration)  
    File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 113, in wrapper
    return f(self, *args, **kwargs)  
    File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 159, in managed_set_configuration
    self.backend.set_configuration(self.handle, cfg.bConfigurationValue)  
    File "/home/root/.local/lib/python3.8/site-packages/usb/backend/libusb1.py", line 812, in set_configuration
    _check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))  
    File "/home/root/.local/lib/python3.8/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])  
    usb.core.USBError: [Errno 16] Resource busy```
    
    
    
    问题似乎出现在`device.set_configuration(config_index)`函数上,我把这个函数注释掉后执行命令
    ```2022-08-30 04:55:11,230 - util.py[line:58] - INFO: Find Device UDID: 00008101001645560C42001E  
    2022-08-30 04:55:11,232 - util.py[line:91] - INFO: Disabling hidden QT config  
    2022-08-30 04:55:11,233 - util.py[line:155] - INFO: enable_qt_config..  
    2022-08-30 04:55:11,233 - util.py[line:71] - INFO: Enabling hidden QT config  
    2022-08-30 04:55:11,235 - util.py[line:58] - INFO: Find Device UDID: 00008101001645560C42001E  
    2022-08-30 04:55:11,238 - util.py[line:178] - INFO: USB connection ready, waiting for ping..  
    2022-08-30 04:55:14,243 - util.py[line:193] - WARNING: [Errno 110] Operation timed out  
    2022-08-30 04:55:14,243 - meaasge.py[line:168] - INFO: Telling device to stop streaming..  
    2022-08-30 04:55:14,243 - util.py[line:91] - INFO: Disabling hidden QT config```
    
    
    bytestream内似乎接受不到data数据。
    
    请问有什么好的建议,或者解决办法么。不胜感激
    opened by pansionpan 3
  • ubuntu 下不能使用

    ubuntu 下不能使用

    我在ubuntu 20.04下安装pip install ioscreen ;连接iphone6s手机,执行出现如下错误,这个是怎么回事。 root@ubuntu:~/Downloads$ ~/.local/bin/ioscreen --udid=4e50da4c5b930e51d8a37f8ec407864aea9d800c record -h264File=/home/root/a.h264 -wavFile=/home/root/b.wav 2022-08-24 04:53:58,087 - util.py[line:58] - INFO: Find Device UDID: 4e50da4c5b930e51d8a37f8ec407864aea9d800c 2022-08-24 04:53:58,088 - util.py[line:91] - INFO: Disabling hidden QT config Traceback (most recent call last): File "/home/root/.local/bin/ioscreen", line 8, in sys.exit(main()) File "/home/root/.local/lib/python3.8/site-packages/ioscreen/main.py", line 56, in main args.func(args) File "/home/root/.local/lib/python3.8/site-packages/ioscreen/main.py", line 12, in cmd_record_wav start_reading(consumer, device, stopSignal) File "/home/root/.local/lib/python3.8/site-packages/ioscreen/util.py", line 152, in start_reading device.set_configuration() File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 905, in set_configuration self._ctx.managed_set_configuration(self, configuration) File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 113, in wrapper return f(self, *args, **kwargs) File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 159, in managed_set_configuration self.backend.set_configuration(self.handle, cfg.bConfigurationValue) File "/home/root/.local/lib/python3.8/site-packages/usb/backend/libusb1.py", line 812, in set_configuration _check(self.lib.libusb_set_configuration(dev_handle.handle, config_value)) File "/home/root/.local/lib/python3.8/site-packages/usb/backend/libusb1.py", line 604, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 16] Resource busy

    opened by railsfans 6
  • udp play error

    udp play error

    Hi,

    I have encountered an error while trying to play udp:

    command:

    ffplay -f h264 udp://127.0.0.1:8880

    The output :

    [NULL @ 0x7fdb6603be00] non-existing PPS 0 referenced [h264 @ 0x7fdb6a017e00] non-existing PPS 0 referenced [h264 @ 0x7fdb6a017e00] decode_slice_header error [h264 @ 0x7fdb6a017e00] no frame! [NULL @ 0x7fdb6603be00] non-existing PPS 0 referenced 0B f=0/0 [h264 @ 0x7fdb6a018400] non-existing PPS 0 referenced [h264 @ 0x7fdb6a018400] decode_slice_header error [h264 @ 0x7fdb6a018400] no frame! [NULL @ 0x7fdb6603be00] non-existing PPS 0 referenced 0B f=0/0 [h264 @ 0x7fdb6a018a00] non-existing PPS 0 referenced [h264 @ 0x7fdb6a018a00] decode_slice_header error [h264 @ 0x7fdb6a018a00] no frame! [NULL @ 0x7fdb6603be00] non-existing PPS 0 referenced [h264 @ 0x7fdb6a019000] non-existing PPS 0 referenced [h264 @ 0x7fdb6a019000] decode_slice_header error [h264 @ 0x7fdb6a019000] no frame! [NULL @ 0x7fdb6603be00] non-existing PPS 0 referenced [h264 @ 0x7fdb6a019600] non-existing PPS 0 referenced [h264 @ 0x7fdb6a019600] decode_slice_header error [h264 @ 0x7fdb6a019600] no frame!

    Thanks

    opened by donmezburak 2
  • 录屏会导致webdriverAgent连接断开

    录屏会导致webdriverAgent连接断开

    录屏会导致webdriverAgent连接断开,我尝试用先启动录屏,但是不开始读取流数据,等wda server启动之后的方式解决这个问题,但是在等待wda server启动后在读取流时会报错WARNING: [Errno 60] Operation timed out,无法正常读取流

    def writeStream(self):
            """ 异步写入线程
            :return:
            """
            while True:
                try:
                    data = self.device.read(self.inEndpoint, 1024 * 1024, 3000)
                    self.byteStream.put(data)
                except Exception as E:
                    logging.warning(E)
                    self.message.outEndpoint = None
                    self.message.inEndpoint = None
                    self.stopSignal.set()
                    break
    
    opened by ToBeTree 5
  • 使用ioscreen录制h264/wav会修改设备的显示时间

    使用ioscreen录制h264/wav会修改设备的显示时间

    执行命令 ioscreen -u=xxxxx record -h264File=test1.h264 -wavFile=test2.wav 设备型号:iPhone 12 设备系统:14.1 效果如下视频 https://user-images.githubusercontent.com/12739697/130032815-de58a1d1-0175-49c4-9830-333f95271d68.MP4

    bug 
    opened by ToBeTree 2
Owner
YueC
YueC
An electron application to check battery of bluetooth devices connected to linux devices.

bluetooth-battery-electron An electron application to check battery of bluetooth devices connected to linux devices. This project provides an electron

Vasu Sharma 15 Dec 3, 2022
Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you class scheduling.

Class Schedule Shortcut Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you clas

null 3 Jun 28, 2022
You can easily send campaigns, e-marketing have actually account using cash will thank you for using our tools, and you can support our Vodafone Cash +201090788026

*** Welcome User Sorry I Mean Hello Brother ✓ Devolper and Design : Mokhtar Abdelkreem ========================================== You Can Follow Us O

Mo Code 1 Nov 3, 2021
Push a record and you will receive a email when that date

Push a record and you will receive a email when that date

null 5 Nov 28, 2022
frida-based ceserver. iOS analysis is possible with Cheat Engine.

frida-ceserver frida-based ceserver. iOS analysis is possible with Cheat Engine. Original by Dark Byte. Usage Install frida on iOS. python main.py Cyd

KenjiroIchise 89 Jan 8, 2023
Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat ?? Stats ?? Get SESSION_NAME from below:

dark phoenix 12 May 8, 2022
Cisco IOS-XE Operations Program. Shows operational data using restconf and yang

XE-Ops View operational and config data from devices running Cisco IOS-XE software. NoteS The build folder is the latest build. All other files are fo

null 18 Jul 23, 2022
Simple utlity for sniffing decrypted HTTP/HTTPS traffic on a jailbroken iOS device into an HAR format.

Description iOS devices contain a hidden feature for sniffing decrypted HTTP/HTTPS traffic from all processes using the CFNetwork framework into an HA

null 83 Dec 25, 2022
This code makes the logs provided by Fiddler proxy of the Google Analytics events coming from iOS more readable.

GA-beautifier-iOS This code makes the logs provided by Fiddler proxy of the Google Analytics events coming from iOS more readable. To run it, create a

Rafael Machado 3 Feb 2, 2022
Audio-analytics for music-producers! Automate tedious tasks such as musical scale detection, BPM rate classification and audio file conversion.

Click here to be re-directed to the Beat Inspect Streamlit Web-App You are a music producer? Let's get in touch via LinkedIn Fundamental Analytics for

Stefan Rummer 11 Dec 27, 2022
This is a vscode extension with a Virtual Assistant that you can play with when you are bored or you need help..

VS Code Virtual Assistant This is a vscode extension with a Virtual Assistant that you can play with when you are bored or you need help. Its currentl

Soham Ghugare 6 Aug 22, 2021
Process RunGap output file of a workout and load data into Apple Numbers Spreadsheet and my website with API calls

BSD 3-Clause License Copyright (c) 2020, Mike Bromberek All rights reserved. ProcessWorkout Exercise data is exported in JSON format to iCloud using

Mike Bromberek 1 Jan 3, 2022
Bad Apple printed out on the console with Python!

bad-apple Bad Apple printed out on the console with Python! Preface A word of disclaimer, while the final code is somewhat original, this project is a

CalvinLoke 186 Dec 1, 2022
🍏 Make Thinc faster on macOS by calling into Apple's native Accelerate library

?? Make Thinc faster on macOS by calling into Apple's native Accelerate library

Explosion 81 Nov 26, 2022
Automatically skip sponsor segments in YouTube videos playing on Apple TV.

iSponsorBlockTV Skip sponsor segments in YouTube videos playing on an Apple TV. This project is written in asycronous python and should be pretty quic

David 64 Dec 17, 2022
Singularity Containers on Apple M1 (ARM64)

Singularity Containers on Apple M1 (ARM64) This is a repository containing a ready-to-use environment for singularity in arm64 (M1). It has been prepa

Manuel Parra 4 Nov 14, 2022
Implements a polyglot REPL which supports multiple languages and shared meta-object protocol scope between REPLs.

MetaCall Polyglot REPL Description This repository implements a Polyglot REPL which shares the state of the meta-object protocol between the REPLs. Us

MetaCall 10 Dec 28, 2022
Capture screen and download off Roku based devices

rokuview Capture screen and download off Roku based devices Tested on Hisense TV with Roku OS built-in No guarantee this will work with all Roku model

null 3 May 27, 2021
Comics/doujinshi reader application. Web-based, will work on desktop and tablet devices with swipe interface.

Yomiko Comics/doujinshi reader application. Web-based, will work on desktop and tablet devices with swipe interface. Scans one or more directories of

Kyubi Systems 26 Aug 10, 2022