K
K
Kirill Kirkhov2012-07-23 11:56:24
Video
Kirill Kirkhov, 2012-07-23 11:56:24

How to save part of video content from flv file?

Good afternoon!

There is a certain abstract server which gives video content in flv. He also knows how to give any fragment of a file of any length. It is always known - the full size of the file, in which format the video and audio are encoded.
Let's say there is a video clip 5 minutes long. Is it possible, without downloading the entire video, to save only the selected video fragment, say 1 minute, as a full-fledged video?
What additional information is needed for implementation?

I would be grateful for any information on this topic!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrew, 2012-07-23
@xaoc80

If there is a link to the file, then you can do this:
ffmpeg -i [link] -ss 00:00:00 -t 00:00:60 [file name, where to save]
- ss specify from what point in seconds
- t - duration time in
seconds

N
Nikolai Vasilchuk, 2012-07-23
@Anonym

It's not entirely clear what the problem is if умеет отдавать любой фрагмент файла любой длины. In the case of pseudo-streaming, usually if you make a request like example.com/video.flv?start=10&stop=30 , then the output will be a 20-second flv movie that you can download and save.

T
ToSHiC, 2012-07-23
@ToSHiC

At the beginning of the flv file, there is a table with a corresponding offset in bytes for each second of the video. I won’t tell you the format, but I’m sure that there are utilities for viewing this table (you can try github.com/unnu/flvtool2 ). Next, you can download the video starting from the desired offset and add a 13-byte header “FLV\x1\x5\0\0\0\x9\0\0\0\0” before this piece, you should get a valid flv file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question