Skip to content
Snippets Groups Projects
ffmpeg.c 145 KiB
Newer Older
  • Learn to ignore specific revisions
  •     for(i=0; i<CODEC_TYPE_NB; i++){
    
            avcodec_opts[i]= avcodec_alloc_context2(i);
    
        avformat_opts = avformat_alloc_context();
    
        sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
    
    
    
        /* parse options */
        parse_options(argc, argv, options, opt_output_file);
    
    
        if(nb_output_files <= 0 && nb_input_files == 0) {
            show_usage();
            fprintf(stderr, "Use -h to get full help or, even better, run 'man ffmpeg'\n");
            av_exit(1);
        }
    
        /* file converter / grab */
        if (nb_output_files <= 0) {
    
            fprintf(stderr, "At least one output file must be specified\n");
    
        }
    
        if (nb_input_files == 0) {
    
            fprintf(stderr, "At least one input file must be specified\n");
    
        }
    
        ti = getutime();
    
        if (av_encode(output_files, nb_output_files, input_files, nb_input_files,
                      stream_maps, nb_stream_maps) < 0)
            av_exit(1);
    
        ti = getutime() - ti;
        if (do_benchmark) {
            printf("bench: utime=%0.3fs\n", ti / 1000000.0);
        }