Input option -r has no effect with -vcodec copy
|Reported by:||Weiwu Zhang||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
When a playback device can only accept 25fps and input is 24fps, people usually have to re-encode. But some other software provided an alternative way called conforming.
Instead of re-encoding for a different framerate, the video stream can be copied with a different set of timestamps and duration. This is called conforming. The stretch of video length is usually not observable, and the audio is stretched at the same rate (ffmpeg's atempo filter can do that) and re-encoded.
This feature useful in the case that re-encoding video damages perceived quality more than alterating its duration.
It is especially useful when audio doesn't matter: e.g. when user wants slow-mo effect from a 240fps camera, or when user processes security camera output at low framerate.
Currently for this to work, users do the following:
- mencoder allow users to specific framerate, overwriting the framerate specified in the source file. Use mencoder to conform the video:
> mencoder -fps 25 -o conformed.avi -ovc copy -nosound 24fps_input.mp4
- use ffmpeg to set tempo:
> ffmpeg -i conformed.avi -i 24fps_input.mp4 -map 0 -map 1 -c:v copy -af "atempo=0.96" 25fps_output.mp4
- delete the temp file
> rm conformed.avi
where 0.96 equals 24⁄25.
This feature request propose to allow user do this without the need of mencoder.
This can be done by making -r parameter overwrite the framerate specified in input file when user specifies video stream to be copied instead of re-encoded.
If user specified -r when re-encoding the video, he could mean that input video's frames be dropped or duplicated, or that the output video should be encoded in the specified framerate.
However, if user specifies -r together with '-c:v copy' for video stream to be copied, he unambiguously means that he intends conforming. ffmpeg can proceed with conforming, and, by the end of the process, if it found that video and audio duration in input mathces each other, but in output different, it can give a warning, prompting the user to google for solution (which is to use atempo).
Change History (4)
comment:3 by , 6 years ago
|Component:||undetermined → ffmpeg|
|Priority:||normal → wish|
|Reproduced by developer:||set|
|Status:||new → open|
|Summary:||feature request: conforming → Input option -r has no effect with -vcodec copy|
|Version:||unspecified → git-master|