summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-01-15 21:32:38 +0100
committerAnton Khirnov <anton@khirnov.net>2014-01-17 10:30:45 +0100
commit2ce8bca51f7264b47027f69d50dd8e49aa2fd683 (patch)
tree75c3807f1ba3cd3adbab04426d9039d8ce2a375c /avconv.c
parent33018907bd07b34e0e70d5ae12097265eb3734d7 (diff)
avconv: print a warning when falling back to default 25fps
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/avconv.c b/avconv.c
index 17dc468f6b..edce1e5fb2 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1691,10 +1691,19 @@ static int transcode_init(void)
(video_sync_method == VSYNC_CFR ||
(video_sync_method == VSYNC_AUTO &&
!(oc->oformat->flags & (AVFMT_NOTIMESTAMPS | AVFMT_VARIABLE_FPS))))) {
- ost->frame_rate = ist->framerate.num ? ist->framerate :
- ist->st->avg_frame_rate.num ?
- ist->st->avg_frame_rate :
- (AVRational){25, 1};
+ if (ist->framerate.num)
+ ost->frame_rate = ist->framerate;
+ else if (ist->st->avg_frame_rate.num)
+ ost->frame_rate = ist->st->avg_frame_rate;
+ else {
+ av_log(NULL, AV_LOG_WARNING, "Constant framerate requested "
+ "for the output stream #%d:%d, but no information "
+ "about the input framerate is available. Falling "
+ "back to a default value of 25fps. Use the -r option "
+ "if you want a different framerate.\n",
+ ost->file_index, ost->index);
+ ost->frame_rate = (AVRational){ 25, 1 };
+ }
if (ost->enc && ost->enc->supported_framerates && !ost->force_fps) {
int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates);