{"action":"created","issue":{"url":"https://api.github.com/repos/Bilibili/ijkplayer/issues/2259","repository_url":"https://api.github.com/repos/Bilibili/ijkplayer","labels_url":"https://api.github.com/repos/Bilibili/ijkplayer/issues/2259/labels{/name}","comments_url":"https://api.github.com/repos/Bilibili/ijkplayer/issues/2259/comments","events_url":"https://api.github.com/repos/Bilibili/ijkplayer/issues/2259/events","html_url":"https://github.com/Bilibili/ijkplayer/issues/2259","id":188726354,"number":2259,"title":"ijkplayer怎么更精简的支持RTSP？","user":{"login":"Coder-XL","id":10723694,"avatar_url":"https://avatars.githubusercontent.com/u/10723694?v=3","gravatar_id":"","url":"https://api.github.com/users/Coder-XL","html_url":"https://github.com/Coder-XL","followers_url":"https://api.github.com/users/Coder-XL/followers","following_url":"https://api.github.com/users/Coder-XL/following{/other_user}","gists_url":"https://api.github.com/users/Coder-XL/gists{/gist_id}","starred_url":"https://api.github.com/users/Coder-XL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coder-XL/subscriptions","organizations_url":"https://api.github.com/users/Coder-XL/orgs","repos_url":"https://api.github.com/users/Coder-XL/repos","events_url":"https://api.github.com/users/Coder-XL/events{/privacy}","received_events_url":"https://api.github.com/users/Coder-XL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-11T10:08:26Z","updated_at":"2016-12-15T06:23:56Z","closed_at":null,"body":"1、我用module-default.sh是可以播放RTSP，但是打的包快500M，太大了。\r\n2、现在是采用修改module-lite.sh文件，\r\nexport COMMON_FF_CFG_FLAGS=\"$COMMON_FF_CFG_FLAGS --enable-protocol=rtp\"\r\nexport COMMON_FF_CFG_FLAGS=\"$COMMON_FF_CFG_FLAGS --enable-demuxer=rtsp\"\r\n然后修改ff_ffplay.c文件，\r\n修改：static int packet_queue_get_or_buffering(FFPlayer *ffp, PacketQueue *q, AVPacket *pkt, int *serial, int *finished)\r\n{\r\n    assert(finished);\r\n    if (!ffp->packet_buffering)\r\n        return packet_queue_get(q, pkt, 1, serial);\r\n\r\n    while (1) {\r\n        int new_packet = packet_queue_get(q, pkt, 0, serial);\r\n        if (new_packet < 0)\r\n            return -1;\r\n        else if (new_packet == 0) {\r\n            if (q->is_buffer_indicator && !*finished)\r\n                ffp_toggle_buffering(ffp, 1);\r\n            new_packet = packet_queue_get(q, pkt, 1, serial);\r\n            if (new_packet < 0)\r\n                return -1;\r\n        }\r\n\r\n        if (*finished == *serial) {\r\n            av_packet_unref(pkt);\r\n            continue;\r\n        }\r\n        else\r\n            break;\r\n    }\r\n\r\n    return 1;\r\n}\r\n\r\nTO----->\r\nstatic int packet_queue_get_or_buffering(FFPlayer *ffp, PacketQueue *q, AVPacket *pkt, int *serial, int finished)\r\n\r\n{\r\n    \r\n    while (1) {\r\n        \r\n        int new_packet = packet_queue_get(q, pkt, 1, serial);\r\n        \r\n        if (new_packet < 0)\r\n        \r\n        {\r\n            \r\n            new_packet = packet_queue_get(q, pkt, 0, serial);\r\n            \r\n            if(new_packet < 0)\r\n            \r\n            return -1;\r\n            \r\n        }\r\n        else if (new_packet == 0) {\r\n            \r\n            if (!finished)\r\n            \r\n            ffp_toggle_buffering(ffp, 1);\r\n            \r\n            new_packet = packet_queue_get(q, pkt, 1, serial);\r\n            \r\n            if (new_packet < 0)\r\n            \r\n            return -1;\r\n            \r\n        }\r\n        if (finished == *serial) {\r\n            \r\n            av_free_packet(pkt);\r\n            \r\n            continue;\r\n            \r\n        }\r\n        else\r\n        \r\n        break;\r\n        \r\n    }\r\n    return 1;\r\n    \r\n}\r\n\r\n然后编译，打包播放不了，我从网上搜到的开源视频流地址：rtsp://218.204.223.237:554/live/1/66251FC11353191F/e7ooqwcfbqjoo80j.sdp\r\n\r\n求大家指教！！！\r\n"},"comment":{"url":"https://api.github.com/repos/Bilibili/ijkplayer/issues/comments/267249268","html_url":"https://github.com/Bilibili/ijkplayer/issues/2259#issuecomment-267249268","issue_url":"https://api.github.com/repos/Bilibili/ijkplayer/issues/2259","id":267249268,"user":{"login":"fengbenpaao","id":13444951,"avatar_url":"https://avatars.githubusercontent.com/u/13444951?v=3","gravatar_id":"","url":"https://api.github.com/users/fengbenpaao","html_url":"https://github.com/fengbenpaao","followers_url":"https://api.github.com/users/fengbenpaao/followers","following_url":"https://api.github.com/users/fengbenpaao/following{/other_user}","gists_url":"https://api.github.com/users/fengbenpaao/gists{/gist_id}","starred_url":"https://api.github.com/users/fengbenpaao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengbenpaao/subscriptions","organizations_url":"https://api.github.com/users/fengbenpaao/orgs","repos_url":"https://api.github.com/users/fengbenpaao/repos","events_url":"https://api.github.com/users/fengbenpaao/events{/privacy}","received_events_url":"https://api.github.com/users/fengbenpaao/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T06:23:56Z","updated_at":"2016-12-15T06:23:56Z","body":"哈哈,不错,  在对 ijkMediaPlay 加点参数,   现在rtsp的码流播放速度很快啊,  没有延时.      "}}
{"actor":{"display_login":"fengbenpaao"}}