SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
158 stars 33 forks source link

No read stream MPEG H.264 #45

Closed maksimaliabyshev closed 6 years ago

maksimaliabyshev commented 6 years ago

Issue overview

Description of the problem

2018-02-26 15:18:43.275921+0500 iosplayer.srgmediaplayer[51620:2563223] [] <<<< AVOutputContext (FigEndpointPicker) >>>> +[AVFigEndpointPickerOutputContextImpl sharedAudioPresentationOutputContext]: Audio presentation output context not supported by FigEndpointPicker
2018-02-26 15:18:43.276114+0500 iosplayer.srgmediaplayer[51620:2563223] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for sharedAudioPresentationContext
2018-02-26 15:18:43.276298+0500 iosplayer.srgmediaplayer[51620:2563223] [] <<<< AVOutputContext (FigEndpointPicker) >>>> +[AVFigEndpointPickerOutputContextImpl sharedAudioPresentationOutputContext]: Audio presentation output context not supported by FigEndpointPicker
2018-02-26 15:18:43.276402+0500 iosplayer.srgmediaplayer[51620:2563223] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext createOutputContextWithUniqueIdentifier:]
2018-02-26 15:18:43.380956+0500 iosplayer.srgmediaplayer[51620:2563310] [] <<<< AVOutputContext (FigEndpointPicker) >>>> +[AVFigEndpointPickerOutputContextImpl sharedAudioPresentationOutputContext]: Audio presentation output context not supported by FigEndpointPicker
2018-02-26 15:18:43.381087+0500 iosplayer.srgmediaplayer[51620:2563310] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext createOutputContextWithUniqueIdentifier:]
2018-02-26 15:18:44.460652+0500 iosplayer.srgmediaplayer[51620:2563223] [Controller] Playing http://str1.iptvportal.ru:8080/ort/index.m3u8
2018-02-26 15:18:44.468286+0500 iosplayer.srgmediaplayer[51620:2563223] [Controller] Playback state did change to preparing with info {
    SRGMediaPlayerPlaybackStateKey = 2;
    SRGMediaPlayerPreviousPlaybackStateKey = 1;
    SRGMediaPlayerSelectionKey = 0;
}
2018-02-26 15:18:44.478082+0500 iosplayer.srgmediaplayer[51620:2563312] [] <<<< AVOutputContext (FigEndpointPicker) >>>> +[AVFigEndpointPickerOutputContextImpl sharedAudioPresentationOutputContext]: Audio presentation output context not supported by FigEndpointPicker
2018-02-26 15:18:44.478245+0500 iosplayer.srgmediaplayer[51620:2563312] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext createOutputContextWithUniqueIdentifier:]
2018-02-26 15:18:44.520629+0500 iosplayer.srgmediaplayer[51620:2563310] [] <<<< AVOutputContext (FigEndpointPicker) >>>> +[AVFigEndpointPickerOutputContextImpl sharedAudioPresentationOutputContext]: Audio presentation output context not supported by FigEndpointPicker
2018-02-26 15:18:44.520774+0500 iosplayer.srgmediaplayer[51620:2563310] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext createOutputContextWithUniqueIdentifier:]
2018-02-26 15:18:44.529859+0500 iosplayer.srgmediaplayer[51620:2563223] <CATransformLayer: 0x6000002205c0> - changing property cornerRadius in transform-only layer, will have no effect
2018-02-26 15:18:44.529998+0500 iosplayer.srgmediaplayer[51620:2563223] <CATransformLayer: 0x6000002205c0> - changing property masksToBounds in transform-only layer, will have no effect
2018-02-26 15:18:44.630913+0500 iosplayer.srgmediaplayer[51620:2563312] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:44.631280+0500 iosplayer.srgmediaplayer[51620:2563312] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:44.631547+0500 iosplayer.srgmediaplayer[51620:2563312] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:44.631831+0500 iosplayer.srgmediaplayer[51620:2563312] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:44.634646+0500 iosplayer.srgmediaplayer[51620:2563312] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:44.635565+0500 iosplayer.srgmediaplayer[51620:2563312] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:44.636278+0500 iosplayer.srgmediaplayer[51620:2563312] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:44.636941+0500 iosplayer.srgmediaplayer[51620:2563312] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:44.639559+0500 iosplayer.srgmediaplayer[51620:2563344] [] <<<< Async >>>> playerasync_runAsynchronousCommandOnQueue: Command 23 returned -12784; this async error will be discarded
2018-02-26 15:18:44.970870+0500 iosplayer.srgmediaplayer[51620:2563312] [] <<<< FigStreamPlayer >>>> fpfs_MakeDolbyChoiceBasedOnAvailableAlternates: [0x7f83c060b4f0]: player can not found a playable alternative for this playback item[0x7f83c1051600]. hwPreferredChannels = [2/0], canDecodeAC3 = 1, canDecodeEC3 = 1, canAC3PassThrough = 0
2018-02-26 15:18:45.622051+0500 iosplayer.srgmediaplayer[51620:2563312] Task <8585BBC1-9167-4B1B-975C-7AC6A90BB33B>.<3> finished with error - code: -999
2018-02-26 15:18:52.062572+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.062717+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.062808+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.062931+0500 iosplayer.srgmediaplayer[51620:2563355] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:52.063497+0500 iosplayer.srgmediaplayer[51620:2563355] [] subaq_findRichestDecodableLayout signalled err=1718449215 (kAudioFormatUnsupportedDataFormatError) (FigAudioFormatDescriptionGetRichestDecodableFormat returned NULL) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMedia_Sim/EmbeddedCoreMedia-2275.27.3/Prototypes/MediaConverter/FigAudioQueue.c:6946
2018-02-26 15:18:52.063693+0500 iosplayer.srgmediaplayer[51620:2563355] [] faqrp_buildAudioQueue signalled err=1718449215 (err) (FigAudioQueueCreate failed) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMedia_Sim/EmbeddedCoreMedia-2275.27.3/Prototypes/RenderPipelines/FigAudioQueueRenderPipeline.c:894
2018-02-26 15:18:52.064364+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.064454+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.064577+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.064682+0500 iosplayer.srgmediaplayer[51620:2563355] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:52.065559+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.065653+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.065750+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.065857+0500 iosplayer.srgmediaplayer[51620:2563355] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:52.066107+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.066192+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.066284+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.066419+0500 iosplayer.srgmediaplayer[51620:2563355] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:52.066712+0500 iosplayer.srgmediaplayer[51620:2563355] [] <<<< FigStreamPlayer >>>> fpfs_BytePumpFn: <0x7f83c1051600> error 1718449215 from manifold-substream 0
2018-02-26 15:18:52.066860+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.066952+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.067069+0500 iosplayer.srgmediaplayer[51620:2563355] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.067192+0500 iosplayer.srgmediaplayer[51620:2563355] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead
2018-02-26 15:18:52.071608+0500 iosplayer.srgmediaplayer[51620:2563223] [Controller] Playback state did change to idle with info {
    SRGMediaPlayerLastPlaybackTimeKey = "CMTime: {503999/90000 = 5.600}";
    SRGMediaPlayerPlaybackStateKey = 1;
    SRGMediaPlayerPreviousMediaTypeKey = 1;
    SRGMediaPlayerPreviousPlaybackStateKey = 2;
    SRGMediaPlayerPreviousStreamTypeKey = 3;
    SRGMediaPlayerPreviousTimeRangeKey = "CMTimeRange: {{5600/1000 = 5.600}, {4799/1000 = 4.799, rounded}}";
    SRGMediaPlayerSelectionKey = 0;
}
2018-02-26 15:18:52.071979+0500 iosplayer.srgmediaplayer[51620:2563223] [Controller] Playback did fail with error: Error Domain=ch.srgssr.mediaplayer Code=0 "The media cannot be played" UserInfo={NSLocalizedDescription=The media cannot be played, NSUnderlyingError=0x60000024a6e0 {Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (1718449215), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x60c000451220 {Error Domain=NSOSStatusErrorDomain Code=1718449215 "(null)" UserInfo={AVErrorFourCharCode='fmt?'}}}}}
2018-02-26 15:18:52.075524+0500 iosplayer.srgmediaplayer[51620:2563344] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.075650+0500 iosplayer.srgmediaplayer[51620:2563344] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.075736+0500 iosplayer.srgmediaplayer[51620:2563344] [AudioHAL_Client] AudioHardware.cpp:1200:AudioObjectRemovePropertyListener:  AudioObjectRemovePropertyListener: no object with given ID 0
2018-02-26 15:18:52.075842+0500 iosplayer.srgmediaplayer[51620:2563344] [] <<<< FigStreamPlayer >>>> fpfs_EstablishTimebase: Failed to create an AudioDeviceClock, err = -12746, use HostTimeClock instead

Environment information

Reproducibility

Code sample

let mrl1 = URL(string:"http://str1.iptvportal.ru:8080/ort/index.m3u8")!
let player = SRGMediaPlayerViewController()
player.controller.play(mrl1)

navigationController?.present(player, animated: true, completion: nil)
player.view.frame = self.view.bounds
self.addChildViewController(player)
self.view.addSubview(player.view)

Steps to reproduce

  1. This stream http://str1.iptvportal.ru:8080/ort/index.m3u8 correct read VLC Player 2018-02-26_15-12-03

  2. SRGMediaPlayer no read this stream

  3. No documentation about supporting codecs

  4. In debug information not present description codec reading current stream

defagos commented 6 years ago

Here is the error returned by the underlying AVPlayer:

Error Domain=ch.srgssr.mediaplayer Code=0 "The media cannot be played" UserInfo={NSLocalizedDescription=The media cannot be played, NSUnderlyingError=0x608000252090 {Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (1718449215), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x60c00025e3c0 {Error Domain=NSOSStatusErrorDomain Code=1718449215 "(null)" UserInfo={AVErrorFourCharCode='fmt?'}}}}}

The cryptic error code 1718449215 is the kAudioFormatUnsupportedDataFormatError named constant. If you look at the stream information, the audio codec is mpga, which is namely not supported on iOS.

A list of supported audio codecs is provided on Stack Overflow.