python-librtmp icon indicating copy to clipboard operation
python-librtmp copied to clipboard

rtmpdump's --resume on VOD streams using python-librtmp?

Open brachna opened this issue 10 years ago • 1 comments
trafficstars

I wonder if it's possible to introduce such functionality? It's quite easy to use in rtmpdump, but I need something like that in automatic python script. I see librtmp has --start arg, but I'm not sure how rtmpdump automatically finds how much time needs to be skipped (just uses timer?). If it's complicated I'll try to use timer or some mediainfo-type library and --start arg.

brachna avatar Mar 17 '15 00:03 brachna

To resume a file, rtmpdump parses the FLV file to figure out the last tag, and then (I think) works backwards to find the last keyframe. I know this because I was trying to fix it when the FLV is truncated and doesn’t end on a tag boundary. But if you don’t care about FLVs truncated at the wrong position, you should be able to just seek to the end and then read the length of the last tag, and work backwards from there.

vadmium avatar Mar 17 '15 01:03 vadmium