flutter_ijkplayer icon indicating copy to clipboard operation
flutter_ijkplayer copied to clipboard

[Bug] Can't play videos from ipv6 connection (wifi at home), but works fine on ipv4 (mobile data).

Open Gh05ts opened this issue 4 years ago • 0 comments

Here is the log for the player when using wifi.

I/IJKMEDIA(20911): ===== versions =====

I/IJKMEDIA(20911): ijkplayer    : k0.8.8-15-ge7fde118

I/IJKMEDIA(20911): FFmpeg       : ff3.4--ijk0.8.7--20180103--001

I/IJKMEDIA(20911): libavutil    : 55.78.100

I/IJKMEDIA(20911): SDL_RunThread: [20996] ff_msg_loop

I/IJKMEDIA(20911): libavcodec   : 57.107.100

D/IJKMEDIA(20911): message_loop

I/IJKMEDIA(20911): libavformat  : 57.83.100

I/IJKMEDIA(20911): libswscale   : 4.8.100

I/IJKMEDIA(20911): libswresample: 2.9.100

I/IJKMEDIA(20911): ===== options =====

I/IJKMEDIA(20911): player-opts : reconnect                    = 5

I/IJKMEDIA(20911): player-opts : framedrop                    = 5

I/IJKMEDIA(20911): player-opts : enable-accurate-seek         = 1

I/IJKMEDIA(20911): player-opts : mediacodec                   = 1

I/IJKMEDIA(20911): player-opts : packet-buffering             = 1

I/IJKMEDIA(20911): player-opts : soundtouch                   = 1

I/IJKMEDIA(20911): player-opts : start-on-prepared            = 0

I/IJKMEDIA(20911): format-opts : ijkapplication               = 526683370720

I/IJKMEDIA(20911): format-opts : ijkiomanager                 = 526681661312

I/IJKMEDIA(20911): format-opts : fflags                       = fastseek

I/IJKMEDIA(20911): ===================

D/IJKMEDIA(20911): FFP_MSG_FLUSH:

D/IJKMEDIA(20911): ijkmp_prepare_async()=0

I/IJKMEDIA(20911): SDL_RunThread: [20997] ff_vout

I/IJKMEDIA(20911): SDL_RunThread: [20998] ff_read

I/IJKMEDIA(20911): Playback rate: 1.000000

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): onNativeInvoke 1

I/NotifyChannel(20911): onNativeInvoke 1

I/flutter (20911): Downloading m3u8

I/flutter (20911): path is /data/user/0/com.example.vii/app_flutter

I/flutter (20911): Downloaded m3u8

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): onNativeInvoke 131073

I/NotifyChannel(20911): onNativeInvoke 131073

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): onNativeInvoke 131074

I/NotifyChannel(20911): onNativeInvoke 131074

I/IJKMEDIA(20911): Add dns cache hostname = player.vimeo.com, ip = 199.232.20.217

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): onNativeInvoke 131073

I/NotifyChannel(20911): onNativeInvoke 131073

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): onNativeInvoke 131074

I/NotifyChannel(20911): onNativeInvoke 131074

I/IJKMEDIA(20911): Add dns cache hostname = 2vod-adaptive.akamaized.net, ip = 2600:140f:9800::17c8:ee80

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): onNativeInvoke 2

I/NotifyChannel(20911): onNativeInvoke 2

I/IJKMEDIA(20911): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852683~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=7172f882150f0791d0074a081884fad49b5912a252adea5a6bbee158c201f9e7/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/audio/6824bc6d/playlist.m3u8' for reading

I/IJKMEDIA(20911): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/flutter (20911): [auto, 240p, 360p, 540p, 720p]

I/flutter (20911): set data source success

I/flutter (20911): Server running

E/IJKMEDIA(20911): Connection to tcp://2vod-adaptive.akamaized.net:443 failed: No route to host E/IJKMEDIA(20911): Hit dns cache but connect fail hostname = 2vod-adaptive.akamaized.net, ip = E/IJKMEDIA(20911): https://player.vimeo.com/external/439312841.m3u8?s=e682a0048826dc4a04a1b1786b3375c83ee7cc3d: No route to host I/IJKMEDIA(20911): SDL_JNI_DetachThreadEnv: [20998] D/IJKMEDIA(20911): FFP_MSG_ERROR: 0 E/tv.danmaku.ijk.media.player.IjkMediaPlayer(20911): Error (-10000,0) I/NotifyChannel(20911): onError -10000 , extra = 0

I/NotifyChannel(20911): completion {duration=0.0, tcpSpeed=0, isPlaying=false, outputFps=0.0, currentPosition=0.0, width=0, degree=0, height=0}

Here is the log when I use mobile data:

I/IJKMEDIA(21671): ===== versions =====

I/IJKMEDIA(21671): ijkplayer    : k0.8.8-15-ge7fde118

I/IJKMEDIA(21671): FFmpeg       : ff3.4--ijk0.8.7--20180103--001

I/IJKMEDIA(21671): libavutil    : 55.78.100

I/IJKMEDIA(21671): libavcodec   : 57.107.100

I/IJKMEDIA(21671): SDL_RunThread: [21726] ff_msg_loop

I/IJKMEDIA(21671): libavformat  : 57.83.100

I/IJKMEDIA(21671): libswscale   : 4.8.100

D/IJKMEDIA(21671): message_loop

I/IJKMEDIA(21671): libswresample: 2.9.100

I/IJKMEDIA(21671): ===== options =====

I/IJKMEDIA(21671): player-opts : reconnect                    = 5

I/IJKMEDIA(21671): player-opts : framedrop                    = 5

I/IJKMEDIA(21671): player-opts : enable-accurate-seek         = 1

I/IJKMEDIA(21671): player-opts : mediacodec                   = 1

I/IJKMEDIA(21671): player-opts : packet-buffering             = 1

I/IJKMEDIA(21671): player-opts : soundtouch                   = 1

I/IJKMEDIA(21671): player-opts : start-on-prepared            = 0

I/IJKMEDIA(21671): format-opts : ijkapplication               = 526682768896

I/IJKMEDIA(21671): format-opts : ijkiomanager                 = 526680104320

I/IJKMEDIA(21671): format-opts : fflags                       = fastseek

I/IJKMEDIA(21671): ===================

D/IJKMEDIA(21671): FFP_MSG_FLUSH:

I/IJKMEDIA(21671): SDL_RunThread: [21727] ff_vout

D/IJKMEDIA(21671): ijkmp_prepare_async()=0

I/IJKMEDIA(21671): SDL_RunThread: [21728] ff_read

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(21671): onNativeInvoke 1

I/NotifyChannel(21671): onNativeInvoke 1

I/IJKMEDIA(21671): Playback rate: 1.000000

I/flutter (21671): Downloading m3u8

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(21671): onNativeInvoke 131073

I/NotifyChannel(21671): onNativeInvoke 131073

I/flutter (21671): path is /data/user/0/com.example.vii/app_flutter

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(21671): onNativeInvoke 131074

I/NotifyChannel(21671): onNativeInvoke 131074

I/IJKMEDIA(21671): Add dns cache hostname = player.vimeo.com, ip = 199.232.20.217

I/flutter (21671): Downloaded m3u8

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(21671): onNativeInvoke 131073

I/NotifyChannel(21671): onNativeInvoke 131073

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(21671): onNativeInvoke 131074

I/NotifyChannel(21671): onNativeInvoke 131074

I/IJKMEDIA(21671): Add dns cache hostname = 2vod-adaptive.akamaized.net, ip = 23.60.172.65

I/tv.danmaku.ijk.media.player.IjkMediaPlayer(21671): onNativeInvoke 2

I/NotifyChannel(21671): onNativeInvoke 2

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/audio/6824bc6d/playlist.m3u8' for reading

I/IJKMEDIA(21671): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/audio/5859c477/playlist.m3u8' for reading

I/IJKMEDIA(21671): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/video/c1647e43/playlist.m3u8' for reading

I/IJKMEDIA(21671): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/video/6824bc6d/playlist.m3u8' for reading

I/IJKMEDIA(21671): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/video/5859c477/playlist.m3u8' for reading

I/IJKMEDIA(21671): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/video/33fee4fe/playlist.m3u8' for reading

I/IJKMEDIA(21671): Hit DNS cache hostname = 2vod-adaptive.akamaized.net

I/IJKMEDIA(21671): Opening 'https://2vod-adaptive.akamaized.net/exp=1596852790~acl=%2F09f2d1a2-1add-4476-b8f6-6fef1d232609%2F%2A~hmac=54c75acf25debfc5428e8f20a13f5a1676d56e344cd7109c227a7b708cca46ee/09f2d1a2-1add-4476-b8f6-6fef1d232609/sep/audio/6824bc6d/chop/segment-1.ts' for reading

I found something related to this issue and they seem to point to issue being something related to ipv6, having some issue with dns cache.

I tried var option1 = IjkOption(IjkOptionCategory.format, "dns_cache_clear", 1); controller.setIjkPlayerOptions( [TargetPlatform.iOS, TargetPlatform.android], [option1].toSet(), );; but that is not fixing the issue, it does give me a different ipv6 address by using that option but ultimately result is same and it does not work. If someone know pls tell me how to fix this? Also because of #256 if I use setOption I lose ability to set speed greater than 1 so a solution without setOption is preferred.

https://github.com/bilibili/ijkplayer/issues/3700

This has a patch that possibly might fix the issue, but I'm not sure how to apply this patch, could you please look into it and fix it if possible?

Gh05ts avatar Aug 08 '20 18:08 Gh05ts