Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
brachna opened this issue Mar 17, 2015 · 1 comment
Open

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

brachna opened this issue Mar 17, 2015 · 1 comment

Comments

@brachna
Copy link

brachna commented Mar 17, 2015

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.

@vadmium
Copy link

vadmium commented Mar 17, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants