mvasilchuk / yasem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yasem can't play live video streams

cchalk opened this issue · comments

Hi, When playing live video streams from a stalker portal the player stops with the following message:

From the message it looks as if it is matched the "ffrt" protocol instead of the "ffrt2" protocol.

[STUB ] virtual QUrl yasem::MagApi::handleUrl(QUrl&): "http://iptv.provider/stalker_portal/server/load.php?type=stb&action=log&real_action=play&param=ffrt2 rtmp%3A%2F%2FSERVER_IP_HERE%3A1935%2Flive%2FCHANNEL.stream%3Ftoken%3Ds00%3A1A%3A79%3A00%3A34%3AF0%26portal%3D1&tmp_type=1&JsHttpRequest=1-xml"
[DEBUG] "ffrt2 rtmp://SERVER_IP_HERE:1935/live/CHANNEL.stream?token=sMY_MAC&portal=1" ""
[DEBUG] matched proto: "ffrt" , url: "2 rtmp://SERVER_IP_HERE:1935/live/CHANNEL.stream?token=sMY_MAC&portal=1"
[DEBUG] Thread "QtAV Player thread" started
[DEBUG] loading: 2 rtmp://SERVER_IP_HERE:1935/live/CHANNEL.stream?token=sMY_MAC&portal=1 ...
[DEBUG] av_register_all and avformat_network_init
[STUB ] virtual QUrl yasem::MagApi::handleUrl(QUrl&): "http://iptv.provider/stalker_portal/server/load.php?type=itv&action=set_last_id&id=514&JsHttpRequest=1-xml"
[DEBUG] all closed and reseted
[DEBUG] avformat_open_input: format_context:'0x7f1730002980', url:'2 rtmp://SERVER_IP_HERE:1935/live/CHANNEL.stream?token=sMY_MAC&portal=1'...
[DEBUG] avformat_open_input: url:'2 rtmp://SERVER_IP_HERE:1935/live/CHANNEL.stream?token=sMY_MAC&portal=1' ret:-2
WARN : Can't open media: Open error (FFmpeg fffffffffffffffe: No such file or directory)

I found that if ffrt2 and ffrt3 are processed before ffrt on it's own then this doesn't happen.

From yasem/plugins/yasem-mag-api/gstb.cpp I changed the following:

Line 825 from:

QRegularExpression urlRegex("^(?<proto>auto|rtp|rtsp|rtpac3|rtsp_ac3|ptpmpeg4|rtpmpeg4_aac|mpegts|mpegps|file|mp4|mp4_mpa|fm|ffmpeg|ffrt|ffrt2|ffrt3)?(\\s+)?(?<url>.*?)$");

To:

QRegularExpression urlRegex("^(?<proto>auto|rtp|rtsp|rtpac3|rtsp_ac3|ptpmpeg4|rtpmpeg4_aac|mpegts|mpegps|file|mp4|mp4_mpa|fm|ffmpeg|ffrt2|ffrt3|ffrt)?(\\s+)?(?<url>.*?)$");

Thanks.

Ok. Thanks. I'll fix that