1、我用module-default.sh是可以播放RTSP,但是打的包快500M,太大了。 2、现在是采用修改module-lite.sh文件, export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtp" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=rtsp" 然后修改ff_ffplay.c文件, 修改:static int packet_queue_get_or_buffering(FFPlayer ffp, PacketQueue q, AVPacket pkt, int serial, int *finished) { assert(finished); if (!ffp->packet_buffering) return packet_queue_get(q, pkt, 1, serial);
while (1) {
int new_packet = packet_queue_get(q, pkt, 0, serial);
if (new_packet < 0)
return -1;
else if (new_packet == 0) {
if (q->is_buffer_indicator && !*finished)
ffp_toggle_buffering(ffp, 1);
new_packet = packet_queue_get(q, pkt, 1, serial);
if (new_packet < 0)
return -1;
}
if (*finished == *serial) {
av_packet_unref(pkt);
continue;
}
else
break;
}
return 1;
}
TO-----> static int packet_queue_get_or_buffering(FFPlayer ffp, PacketQueue q, AVPacket pkt, int serial, int finished)
{
while (1) {
int new_packet = packet_queue_get(q, pkt, 1, serial);
if (new_packet < 0)
{
new_packet = packet_queue_get(q, pkt, 0, serial);
if(new_packet < 0)
return -1;
}
else if (new_packet == 0) {
if (!finished)
ffp_toggle_buffering(ffp, 1);
new_packet = packet_queue_get(q, pkt, 1, serial);
if (new_packet < 0)
return -1;
}
if (finished == *serial) {
av_free_packet(pkt);
continue;
}
else
break;
}
return 1;
}
然后编译,打包播放不了,我从网上搜到的开源视频流地址:rtsp://218.204.223.237:554/live/1/66251FC11353191F/e7ooqwcfbqjoo80j.sdp
求大家指教!!!