muxinc / example-ios-live-streaming

An example app for live streaming from an iOS device using the Mux live streaming service.
MIT License
30 stars 5 forks source link

"The input file was not a valid video or audio file. error type: invalid_input" While asset is creating on Mux server #8

Open namrataedke opened 5 years ago

namrataedke commented 5 years ago

Hi,

I'm getting error on Mux server for assets creation. The is "The input file was not a valid video or audio file. error type: invalid_input".

I ran this code on simulator and also on iPhone device using valid stream key. I enabled camera permission setting in info.plist file and while running code on device it requesting for camera permission. Till this steps are working fine, once I allowed camera permission on device it navigating to Blank black screen with red colored circle on top-right instead of camera page and new assets is generating on Mux server with message " The input file was not a valid video or audio file. error type: invalid_input" for corresponding stream key.

Here I attached screenshot for when I ran this code on simulator it displaying blank screen after camera permission is allowed. img_20190215_140305

screenshot for error giving for uploaded assets on Mux server. input file was not valid video

Is their any solution for this problem , let us know ASAP.

dylanjha commented 4 years ago

@namrataedke I think you can't really access the camera from the simulator. See in Apple's Simulator Help Page that "Camera" is listed.

The following hardware is not supported in Simulator:


I think this is what you're running into. I'll see if we can make a better error message in the app. I was able to get this running by building from XCode onto my actual device. I also have a PR here that gets everything running on the latest XCode/ Swift/ iOS: https://github.com/muxinc/example-ios-live-streaming/pull/11