| OLD | NEW |
| 1 /* | 1 /* |
| 2 * FFmpeg main | 2 * FFmpeg main |
| 3 * Copyright (c) 2000-2003 Fabrice Bellard | 3 * Copyright (c) 2000-2003 Fabrice Bellard |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2758 { | 2758 { |
| 2759 frame_topBand = atoi(arg); | 2759 frame_topBand = atoi(arg); |
| 2760 if (frame_topBand < 0) { | 2760 if (frame_topBand < 0) { |
| 2761 fprintf(stderr, "Incorrect top crop size\n"); | 2761 fprintf(stderr, "Incorrect top crop size\n"); |
| 2762 av_exit(1); | 2762 av_exit(1); |
| 2763 } | 2763 } |
| 2764 if ((frame_topBand) >= frame_height){ | 2764 if ((frame_topBand) >= frame_height){ |
| 2765 fprintf(stderr, "Vertical crop dimensions are outside the range of the o
riginal image.\nRemember to crop first and scale second.\n"); | 2765 fprintf(stderr, "Vertical crop dimensions are outside the range of the o
riginal image.\nRemember to crop first and scale second.\n"); |
| 2766 av_exit(1); | 2766 av_exit(1); |
| 2767 } | 2767 } |
| 2768 fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n"); |
| 2768 frame_height -= frame_topBand; | 2769 frame_height -= frame_topBand; |
| 2769 } | 2770 } |
| 2770 | 2771 |
| 2771 static void opt_frame_crop_bottom(const char *arg) | 2772 static void opt_frame_crop_bottom(const char *arg) |
| 2772 { | 2773 { |
| 2773 frame_bottomBand = atoi(arg); | 2774 frame_bottomBand = atoi(arg); |
| 2774 if (frame_bottomBand < 0) { | 2775 if (frame_bottomBand < 0) { |
| 2775 fprintf(stderr, "Incorrect bottom crop size\n"); | 2776 fprintf(stderr, "Incorrect bottom crop size\n"); |
| 2776 av_exit(1); | 2777 av_exit(1); |
| 2777 } | 2778 } |
| 2778 if ((frame_bottomBand) >= frame_height){ | 2779 if ((frame_bottomBand) >= frame_height){ |
| 2779 fprintf(stderr, "Vertical crop dimensions are outside the range of the o
riginal image.\nRemember to crop first and scale second.\n"); | 2780 fprintf(stderr, "Vertical crop dimensions are outside the range of the o
riginal image.\nRemember to crop first and scale second.\n"); |
| 2780 av_exit(1); | 2781 av_exit(1); |
| 2781 } | 2782 } |
| 2783 fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n"); |
| 2782 frame_height -= frame_bottomBand; | 2784 frame_height -= frame_bottomBand; |
| 2783 } | 2785 } |
| 2784 | 2786 |
| 2785 static void opt_frame_crop_left(const char *arg) | 2787 static void opt_frame_crop_left(const char *arg) |
| 2786 { | 2788 { |
| 2787 frame_leftBand = atoi(arg); | 2789 frame_leftBand = atoi(arg); |
| 2788 if (frame_leftBand < 0) { | 2790 if (frame_leftBand < 0) { |
| 2789 fprintf(stderr, "Incorrect left crop size\n"); | 2791 fprintf(stderr, "Incorrect left crop size\n"); |
| 2790 av_exit(1); | 2792 av_exit(1); |
| 2791 } | 2793 } |
| 2792 if ((frame_leftBand) >= frame_width){ | 2794 if ((frame_leftBand) >= frame_width){ |
| 2793 fprintf(stderr, "Horizontal crop dimensions are outside the range of the
original image.\nRemember to crop first and scale second.\n"); | 2795 fprintf(stderr, "Horizontal crop dimensions are outside the range of the
original image.\nRemember to crop first and scale second.\n"); |
| 2794 av_exit(1); | 2796 av_exit(1); |
| 2795 } | 2797 } |
| 2798 fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n"); |
| 2796 frame_width -= frame_leftBand; | 2799 frame_width -= frame_leftBand; |
| 2797 } | 2800 } |
| 2798 | 2801 |
| 2799 static void opt_frame_crop_right(const char *arg) | 2802 static void opt_frame_crop_right(const char *arg) |
| 2800 { | 2803 { |
| 2801 frame_rightBand = atoi(arg); | 2804 frame_rightBand = atoi(arg); |
| 2802 if (frame_rightBand < 0) { | 2805 if (frame_rightBand < 0) { |
| 2803 fprintf(stderr, "Incorrect right crop size\n"); | 2806 fprintf(stderr, "Incorrect right crop size\n"); |
| 2804 av_exit(1); | 2807 av_exit(1); |
| 2805 } | 2808 } |
| 2806 if ((frame_rightBand) >= frame_width){ | 2809 if ((frame_rightBand) >= frame_width){ |
| 2807 fprintf(stderr, "Horizontal crop dimensions are outside the range of the
original image.\nRemember to crop first and scale second.\n"); | 2810 fprintf(stderr, "Horizontal crop dimensions are outside the range of the
original image.\nRemember to crop first and scale second.\n"); |
| 2808 av_exit(1); | 2811 av_exit(1); |
| 2809 } | 2812 } |
| 2813 fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n"); |
| 2810 frame_width -= frame_rightBand; | 2814 frame_width -= frame_rightBand; |
| 2811 } | 2815 } |
| 2812 | 2816 |
| 2813 static void opt_frame_size(const char *arg) | 2817 static void opt_frame_size(const char *arg) |
| 2814 { | 2818 { |
| 2815 if (av_parse_video_frame_size(&frame_width, &frame_height, arg) < 0) { | 2819 if (av_parse_video_frame_size(&frame_width, &frame_height, arg) < 0) { |
| 2816 fprintf(stderr, "Incorrect frame size\n"); | 2820 fprintf(stderr, "Incorrect frame size\n"); |
| 2817 av_exit(1); | 2821 av_exit(1); |
| 2818 } | 2822 } |
| 2819 } | 2823 } |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4186 { "copyinkf", OPT_BOOL | OPT_EXPERT, {(void*)©_initial_nonkeyframes}, "c
opy initial non-keyframes" }, | 4190 { "copyinkf", OPT_BOOL | OPT_EXPERT, {(void*)©_initial_nonkeyframes}, "c
opy initial non-keyframes" }, |
| 4187 | 4191 |
| 4188 /* video options */ | 4192 /* video options */ |
| 4189 { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (
in bits/s)", "bitrate" }, | 4193 { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (
in bits/s)", "bitrate" }, |
| 4190 { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate
(in bits/s)", "bitrate" }, | 4194 { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate
(in bits/s)", "bitrate" }, |
| 4191 { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE
_VIDEO]}, "set the number of video frames to record", "number" }, | 4195 { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE
_VIDEO]}, "set the number of video frames to record", "number" }, |
| 4192 { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame
rate (Hz value, fraction or abbreviation)", "rate" }, | 4196 { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame
rate (Hz value, fraction or abbreviation)", "rate" }, |
| 4193 { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or
abbreviation)", "size" }, | 4197 { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or
abbreviation)", "size" }, |
| 4194 { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspec
t ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, | 4198 { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspec
t ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, |
| 4195 { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "
set pixel format, 'list' as argument shows all the pixel formats supported", "fo
rmat" }, | 4199 { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "
set pixel format, 'list' as argument shows all the pixel formats supported", "fo
rmat" }, |
| 4196 { "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_top}, "set top crop
band size (in pixels)", "size" }, | 4200 { "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_top}, "Deprecated,
please use the crop avfilter", "size" }, |
| 4197 { "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_bottom}, "set bo
ttom crop band size (in pixels)", "size" }, | 4201 { "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_bottom}, "Deprec
ated, please use the crop avfilter", "size" }, |
| 4198 { "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_left}, "set left c
rop band size (in pixels)", "size" }, | 4202 { "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_left}, "Deprecated
, please use the crop avfilter", "size" }, |
| 4199 { "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_right}, "set righ
t crop band size (in pixels)", "size" }, | 4203 { "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_right}, "Deprecat
ed, please use the crop avfilter", "size" }, |
| 4200 { "padtop", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set top pad band size (i
n pixels)", "size" }, | 4204 { "padtop", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set top pad band size (i
n pixels)", "size" }, |
| 4201 { "padbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set bottom pad band s
ize (in pixels)", "size" }, | 4205 { "padbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set bottom pad band s
ize (in pixels)", "size" }, |
| 4202 { "padleft", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set left pad band size
(in pixels)", "size" }, | 4206 { "padleft", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set left pad band size
(in pixels)", "size" }, |
| 4203 { "padright", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set right pad band siz
e (in pixels)", "size" }, | 4207 { "padright", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set right pad band siz
e (in pixels)", "size" }, |
| 4204 { "padcolor", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set color of pad bands
(Hex 000000 thru FFFFFF)", "color" }, | 4208 { "padcolor", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set color of pad bands
(Hex 000000 thru FFFFFF)", "color" }, |
| 4205 { "intra", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&intra_only}, "use onl
y intra frames"}, | 4209 { "intra", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&intra_only}, "use onl
y intra frames"}, |
| 4206 { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" }, | 4210 { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" }, |
| 4207 { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}
, "discard threshold", "n" }, | 4211 { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}
, "discard threshold", "n" }, |
| 4208 { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixe
d video quantizer scale (VBR)", "q" }, | 4212 { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixe
d video quantizer scale (VBR)", "q" }, |
| 4209 { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_over
ride_string}, "rate control override for specific intervals", "override" }, | 4213 { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_over
ride_string}, "rate control override for specific intervals", "override" }, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4326 stream_maps, nb_stream_maps) < 0) | 4330 stream_maps, nb_stream_maps) < 0) |
| 4327 av_exit(1); | 4331 av_exit(1); |
| 4328 ti = getutime() - ti; | 4332 ti = getutime() - ti; |
| 4329 if (do_benchmark) { | 4333 if (do_benchmark) { |
| 4330 int maxrss = getmaxrss() / 1024; | 4334 int maxrss = getmaxrss() / 1024; |
| 4331 printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss); | 4335 printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss); |
| 4332 } | 4336 } |
| 4333 | 4337 |
| 4334 return av_exit(0); | 4338 return av_exit(0); |
| 4335 } | 4339 } |
| OLD | NEW |