danielpaulus / quicktime_video_hack

Record iOS device audio and video
MIT License
541 stars 113 forks source link

Can not work normally in Ubuntu in VirtualBox. #112

Closed YueLu0116 closed 2 years ago

YueLu0116 commented 2 years ago

Just a question: Can qvh work on virtual machine? I tried qvh (wget from the given url) in Ubuntu 20.04.3 LTS in VirtualBox (host machine: Windows 10 20H2) and it couldn't work well: qvh devices gave the device information:

{"devices":[{"deviceName":"iPhone","screen_mirroring_enabled":false,"udid":"...","usb_device_info":"vid=05ac,pid=12a8,bus=1,addr=9"}]}

However, if I run qvh gstreamer, the usb connection would lost. Debug info:

{"level":"info","msg":"Starting Gstreamer..","time":"2021-12-30T15:56:39+08:00"}
{"level":"info","msg":"Gstreamer is running!","time":"2021-12-30T15:56:39+08:00"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x529626]

goroutine 1 [running]:
github.com/google/gousb.(*Device).String(...)
    /home/ganjalf/go/pkg/mod/github.com/google/gousb@v0.0.0-20190812193832-18f4c1d8a750/device.go:101
github.com/danielpaulus/quicktime_video_hack/screencapture.mapToIosDevice(0xc0000dfa10, 0x1, 0x1, 0x0, 0x0, 0xc000022420, 0xc00000f500, 0x27ce9d0)
    /home/ganjalf/privaterepos/quicktime_video_hack/screencapture/discovery.go:105 +0x96
github.com/danielpaulus/quicktime_video_hack/screencapture.(*IosDevice).ReOpen(0xc0000dfb48, 0xc00000f500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/ganjalf/privaterepos/quicktime_video_hack/screencapture/discovery.go:28 +0xb5
github.com/danielpaulus/quicktime_video_hack/screencapture.EnableQTConfig(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/ganjalf/privaterepos/quicktime_video_hack/screencapture/activator.go:40 +0x36f
main.startWithConsumer(0x62f600, 0xc00000f120, 0x0, 0x0)
    /home/ganjalf/privaterepos/quicktime_video_hack/main.go:188 +0xe9
main.startGStreamer(0x0, 0x0)
    /home/ganjalf/privaterepos/quicktime_video_hack/main.go:104 +0xa7
main.main()
    /home/ganjalf/privaterepos/quicktime_video_hack/main.go:90 +0x3d2

BTW, the usb settings of VB list here: image

BTW+1, I built qvh from source codes of main branch-e7aa39c, and the logs were different from the given release's. qvh gstreamer gave:

{"level":"info","msg":"no usbSerial specified, using 'skiped_udid'","time":"2021-12-30T15:58:56+08:00"}
{"error_message":"device not found, is it still connected?","original_error":"dial unix /var/run/usbmuxd: connect: resource temporarily unavailable"}
H4xl0r commented 2 years ago

did you enable the screen mirroring first ? cause it shows "screen_mirroring_enabled":false