VideoExpertsGroup / VXG.Media.SDK.Android

Market leading Android SDK with encoding, streaming & playback functionality. Connect any ONVIF, RTSP or any video source. Convert your phone into an IP camera, or broadcast video to millions, thanks to streaming in all popular formats such as WebRTC, RTSP, RTMP and HLS.
https://www.videoexpertsgroup.com/mobile/
142 stars 65 forks source link

.ts file fails to play #25

Open iptvstreamplayer opened 2 years ago

iptvstreamplayer commented 2 years ago

.ts file not playing http://zqxcb1.ddns.net:8080/live/iptvtest/iptvtest/39434.ts

this link is playing on other player Like vlc, Exo etc but not playing in this library

please help i want to buy this library

MaxKoutsanov commented 2 years ago

Hello,

I tried your link on the latest version of the SDK and everything works well on my side. ... player.c(6015): STAT(RES(1280x720) FPS:26.06/02348 V: c-d(47-0:95%) d-r(8:16%) pts_delta(40000) L(2320000), A: c-d(0:100%) d-r(96:89%) pts_delta(23223) buf(8388608:16777216:4194304)) player.c(6015): STAT(RES(1280x720) FPS:23.79/02667 V: c-d(55-0:95%) d-r(8:16%) pts_delta(40000) L(2640000), A: c-d(0:100%) d-r(111:88%) pts_delta(23211) buf(8388608:16777216:4194304)) player.c(6015): STAT(RES(1280x720) FPS:25.27/01972 V: c-d(69-0:93%) d-r(8:16%) pts_delta(40000) L(3200000), A: c-d(0:100%) d-r(137:85%) pts_delta(23222) buf(8388608:16777216:4194304)) player.c(6015): STAT(RES(1280x720) FPS:25.64/02262 V: c-d(76-0:93%) d-r(8:16%) pts_delta(40000) L(3480000), A: c-d(0:100%) d-r(144:84%) pts_delta(23211) buf(8388608:16777216:4194304)) player.c(6015): STAT(RES(1280x720) FPS:25.41/01859 V: c-d(80-0:93%) d-r(8:16%) pts_delta(40000) L(3640000), A: c-d(0:100%) d-r(159:83%) pts_delta(23223) buf(8388608:16777216:4194304)) player.c(6015): STAT(RES(1280x720) FPS:24.83/01908 V: c-d(90-0:92%) d-r(8:34%) pts_delta(40000) L(4040000), A: c-d(0:100%)

Please provide the full log of the issue from your device, if possible

Thanks, Max.

iptvstreamplayer commented 2 years ago

My Demo Project link https://drive.google.com/file/d/1VzqlBc7ZE_yZ5BL_JIRMt7j3dlui6MHl/view?usp=sharing

Please check and help or provide source code thank you

My Code Visual Studio 2019 Xamarin.Android

My Code MediaPlayer mediaPlayer; private string url = "http://zqxcb1.ddns.net:8080/live/iptvtest/iptvtest/39434.ts";

mediaPlayer = FindViewById(Resource.Id.mediaPlayer1); mediaPlayer.SurfaceView.SetZOrderOnTop(true);

if (mediaPlayer != null) { mediaPlayer.Config.ConnectionUrl = url; if (string.IsNullOrWhiteSpace(mediaPlayer.Config.ConnectionUrl)) return;

            MediaPlayerConfig mediaPlayerConfig = new MediaPlayerConfig();
            mediaPlayerConfig.ConnectionUrl = mediaPlayer.Config.ConnectionUrl;
            mediaPlayerConfig.ConnectionNetworkProtocol = -1;
            mediaPlayerConfig.ConnectionDetectionTime = 2000;
            mediaPlayerConfig.ConnectionBufferingTime = 500;
            mediaPlayerConfig.DecodingType = 1;
            mediaPlayerConfig.RendererType = 1;
            mediaPlayerConfig.SynchroEnable = 1;
            mediaPlayerConfig.SynchroNeedDropVideoFrames = 1;
            mediaPlayerConfig.EnableColorVideo = 1;
            mediaPlayerConfig.DataReceiveTimeout = 30000;
            mediaPlayerConfig.NumberOfCPUCores = 0;
            mediaPlayer.Open(mediaPlayerConfig, this);
        }

Log

12-12 10:43:00.336 I/SurfaceView(11135): 19369463 visibleChanged:true -> SurfaceHolder.Callback.surfaceCreated 12-12 10:43:00.337 W//player.c(11135): player_set_log_level: native_level -1, media_level -1 12-12 10:43:00.337 D/ViewRootImpl(11135): setSurfaceViewCreated, created:true 12-12 10:43:00.337 I/SurfaceView(11135): 19369463 surfaceChanged -- format=4 w=720 h=1256 visibleChanged:true -> SurfaceHolder.Callback.surfaceChanged 12-12 10:43:00.337 D/SurfaceView(11135): updateScreenMode w:720 h:1256 ViewRoot w:720 h:1520 12-12 10:43:00.337 D/SurfaceView(11135): try to resquest 90Hz 12-12 10:43:00.338 W//player.c(11135): player_init: native ver: 6.27.20180522 12-12 10:43:00.338 W//player.c(11135): player_init 0x77c43085c0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: 0x77c43085c0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: GetReadySurface 0x77b01ff8a0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: OnReceiveSubtitle 0x77b01ff9b8 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: OnVideoSourceFrameAvailable 0x77b01ffa08 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: OnAudioSourceFrameAvailable 0x77b01ff990 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: OnVideoRendererFrameAvailable 0x77b01ff9e0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: DrawReadyFrame 0x77b01ff800 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: updateSizesAndAspects 0x77b02015d8Thread started: #2

12-12 10:43:00.338 W//libmain.c(11135): export_player_init: notifyFirstVideoFrame 0x77b0200f48 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: notifyStartDecoderSearch 0x77b0200f98 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: notifyStopDecoderSearch 0x77b0200fc0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: notifySourceMetadataReady 0x77b0200f70 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: getPath 0x77b0200228 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: getLicense 0x77b01ff508 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: getRemoteLicense 0x77b01ff530 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: getCachedLicense 0x77b01ff4e0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: getVersion 0x77b01ff558 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: audioTrackInit 0x77b01fffd0 12-12 10:43:00.338 W//libmain.c(11135): export_player_init: audioTrackRestart 0x77b0200020 12-12 10:43:00.339 W//libmain.c(11135): export_player_init: audioTrackQuit 0x77b01ffff8 12-12 10:43:00.339 W//libmain.c(11135): export_player_init: audioTrackWriteByteBuffer 0x77b0200048 12-12 10:43:00.339 W//libmain.c(11135): export_player_init audioTrackGetFrameCount 0x77b01fffa8 12-12 10:43:00.339 W//libmain.c(11135): export_player_init audioTrackGetDeviceOutputSampleRate 0x77b01fff80 12-12 10:43:00.339 W//libmain.c(11135): export_player_init: ok 1 12-12 10:43:00.339 W//libmain.c(11135): export_player_setcallback -1003452992 12-12 10:43:00.339 W//libmain.c(11135): export_player_setcallback ok 1395379504, 1395379464 12-12 10:43:00.339 W//player.c(11135): player_callback_data_info: mask 0x0, video_renderer_frame_crop: x 0,y 0, w 0, h 0 12-12 10:43:00.339 W/e.vxgplayerdem(11135): Attempt to remove non-JNI local reference, dumping thread 12-12 10:43:00.339 I/chatty (11135): uid=16273(com.companyname.vxgplayerdemo) MediaPlayerThre identical 2 lines 12-12 10:43:00.339 W/e.vxgplayerdem(11135): Attempt to remove non-JNI local reference, dumping thread 12-12 10:43:00.339 W//player.c(11135): player_set_record_options path() flags(0) record_frame_dur(0) split_time(0), split_size(0), sprefix() 12-12 10:43:00.339 W//player.c(11135): player_set_record_options start trim(8000000000000000) stop trim(8000000000000000) 12-12 10:43:00.339 W//player.c(11135): player_set_record_options ret=-1 12-12 10:43:00.339 W/e.vxgplayerdem(11135): Attempt to remove non-JNI local reference, dumping thread 12-12 10:43:00.339 W/e.vxgplayerdem(11135): Attempt to remove non-JNI local reference, dumping thread 12-12 10:43:00.339 W//libmain.c(11135): =>export_player_audio_select 12-12 10:43:00.339 W//libmain.c(11135): <=export_player_audio_select ret=(-1) 12-12 10:43:00.339 W//libmain.c(11135): =>export_player_subtitle_select -1 raw_data:0 12-12 10:43:00.339 W//libmain.c(11135): <=export_player_subtitle_select ret=(0) 12-12 10:43:00.339 W//player.c(11135): player_notify: 101 12-12 10:43:00.339 W//player.c(11135): player_notify: CallVoidMethod 101 12-12 10:43:00.340 D/Surface (11135): Surface::connect(this=0x7757f91000,api=1) 12-12 10:43:00.342 D/mali_winsys(11135): EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000 12-12 10:43:00.342 D/Surface (11135): Surface::setBufferCount(this=0x7757f91000,bufferCount=3) 12-12 10:43:00.346 D/SurfaceView(11135): updateScreenMode w:720 h:1256 ViewRoot w:720 h:1520 12-12 10:43:00.346 D/SurfaceView(11135): try to resquest 90Hz 12-12 10:43:00.348 D/Mono (11135): Requesting loading reference 1 (of 2) of Java.Interop.dll 12-12 10:43:00.348 D/Mono (11135): Loading reference 1 of Java.Interop.dll asmctx DEFAULT, looking for System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e 12-12 10:43:00.348 D/Mono (11135): Assembly Ref addref Java.Interop[0x77c5202d00] -> System.Core[0x776395f400]: 3 12-12 10:43:00.351 W//player.c(11135): player_notify: CallVoidMethod return 101 12-12 10:43:00.351 W//player.c(11135): player_open: init clocks params->start_preroll(0) 12-12 10:43:00.352 W//recorder_provider_thread.c(11135): =>rpt_rec_setup rec_state(-1) record_flags(0x00000000) record_frame_duration(0) record_path() record_prefix() 12-12 10:43:00.352 W//recorder_provider_thread.c(11135): <=rpt_rec_setup rec_state(-1) is_change(0) record_stream_a(0) 12-12 10:43:00.352 W//player.c(11135): player_open: check closing(0) 12-12 10:43:00.352 W//recorder_provider_thread.c(11135): rpt_start: player_event_handler_wait 12-12 10:43:00.353 W//recorder_provider_thread.c(11135): ==>Recorder(prov) start work 12-12 10:43:00.353 W//recorder_provider_thread.c(11135): rpt_start: player_event_handler_wait 3 12-12 10:43:00.353 W//player.c(11135): player_open: Content provider open: http://zqxcb1.ddns.net:8080/live/iptvtest/iptvtest/39434.ts prot:-1 mode:0 record_mode:0 12-12 10:43:00.353 W//player.c(11135): player_open: check closing(0) 12-12 10:43:00.353 W//player.c(11135): player_open: Content provider thread start. 12-12 10:43:00.353 W//player.c(11135): player_open: check closing(0) 12-12 10:43:00.353 W//content_provider_thread.c(11135): cpt_start: start thread 12-12 10:43:00.354 W//content_provider_thread.c(11135): AttachCurrentThread : 0 12-12 10:43:00.354 W//content_provider_thread.c(11135): Content provider init: 1 12-12 10:43:00.354 W//content_provider_thread.c(11135): Content provider open: 12-12 10:43:00.357 W//ffmpeg_content_provider.c(11135): ffmpeg(src) ffmpeg_cp_open: discontinuity timeout v:1000000 a:1000000 12-12 10:43:00.357 W//ffmpeg_content_provider.c(11135): ffmpeg(src) ffmpeg_cp_open: openning... buffering_type: 0, time_shift:500, size_shift:0, probe_time:2000, protocol:-1 connection_mode:0 datareceive_timeout:30000 extra_data_filter:0 12-12 10:43:00.357 W/Gralloc3(11135): mapper 3.x is not supported 12-12 10:43:00.358 W//utils.c(11135): MEDIA VERSION (393865) 12-12 10:43:00.367 E/gralloc (11135): Arm Module v1.0 12-12 10:43:00.374 E/ion (11135): ioctl c0044901 failed with code -1: Invalid argument 12-12 10:43:00.447 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: urls: (http://zqxcb1.ddns.net:8080/live/iptvtest/iptvtest/39434.ts) rtsp_transport: -1, datareceive 30000000, conn_detection_time 2000, time_shift 500, size_shift 0, key start_offset -9223372036854775808 start_path() ext_stream(0) send_playpause_to_server(0) keep_alive(1) 12-12 10:43:00.447 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: cookies: () 12-12 10:43:00.448 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: max_analyze_duration:0(2000000) probesize:5000000 con_timeout(60000:60000000) sap:0 12-12 10:43:00.448 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: try url: http://zqxcb1.ddns.net:8080/live/iptvtest/iptvtest/39434.ts, rtsp_transport: tcp 12-12 10:43:00.448 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: set ext_stream 12-12 10:43:00.448 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: rtmp set token live 12-12 10:43:00.448 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: invoke mediaformat_open_input 12-12 10:43:00.479 W//ffmpeg_content_provider.c(11135): timeout_interrupt_callback: first time 12-12 10:43:00.611 I/Choreographer(11135): Skipped 18 frames! The application may be doing too much work on its main thread. 12-12 10:43:12.712 W//utils.c(11135): ll_log: [, tls, URLContext]: error:00000000:lib(0):func(0):reason(0) 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: open_input --> averror:(-5) 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: in mediaformat_open_input failed error:I/O error 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: max_analyze_duration:0(2000000) probesize:5000000 con_timeout(60000:60000000) sap:0 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: try url: http://zqxcb1.ddns.net:8080/live/iptvtest/iptvtest/39434.ts, rtsp_transport: http 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: set ext_stream 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: rtmp set token live 12-12 10:43:12.713 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: invoke mediaformat_open_input 12-12 10:43:12.714 W//ffmpeg_content_provider.c(11135): timeout_interrupt_callback: first time 12-12 10:44:12.729 W//ffmpeg_content_provider.c(11135): timeout_interrupt_callback timeout: 60000000, first:266446593485, current_time:266506608654, diff:60015169 12-12 10:44:12.730 W//utils.c(11135): ll_log: [, tls, URLContext]: Unable to negotiate TLS/SSL session 12-12 10:44:12.730 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: open_input --> averror:(-5) 12-12 10:44:12.730 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: in mediaformat_open_input failed error:I/O error 12-12 10:44:12.730 W//ffmpeg_content_provider.c(11135): ffmpeg_cp_open: out mediaformat_open_input failed error:I/O error 12-12 10:44:12.731 W//ffmpeg_content_provider.c(11135): MEDIA(src) ffmpeg_cp_close CONTENT_PROVIDER_DISCONNECTED 12-12 10:44:12.731 W//player.c(11135): player_notify: 117 12-12 10:44:12.731 W//player.c(11135): player_notify: CallVoidMethod 117 Thread started: #3 12-12 10:44:12.753 W//player.c(11135): player_notify: CallVoidMethod return 117 12-12 10:44:12.753 W//content_provider_thread.c(11135): Exit with error: 1 12-12 10:44:12.754 W//content_provider_thread.c(11135): DetachCurrentThread : 1 12-12 10:44:12.755 W//player.c(11135): player_notify: 107 12-12 10:44:12.756 W//player.c(11135): player_notify: CallVoidMethod 107 12-12 10:44:12.757 W//player.c(11135): player_notify: CallVoidMethod return 107 12-12 10:44:12.757 W//content_provider_thread.c(11135): cpt_start failed 0 12-12 10:44:12.757 W//player.c(11135): player_open: Content provider thread start failed. 12-12 10:44:12.757 W//player.c(11135): player_close started... 12-12 10:44:12.757 W//player.c(11135): player_close: now we in openning state, wait please interrupt 12-12 10:44:12.757 W//player.c(11135): player_close invoked. 12-12 10:44:12.757 W//player.c(11135): player_notify: 103 12-12 10:44:12.757 W//player.c(11135): player_notify: CallVoidMethod 103 12-12 10:44:12.759 W//player.c(11135): player_notify: CallVoidMethod return 103 12-12 10:44:12.759 W//player.c(11135): player_notify: 7 12-12 10:44:12.759 W//player.c(11135): player_notify: CallVoidMethod 7 12-12 10:44:12.759 W//player.c(11135): player_notify: CallVoidMethod return 7 12-12 10:44:12.759 W//player.c(11135): player_interrupt: interrupt when content provider is NULL. 12-12 10:44:12.759 W//player.c(11135): player_close: test pthread_mutex_lock 0x77c43085c0 12-12 10:44:12.759 W//content_provider_thread.c(11135): CONTENT(prov) already stopped 12-12 10:44:12.765 W//recorder_provider_thread.c(11135): ==Recorder(prov) pkt close rc:1 12-12 10:44:12.766 W//recorder_provider_thread.c(11135): <==Recorder(prov) recorder_thread_method exit 12-12 10:44:12.767 W//player.c(11135): player_notify: 8 12-12 10:44:12.768 W//player.c(11135): player_notify: CallVoidMethod 8 12-12 10:44:12.769 W//player.c(11135): player_notify: CallVoidMethod return 8 12-12 10:44:12.769 W//player.c(11135): player_close: test pthread_mutex_unlock 0x77c43085c0 12-12 10:44:12.769 W/e.vxgplayerdem(11135): Attempt to remove non-JNI local reference, dumping thread 12-12 10:44:12.772 W//player.c(11135): player_close started... 12-12 10:44:12.773 W//player.c(11135): player_close: in closing state now... 12-12 10:44:12.773 W//player.c(11135): player_term: test pthread_mutex_lock 0x77c43085c0 12-12 10:44:12.773 W//player.c(11135): player_term: test pthread_mutex_unlock 0x77c43085c0 12-12 10:44:12.773 W//player.c(11135): player_term: test pthread_mutex_destroy 0x77c43085c0 12-12 10:44:12.774 W//player.c(11135): player_term.

MaxKoutsanov commented 2 years ago

Hello,

Thank you for your feedback and demo project. According to your log, you are using the old version of our PlayerSDK: player.c(11135): player_init: native ver: 6.27.20180522

Please try to use the latest binaries that are committed: https://github.com/VideoExpertsGroup/VXG.Media.SDK.Android/blob/master/MediaSDK/PlayerSDK/aar/playersdk-6.96.20211118.aar (should be: native ver: 6.96.20211108.1308) or get full release package https://github.com/VideoExpertsGroup/VXG.Media.SDK.Android/releases/tag/2.0.284

I tried it on my side it, using your project and everything works well!

Thanks, Max.

iptvstreamplayer commented 2 years ago

Hello thank you for your support I am unable to add this file playersdk-6.96.20211118.aar i dont know where to add this file as i am using xamarin.android

Can you please send me my project where you added latest sdk or please guide me How to add that file in xamarin.android

MaxKoutsanov commented 2 years ago

Hello,

I did it simply:

  1. unzip playersdk-6.96.20211118.aar
  2. rename classes.jar -> mediaplayersdk.jar
  3. copy and replace files in this dir: VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/Jars mediaplayersdk.jar -> VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/Jars/mediaplayersdk.jar jni/arm64-v8a/ -> VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/Jars/arm64-v8a/ jni/armeabi-v7a/ -> VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/Jars/armeabi-v7a/ jni/x86/ -> VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/Jars/x86/ jni/x86_64/ -> VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/Jars/x86_64/
  4. add in csproj file missed libraries: VXGPlayerDemo/VXGPlayerDemo/MediaPlayerSDK.Android/MediaPlayerSDK.Android.csproj .... <EmbeddedNativeLibrary Include="Jars\arm64-v8a\libssl.so" /> <EmbeddedNativeLibrary Include="Jars\arm64-v8a\libonvif-arm64-v8a.so" /> <EmbeddedNativeLibrary Include="Jars\arm64-v8a\libcrypto.so" /> etc. ...

Also, here my project, try please on your side: https://www.dropbox.com/s/jgatyomtkifyedc/VXGPlayerDemo.Xamarin.BasedOn.PlayerSDK.20211118.zip?dl=0

Thanks, Max.

iptvstreamplayer commented 2 years ago

MaxKoutsanov Thank you for your support Its working now Can you please tell me one thing sound is not comming out in some ts file

and please guide me i want to buy it Sdk have yearly plan one time plan

VideoExpertsGroup1 commented 2 years ago

Hello, Thank you for your interest in VXG. Great to hear everything is working well.

To purchase the SDK, please select your desired plan and click "Order now" from here: https://www.videoexpertsgroup.com/mobile/

If you need any help, please email andrew@videoexpertsgroup.com and I can walk you through the process. If you would prefer a manual invoice, send me an email and I can send it this way.

Thanks,

VideoExpertsGroup1 commented 2 years ago

@iptvstreamplayer

Have you been able to purchase your license?

Please send me an email, and we can get you set up. This way I can also let you know how our customer support works. With a license, you receive 10 hours of technical support for any questions, help and customizations you might need. This is also fully white-label, and can be private labelled under your company branding.

VideoExpertsGroup1 commented 2 years ago

@iptvstreamplayer - Are you still interested in the Mobile SDK?

Let us know how we can support you.

VideoExpertsGroup1 commented 2 years ago

@iptvstreamplayer Are you still testing and interested in the VXG Mobile SDK for Android?

Please share some updates and if you have any questions or need any help. If you are no longer interested, kindly let us know and we will close this thread.

Thanks! Andrew Hurley, VXG