nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.5k stars 201 forks source link

Firestick 4k when playing forward in hnags in a loop forever #427

Open kjb70 opened 3 years ago

kjb70 commented 3 years ago

When I play a Video (smb or dlna) on Firestick 4k an I want to to a fast forward it hangs and loops forever. Is the Version delivered from Amamzon the latest version?

courville commented 3 years ago

Let's try to focus on SMB support. What is the NAS you are using? Could you please try out this apk: https://github.com/nova-video-player/aos-AVP/releases/tag/v5.15.17 ? If it does not work please try disabling SMBv2 and change resolver order in nova settings (do force close nova between each test).

kjb70 commented 3 years ago

Does not help. I tried the smb (with all the varieities) and also the upnp The thing is when I watch a movie and presse pause and then play again, it coult be, that it hangs (in 80% of the cases)

courville commented 3 years ago

What type of NAS you are using? Is this a regression compared to an earlier version of nova?

kjb70 commented 3 years ago

I'm using ReadyMedia (minidlna) 1.3.0 on a linux system. There is no change in behaviour. Prssing the big round button on remote the video is paused. After pressing play it plays in slow motion and the loading cycle is cycling. After a while it stops. Also when spooling sometimes it works, but after a while spolling back and forward and back and so on it hangs in a loop forver...

kjb70 commented 3 years ago

I have done some testing. I took a second Fire TV 4K Stick. Same problem. I changed from LAN to WLAN. Same problem. But: When I plug in the Fire TV 4K Stick into my Samsung TV dierectly, it seem that nothings hangs. When I plug in the Fire TV 4K Stick into my Denon AVRX100, I have the hang Problems. What is the difference for the FireTV Stick 4K when it is plugged in into the TV or onto the AVR? Hint: I plug it into the Denon because I want to the Sound DD, DTS,.... Otherwise from the TV I get only PCM. And I don't want to make a connection via optical from TV to Denon.

courville commented 3 years ago

OK, I think your problem is a passthrough issue. What I recommend is to use your stick on the Denon but not to select any audio passthrough option on your stick. This should result in nova decoding in multichannel PCM that should be supported by your Denon AV receiver with less incompatibility.

kjb70 commented 3 years ago

but not to select any audio passthrough option on your stick.

In the settings of the Fire Stick 4K i cannot find any passthrough settings. In the settings of Nova Video Player it is disabled hang problems are still there.

What settings do you mean?

kjb70 commented 3 years ago

Any solution for Firestick on an AVR Receiver?

courville commented 3 years ago

Try not using passthrough. You will still get 5.1 PCM multichannel if hooked directly to AVR.

kjb70 commented 3 years ago

In the Nova Video Player I set "not using passthrough". It doesn't help. When playing and press "pause" and the "play" again, it hangs. Or if I make fast forward or fast backward in hangs. Like i said it depends on where the Fire TV Stick is plugged in. Directly in the TV it is working. In the AVR receiver it hangs. I also tried SMB, DLNA, .... and many other settings. Other players like MMC or vimu are playing without hanging. Do you mean other settings in the Fire TV Stick? If so, what settings exactly?

courville commented 3 years ago

OK I tried and indeed I reproduce the behavior you have. I managed to have a stable working state this way: in nova settings click several times on enable swcodecs (it will enable some advanced options) and then select audio codecs and pick openSLES. It seems that audiotrack is having issues on AV receivers. Please let me know if it helps.

kjb70 commented 3 years ago

selecting audio codecs and picking openSLES helps. It does'nt hang anymore. But now I have another problem: Playing avi leads to too fast playing and jumping while playing. Any idea, why this is like that?

courville commented 3 years ago

When using audiotrack everything goes fine until seek is performed and NdkMediaCodec sf errors are encountered (no sound). Back creates ANR.

I/com.archos.mediacenter.video.player.PlayerActivity(13422): [main] INFO  c.a.m.video.player.PlayerActivity - onVideoDb: trakt calc: 0 local 650903
I/com.archos.mediacenter.video.player.Player(13422): [Thread-16] INFO  c.a.mediacenter.video.player.Player - openVideo: smb://DS720P/download/public/toto.mkv
V/AvosMediaPlayer(13422): Initializing AvosMediaPlayer
V/avos_media_player(13422): event_thread: start
D/avos_player(13422): device_config.mp_decoder  0
D/avos_player(13422): device_config.mp_audio_interface  0
D/avos_player(13422): device_config.output_sample_rate  48000
D/avos_player(13422): 0x93ac6800|avos_mp_create:
D/avos_media_player(13422): setVideoSurface
V/avos_media_player(13422): free_native_window
D/avos_player(13422): 0x93ac6800|avos_mp_setdatasource: http://localhost:43090/toto.mkv
D/avos_player(13422): 0x93ac6800|avos_mp_open_async:
D/avos_player(13422):
D/avos_player(13422): stream_open http://localhost:43090/toto.mkv  etype 48->ETYPE_MKV  flags 2001
D/avos_player(13422): flags:  PAUSED  LATE_INDEX  FILE_NONLOCAL
D/avos_player(13422): PARSER: [FFMPEG]  buffersize -1
D/avos_player(13422): VIDEO:  [HEVC] [HEVC/H.265] 1920x808   0fps  0kbit/s  dec [(none)]
D/avos_player(13422): AUDIO:  [00FF] [AAC] 48000Hz  6-ch 0bit  0kbit/s  dec [(none)]
D/avos_player(13422): SUB:    [0004] [TEXT] s_english gfx 0  ext 0  1/1000
D/avos_player(13422): SUB:    [0004] [TEXT] s_english gfx 0  ext 0  1/1000
D/avos_player(13422): audio[0] playable!
W/VideoCapabilities(13422): Unrecognized profile/level 1/32 for video/mp4v-es
W/VideoCapabilities(13422): Unrecognized profile/level 32768/2 for video/mp4v-es
W/VideoCapabilities(13422): Unrecognized profile/level 32768/64 for video/mp4v-es
W/VideoCapabilities(13422): Unsupported mime video/dolby-vision
W/VideoCapabilities(13422): Unsupported mime video/dolby-vision
W/VideoCapabilities(13422): Unsupported mime video/dolby-vision
W/VideoCapabilities(13422): Unsupported mime video/dolby-vision
W/VideoCapabilities(13422): Unsupported mime video/dolby-vision
W/VideoCapabilities(13422): Unsupported mime video/dolby-vision
W/VideoCapabilities(13422): Unrecognized profile/level 0/0 for video/mpeg2
W/VideoCapabilities(13422): Unrecognized profile/level 0/2 for video/mpeg2
W/VideoCapabilities(13422): Unrecognized profile/level 0/3 for video/mpeg2
I/VideoCapabilities(13422): Unsupported profile 4 for video/mp4v-es
I/OMXClient(13422): MuxOMX ctor
I/MediaCodec(13422): [OMX.MTK.VIDEO.DECODER.HEVC] setting surface generation to 13744129
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc P2 + 5635872
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc P2 - 5635880
D/MediaCodecLogger(13422): Got a Service. Calling PID = 13422
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc P3 + 5635887
D/SurfaceUtils(13422): set up nativeWindow 0x93d1e008 for 1920x808, color 0x7f000001, rotation 0, usage 0x2933
W/ACodec  (13422): [OMX.MTK.VIDEO.DECODER.HEVC] setting nBufferCountActual to 6 failed: -2147483648
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc P3 - 5635897
D/avos_player(13422): VID_SNK: [sfdec2]
D/avos_player(13422): videosink_open: opened
D/avos_player(13422): VID_DEC: [sfdec2]
D/avos_player(13422): AUD_DEC: [ffmpeg]
D/avos_player(13422): facomp: open
D/avos_player(13422): lvl 0  tgt 0  maxg 0  sm 8  hist 65536
D/avos_player(13422): facomp: level 0
D/avos_player(13422):
D/avos_player(13422): stream_start http://localhost:43090/toto.mkv
D/avos_player(13422): AUD_SNK: [audio]
D/avos_player(13422): stream_sink_audio_open
E/libc    (13422): Access denied finding property "dolby.dma.minbufcnt"
D/AudioTrack(13422): min buf count is limited to 2 times HAL buf
W/Thread-21(13422): type=1400 audit(0.0:651): avc: denied { read } for name="u:object_r:dolby_prop:s0" dev="tmpfs" ino=8954 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:dolby_prop:s0 tclass=file permissive=0
D/AmazonAudioTrackCallback(13422): No AudioTrackFlags provided.  Using internal defaults.
D/AmazonAudioTrackCallback(13422): No Audio content type provided.
I/android.media.AudioTrack(13422): AUDIOINFO: audio_input: format: 2 sample_rate: 48000 channels: 6 AudioAttributes: AudioAttributes: usage=1 content=2 flags=0x0 tags= bundle=null
E/libc    (13422): Access denied finding property "dolby.dma.minbufcnt"
W/Thread-21(13422): type=1400 audit(0.0:652): avc: denied { read } for name="u:object_r:dolby_prop:s0" dev="tmpfs" ino=8954 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:dolby_prop:s0 tclass=file permissive=0
D/AudioTrack(13422): min buf count is limited to 2 times HAL buf
D/AudioTrack(13422): Client defaulted notificationFrames to 1025 for frameCount 3076
D/avos_player(13422): codec not supported for passthrough...
E/libc    (13422): Access denied finding property "dolby.dma.minbufcnt"
W/Thread-22(13422): type=1400 audit(0.0:653): avc: denied { read } for name="u:object_r:dolby_prop:s0" dev="tmpfs" ino=8954 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:dolby_prop:s0 tclass=file permissive=0
D/AudioTrack(13422): min buf count is limited to 2 times HAL buf
D/avos_player(13422): start video at start
D/AmazonAudioTrackCallback(13422): No AudioTrackFlags provided.  Using internal defaults.
D/AmazonAudioTrackCallback(13422): No Audio content type provided.
I/android.media.AudioTrack(13422): AUDIOINFO: audio_input: format: 2 sample_rate: 48000 channels: 6 AudioAttributes: AudioAttributes: usage=1 content=2 flags=0x0 tags= bundle=null
W/Thread-22(13422): type=1400 audit(0.0:654): avc: denied { read } for name="u:object_r:dolby_prop:s0" dev="tmpfs" ino=8954 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:dolby_prop:s0 tclass=file permissive=0
E/libc    (13422): Access denied finding property "dolby.dma.minbufcnt"
D/AudioTrack(13422): min buf count is limited to 2 times HAL buf
D/AudioTrack(13422): Client defaulted notificationFrames to 1025 for frameCount 3076
I/com.archos.mediacenter.video.player.PlayerActivity(13422): [main] INFO  c.a.m.video.player.PlayerActivity - onAudioMetadataUpdated: newAudio: 0  mVideoInfo.audioTrack: 0  firstTimeUpdated: true  nbTrack: 1
W/ResourceType(13422): No package identifier when getting value for resource number 0x00000000
W/ResourceType(13422): No package identifier when getting value for resource number 0x00000000
D/avos_player(13422): 0x93ac6800|avos_mp_setsubtitledelay: 0
D/avos_player(13422): 0x93ac6800|avos_mp_setsubtitleratio: 24000/24000
D/avos_player(13422): 0x93ac6800|avos_mp_setaudiofilter: 0 0
D/avos_player(13422): facomp: level 0
I/com.archos.mediacenter.video.player.PlayerActivity(13422): [main] INFO  c.a.m.video.player.PlayerActivity - onAudioMetadataUpdated: newAudio: -1  mVideoInfo.audioTrack: 0  firstTimeUpdated: false  nbTrack: 1
W/ResourceType(13422): No package identifier when getting value for resource number 0x00000000
W/ResourceType(13422): No package identifier when getting value for resource number 0x00000000
D/avos_player(13422): 0x93ac6800|avos_mp_setavdelay: 0
D/avos_player(13422): stream_play_n_frames( 10, 646563, -1 )
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc Got First Input Frame 5636174
W/AHierarchicalStateMachine(13422): Warning message AMessage(what = 'omxI') = {
W/AHierarchicalStateMachine(13422):   int32_t type = 0
W/AHierarchicalStateMachine(13422):   int32_t event = 3
W/AHierarchicalStateMachine(13422):   int32_t data1 = 1
W/AHierarchicalStateMachine(13422):   int32_t data2 = 117440527
W/AHierarchicalStateMachine(13422): } unhandled in root state.
D/SurfaceUtils(13422): set up nativeWindow 0x93d1e008 for 1920x1088, color 0x7f000005, rotation 0, usage 0x2933
W/ACodec  (13422): [OMX.MTK.VIDEO.DECODER.HEVC] setting nBufferCountActual to 11 failed: -2147483648
I/MediaCodecLogger(13422): updateFormatChanged width = 1920 height = 808
I/MediaCodecLogger(13422): updatePTSTime [HW.video.hevc] First PTS after Flush or reset = 646563000
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc Got First Frame Ready 5636251
D/avos_player(13422): init_renderer: width NOT changed: 1920 -> 1920
D/avos_player(13422): init_renderer: height NOT changed: 808 -> 1088
D/avos_player(13422): sfdec_read: INFO_FORMAT_CHANGED: 1920x808
I/MediaCodecLogger(13422): [ASAP] HW.video.hevc Got First Frame Render 5636251
I/MediaCodecLogger(13422): App uses Timestamps for AVSync
D/avos_player(13422):   <NSR 646563>0x93ac6800|avos_mp_start:
D/avos_player(13422): #realloc 0 -> 40
D/avos_player(13422): 0x93ac6800|avos_mp_setlooping: 0
D/avos_player(13422): 0x93ac6800|avos_mp_setaudiofilter: 0 0
D/avos_player(13422): facomp: level 0
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc.bitrateInKbps = 563
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc Resolution change from 0x0 to 1920x808 took = 1
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc.bitrateInKbps = 601
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc.bitrateInKbps = 933
D/avos_player(13422): ###  <NSR 646604>0x93ac6800|avos_mp_pause:
D/avos_player(13422): _audio_abort!
I/MediaCodecLogger(13422): Flushing: com.android.mediaplayer.4K.HW.video.hevc.framerate = 16.270 fps
D/avos_player(13422): stream_play_n_frames( 10, 663746, 661744 )
I/MediaCodecLogger(13422): updatePTSTime [HW.video.hevc] First PTS after Flush or reset = 663746000
I/MediaCodecLogger(13422): Flushing: com.android.mediaplayer.4K.HW.video.hevc.framerate = 0.000 fps
D/avos_player(13422):   <NSR 663746>stream_play_n_frames( 10, 666624, 663746 )
E/NdkMediaCodec(13422): sf error code: -13
I/MediaCodecLogger(13422): updatePTSTime [HW.video.hevc] First PTS after Flush or reset = 666624000
D/avos_player(13422):   <NSR 666624>stream_play_n_frames( 10, 667959, 666624 )
I/MediaCodecLogger(13422): Flushing: com.android.mediaplayer.4K.HW.video.hevc.framerate = 0.000 fps
E/NdkMediaCodec(13422): sf error code: -13
I/MediaCodecLogger(13422): updatePTSTime [HW.video.hevc] First PTS after Flush or reset = 667959000
I/MediaCodecLogger(13422): Flushing: com.android.mediaplayer.4K.HW.video.hevc.framerate = 0.000 fps
D/avos_player(13422):   <NSR 667959>stream_play_n_frames( 10, 673214, 667959 )
E/NdkMediaCodec(13422): sf error code: -13
I/MediaCodecLogger(13422): updatePTSTime [HW.video.hevc] First PTS after Flush or reset = 673214000
D/avos_player(13422):   <NSR 673214>0x93ac6800|avos_mp_start:
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc.bitrateInKbps = 2116
I/MediaCodecLogger(13422): updatePTSTime Possible seek found!
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc.bitrateInKbps = 1902
I/MediaCodecLogger(13422): com.android.mediaplayer.4K.HW.video.hevc.bitrateInKbps = 3164
mjnewton commented 3 years ago

I too appear to be having this very same issue, and may have inadvertently raised a duplicate issue in the form of https://github.com/nova-video-player/aos-AVP/issues/466.

The workaround to select 'Force OpenSLES' appears to work insofar that I haven't been able to reproduce the hanging/stuttering following pause/seek (unless I'm celebrating too early and it's just luck!), however I have noticed that the audio format reported by my soundbar (Sonos Arc plugged into the TV via eARC) changes from 'Dolby Digital Plus 5.1' to 'Multichannel PCM 5.1' - is that an issue? It may also have caused a lip sync issue on some videos but I'm sure it keeps changing (or I need to reassess on another day once my brain is rested as working out which way the sync is, if any, is quite taxing!).