danielpaulus / quicktime_video_hack

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

audio data buffer is always zero, why? #48

Open fcgll520 opened 4 years ago

fcgll520 commented 4 years ago

the h264 file is fine, but the wav is always zero buffer, i can't find why?please give me some suggestion. Thanks.

danielpaulus commented 4 years ago

Hey there 👋 That is weird, I just tried on my iPhone X and even when I don't play any sound on the device, still I get a wave file created. Can you run go run main.go record out.h264 out.wav -v and post the logs here? Also please let me know which device and version you are using :-)

fcgll520 commented 4 years ago

thanks,i found the reason. Another problem, why iphone's showing time is changed(like, 09:41) when usb connecting?

danielpaulus commented 4 years ago

Yes and also it removes the provider info and changes the battery status that is displayed I think. That is Apple's default behavior, I guess they don't like mobile vendors and empty batteries in their presentation :-D As for the time, that is when the first iPhone was released or something. I never tried to grab audio only, maybe then the display would be unaffected? Is that a use case you have?

fcgll520 commented 4 years ago

When playing music in iphone's music app, it changes iphone->system capture mode, and then, the receiving audio is just silence. Know why? image