Opened 13 years ago
Closed 13 years ago
#694 closed enhancement (fixed)
Speed-up/Slow-down a video
Reported by: | burek | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | yes |
Description
The problem: Video is recorded at 10 fps, but always plays at 30 fps (erroneously encoded somehow). How to correct such a video to play with the correct speed?
I'm not sure if there is an easy way to do this, but afaik there is no simple way to do this, because FFmpeg does not do any kind of buffering of frames it reads from the input, it just drops/duplicates the frames.
We had few people on irc channel, trying to fix their videos, using FFmpeg, that's why I'm posting this. We resolved this issue by writting raw video to a tmp file (to loose the timestamps) and then we read the tmp file with a slower frame rate, like this:
ffmpeg -i input.264 -f rawvideo -r 30 tmpfile
ffmpeg -s 1280x720 -r 10 -f rawvideo -i tmpfile output.mp4
The video in input.264 would play nice at 10 fps, but somehow timestamps are saved just like it's 30 fps video, so it was always played back too fast.
The suggestion is to create an enhancement to rearrange timestamps on the fly, to avoid the need for the tmp file, to be able to speed up/slow down a video stream (also if possible even without re-encoding it).
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Replying to burek:
[...]
The suggestion is to create an enhancement to rearrange timestamps on the fly, to avoid the need for the tmp file, to be able to speed up/slow down a video stream (also if possible even without re-encoding it).
What about using the setpts filter?
About avoiding transcoding, that's pretty hard/impossible, as timing information is only available after decoding (unless you implement a specific PTS-tweaking bitfilter just for a specific format).
comment:3 by , 13 years ago
Analyzed by developer: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Closing the ticket as the feature should be implementable through the setpts filter, please re-open the ticket in case you think it is not.
Replying to burek:
Please provide the sample.