kxmovie icon indicating copy to clipboard operation
kxmovie copied to clipboard

FLV pseudo streaming

Open phamducgiam opened this issue 9 years ago • 4 comments

Hi guys.

Anyone got the idea how to implemented pseudo streaming for flv video format?

Thanks.

phamducgiam avatar Jul 21 '15 08:07 phamducgiam

Do you mean getting a stream through to kxmovie with minimal latency? If so, I have some code that I can push to a fork of kxmovie that will give you some ideas.

gregoryking avatar Jul 21 '15 08:07 gregoryking

Hi.

I meant streaming flv file and allow user to seek to another position without downloading file. For example, I have a flv file like http://example.com/sample.flv. The file already contains metadata for pseudo streaming, including keyframes. To seek to new position, I can make request like http://example.com/sample.flv?start=[param] where param is position in file.

I already tried vlc media player for iOS (it uses ffmpeg too). It can play pseudo streaming url but it can decode audio frame only, no picture at all. I think the problem is when I make new request, the information about video is lost, so it can not decode picture from video frame. I think I need to save information about video when the original url was opened, then reuse that information to parse new stream after seeking but I don't figure how to do it.

Please consider the link http://flash.flowplayer.org/plugins/streaming/pseudostreaming.html for more detail about pseudo streaming for flv.

Thanks.

phamducgiam avatar Jul 21 '15 09:07 phamducgiam

I'm not familiar with pseudo streaming. I've used rtmp mainly for live streams (using nginx-rtmp and crtmpserver) but I'm pretty sure that when I did the odd test streaming an flv file the seek support in kxmovie worked well with rtmp. Might be worth looking into?

gregoryking avatar Jul 21 '15 11:07 gregoryking

Thanks.

My thought was right. I need to save AVFormatContext after making new request . The problem now is I need to get keyframes from stream. I know they are transfer at the begin of the stream, I just need to find how to extract them.

phamducgiam avatar Jul 21 '15 11:07 phamducgiam