Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

video file: fast forward and backward doesn't work

Tags:

video

forward

I have a few video clip in both flv and mp4 formats which don't fast forward or backward to arbitrary spots (time indexes). Basically each video clip has 4 or 5 spots to which you can backward or forward, but you can't forward or backward to arbitrary time indexes. I was wondering if there is anyway to modify or convert the videos so that I can forward or backward to any time index on the video clip.

Thanks for your help

like image 416
Neha Agarwal Avatar asked Feb 05 '12 18:02

Neha Agarwal


1 Answers

In general, you can't seek to arbitrary time positions within a video file format such as MP4. This is because video players rely on the container to provide file offsets for video frames that can be random-accessed, and only certain frames qualify. (Most video frames cannot be decoded on their own, but rely on the information from several previous frames.)

However, many videos provide the illusion of seeking to arbitrary time positions by providing many random-access points. In other words, the GOP size is kept small (keyframes every 1 second is typical), and these keyframes are referenced in the MP4 structure. Your videos are probably encoded with large GOP sizes, so they have very few seek points.

I suspect that if you transcoded your videos using a tool such as FFmpeg with default settings, you'll find that they are much more usable when seeking.

like image 76
David Simmons Avatar answered Oct 21 '22 15:10

David Simmons