bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.6k stars 8.14k forks source link

在一些Android 4.4 的设备上 播放前一个视频播放正常,后一个视频播放不了,视频是正常的没有问题 #2960

Open xzy1213 opened 7 years ago

xzy1213 commented 7 years ago

在一些华为 4.4 的设备上, 播放几段视频,前一段播放的正常,后一段可能播放不了,报错,不是必现。 但是在6.0的设备上没有出现这个问题,4.4 的设备是1G内存, 下面的是播放不了的日志 04-14 15:36:33.153 2767-5369/? D/IJKMEDIA: shifted frame pts, curr_cts: 120320 @ 216, ctts: 512, ctts_count: 217 04-14 15:36:33.153 2767-5369/? D/IJKMEDIA: shifted frame pts, curr_cts: 120832 @ 216, ctts: 512, ctts_count: 217 04-14 15:36:33.153 2767-5369/? E/IJKMEDIA: Option ijkapplication not found. 04-14 15:36:33.153 2767-5369/? D/IJKMEDIA: Before avformat_find_stream_info() pos: 1467129 bytes read:36264 seeks:1 nb_streams:1 04-14 15:36:33.153 2767-5369/? D/IJKMEDIA: nal_unit_type: 7, nal_ref_idc: 3 04-14 15:36:33.154 2767-5369/? D/IJKMEDIA: nal_unit_type: 8, nal_ref_idc: 3 04-14 15:36:33.155 2767-5369/? D/IJKMEDIA: nal_unit_type: 6, nal_ref_idc: 0 04-14 15:36:33.155 2767-5369/? D/IJKMEDIA: nal_unit_type: 5, nal_ref_idc: 3 04-14 15:36:33.155 2767-5369/? D/IJKMEDIA: user data:"x264 - core 148 r2728 4d5c8b0 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00" 04-14 15:36:33.156 2767-5369/? I/IJKMEDIA: Reinit context to 752x1344, pix_fmt: yuv420p 04-14 15:36:33.164 2767-5369/? D/IJKMEDIA: no picture 04-14 15:36:33.198 2767-5369/? D/IJKMEDIA: All info found 04-14 15:36:33.200 2767-5369/? D/IJKMEDIA: After avformat_find_stream_info() pos: 14185 bytes read:69032 seeks:2 frames:1 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: max_frame_duration: 10.000 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/data/?/files/Fitness/fbbdd609953f9a8396f53f1af6da2eff': 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: Metadata: 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: major_brand : 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: isom 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: minor_version : 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: 512 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: compatible_brands: 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: isomiso2avc1mp41 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: encoder : 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: Lavf57.56.100 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: Duration: 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: 00:00:09.48 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: , start: 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: 0.000000 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: , bitrate: 04-14 15:36:33.200 2767-5369/? I/IJKMEDIA: 1238 kb/s 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: Stream #0:0 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: (eng) 04-14 15:36:33.201 2767-5369/? D/IJKMEDIA: , 1, 1/12800 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: : Video: h264, 1 reference frame (avc1 / 0x31637661), yuv420p(left), 750x1334 (752x1344), 0/1, 1235 kb/s 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: , 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: 25 fps, 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: 25 tbr, 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: 12800 tbn, 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: 50 tbc 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: (default) 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: Metadata: 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: handler_name : 04-14 15:36:33.201 2767-5369/? I/IJKMEDIA: VideoHandler 04-14 15:36:33.203 2767-5369/? D/IJKMEDIA: nal_unit_type: 7, nal_ref_idc: 3 04-14 15:36:33.203 2767-5369/? D/IJKMEDIA: nal_unit_type: 8, nal_ref_idc: 3 04-14 15:36:33.206 2767-5369/? I/IJKMEDIA: VideoCodec: avcodec, h264 04-14 15:36:33.206 2767-5369/? W/IJKMEDIA: fps: 25.000000 (normal) 04-14 15:36:33.206 2767-5369/? W/IJKMEDIA: fps: 25.000000 (normal) 04-14 15:36:33.206 2767-5381/? I/IJKMEDIA: SDL_RunThread: [5381] ff_video_dec 04-14 15:36:33.206 2767-5381/? D/IJKMEDIA: ffp_toggle_buffering_l: start 04-14 15:36:33.206 2767-5367/? D/IJKMEDIA: FFP_MSG_VIDEO_SIZE_CHANGED: 750, 1334 04-14 15:36:33.206 2767-5367/? D/IJKMEDIA: FFP_MSG_SAR_CHANGED: 0, 1 04-14 15:36:33.206 2767-5367/? D/IJKMEDIA: ijkmp_get_msg: FFP_MSG_PREPARED 04-14 15:36:33.206 2767-5367/? D/IJKMEDIA: FFP_MSG_PREPARED: 04-14 15:36:33.206 2767-5367/? D/IJKMEDIA: FFP_MSG_BUFFERING_START: 04-14 15:36:33.223 2767-2767/? V/MediaPlayer: isLooping 04-14 15:36:33.223 2767-5075/? W/MediaPlayer: info/warning (710, 90) 04-14 15:36:33.223 2767-5075/? V/MediaPlayer: callback application 04-14 15:36:33.223 2767-2767/? D/IJKMEDIA: IjkMediaPlayer_start 04-14 15:36:33.223 2767-5075/? V/MediaPlayer: back from callback 04-14 15:36:33.223 2767-2767/? D/IJKMEDIA: ijkmp_start() 04-14 15:36:33.223 2767-2767/? D/IJKMEDIA: ijkmp_start()=0 04-14 15:36:33.223 2767-5367/? D/IJKMEDIA: ijkmp_get_msg: FFP_REQ_START 04-14 15:36:33.223 2767-5075/ V/MediaPlayer: message received msg=200, ext1=710, ext2=100 04-14 15:36:33.223 2767-5367/ D/IJKMEDIA: ijkmp_get_msg: FFP_REQ_START: start on fly 04-14 15:36:33.223 2767-5075/? W/MediaPlayer: info/warning (710, 100) 04-14 15:36:33.223 2767-5075/? V/MediaPlayer: callback application 04-14 15:36:33.223 2767-5075/? V/MediaPlayer: back from callback 04-14 15:36:33.223 2767-2767/? D/PlayerView: MEDIA_INFO_BUFFERING_START: 04-14 15:36:33.307 2767-5367/? D/IJKMEDIA: ijkmp_get_msg: FFP_REQ_START 04-14 15:36:33.307 2767-5367/? D/IJKMEDIA: ijkmp_get_msg: FFP_REQ_START: start on fly 04-14 15:36:33.307 2767-5376/? D/IJKMEDIA: nal_unit_type: 6, nal_ref_idc: 0 04-14 15:36:33.308 2767-5376/? D/IJKMEDIA: nal_unit_type: 5, nal_ref_idc: 3 04-14 15:36:33.309 2767-5376/? D/IJKMEDIA: user data:"x264 - core 148 r2728 4d5c8b0 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00" 04-14 15:36:33.309 2767-5376/? I/IJKMEDIA: Reinit context to 752x1344, pix_fmt: yuv420p 04-14 15:36:33.319 2767-5376/? D/IJKMEDIA: no picture 04-14 15:36:33.322 2767-5377/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 2 04-14 15:36:33.328 2767-5377/? D/IJKMEDIA: no picture 04-14 15:36:33.332 2767-5378/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 2 04-14 15:36:33.335 2767-5369/? D/IJKMEDIA: ffp_toggle_buffering_l: end 04-14 15:36:33.336 2767-5367/? D/IJKMEDIA: FFP_MSG_BUFFERING_END: 04-14 15:36:33.336 2767-2767/? D/PlayerView: MEDIA_INFO_BUFFERING_END: 04-14 15:36:33.342 2767-5379/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 0 04-14 15:36:33.352 2767-5380/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 0 04-14 15:36:33.377 2767-5376/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 2 04-14 15:36:33.402 2767-5377/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 2 04-14 15:36:33.404 2767-5381/? D/IJKMEDIA: Video frame changed from size:0x0 format:none serial:-1 to size:750x1334 format:yuv420p serial:1 04-14 15:36:33.414 2767-5381/? D/IJKMEDIA: Setting 'video_size' to value '750x1334' 04-14 15:36:33.414 2767-5381/? D/IJKMEDIA: Setting 'pix_fmt' to value '0' 04-14 15:36:33.414 2767-5381/? D/IJKMEDIA: Setting 'time_base' to value '1/12800' 04-14 15:36:33.414 2767-5381/? D/IJKMEDIA: Setting 'pixel_aspect' to value '0/1' 04-14 15:36:33.414 2767-5381/? D/IJKMEDIA: Setting 'frame_rate' to value '25/1' 04-14 15:36:33.414 2767-5381/? I/IJKMEDIA: w:750 h:1334 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:0/1 sws_param: 04-14 15:36:33.415 2767-5381/? D/IJKMEDIA: query_formats: 2 queried, 1 merged, 0 already done, 0 delayed 04-14 15:36:33.415 2767-5381/? D/IJKMEDIA: SDL_VoutFFmpeg_CreateOverlay(w=750, h=1334, fmt=RV16(0x36315652, dp=0x4e240168) 04-14 15:36:33.415 2767-5367/? D/IJKMEDIA: FFP_MSG_VIDEO_SIZE_CHANGED: 750, 1334 04-14 15:36:33.447 2767-5381/? D/IJKMEDIA: Video: first frame decoded 04-14 15:36:33.447 2767-5378/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 0 04-14 15:36:33.447 2767-5381/? D/IJKMEDIA: SDL_VoutFFmpeg_CreateOverlay(w=750, h=1334, fmt=RV16(0x36315652, dp=0x4e240168) 04-14 15:36:33.447 2767-5367/? D/IJKMEDIA: FFP_MSG_VIDEO_SIZE_CHANGED: 750, 1334 04-14 15:36:33.452 2767-5368/? D/IJKMEDIA: ANativeWindow_setBuffersGeometry: w=607, h=1080, f=(0x1) => w=750, h=1334, f=RV16(0x36315652) 04-14 15:36:33.489 2767-5368/? E/BufferQueue: [unnamed-2767-29] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed 04-14 15:36:33.489 2767-5368/? E/Surface: dequeueBuffer failed (Operation not permitted) 04-14 15:36:33.489 2767-5368/? E/IJKMEDIA: SDL_Android_NativeWindow_display_l: ANativeWindow_lock: failed -1 04-14 15:36:33.489 2767-5367/? D/IJKMEDIA: FFP_MSG_VIDEO_RENDERING_START: 04-14 15:36:33.489 2767-2767/? I/tv.danmaku.ijk.media.player.IjkMediaPlayer: Info: MEDIA_INFO_VIDEO_RENDERING_START 04-14 15:36:33.489 2767-2767/? D/PlayerView: MEDIA_INFO_VIDEO_RENDERING_START: 04-14 15:36:33.493 2767-5379/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 0 04-14 15:36:33.493 2767-5381/? D/IJKMEDIA: SDL_VoutFFmpeg_CreateOverlay(w=750, h=1334, fmt=RV16(0x36315652, dp=0x4e240168) 04-14 15:36:33.493 2767-5367/? D/IJKMEDIA: FFP_MSG_VIDEO_SIZE_CHANGED: 750, 1334 04-14 15:36:33.499 2767-5368/? E/BufferQueue: [unnamed-2767-29] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count 04-14 15:36:33.499 2767-5368/? E/Surface: dequeueBuffer failed (Invalid argument) 04-14 15:36:33.499 2767-5368/? E/IJKMEDIA: SDL_Android_NativeWindow_display_l: ANativeWindow_lock: failed -22 04-14 15:36:33.521 2767-5380/? D/IJKMEDIA: nal_unit_type: 1, nal_ref_idc: 2 04-14 15:36:33.532 2767-5368/? E/BufferQueue: [unnamed-2767-29] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count 04-14 15:36:33.532 2767-5368/? E/Surface: dequeueBuffer failed (Invalid argument) 04-14 15:36:33.532 2767-5368/? E/IJKMEDIA: SDL_Android_NativeWindow_display_l: ANativeWindow_lock: failed -22

xzy1213 commented 7 years ago

有没有有类似的问题啊 求帮忙

raymond1012 commented 7 years ago

我们最近也发现华为有类似问题,后续会尝试出workaround方案

xzy1213 commented 7 years ago

好吧。。。