Revision 4ff8fcef ffmpeg.c

View differences:

ffmpeg.c
163 163
static int subtitle_codec_id = CODEC_ID_NONE;
164 164
static char *subtitle_language = NULL;
165 165

  
166
static int mux_packet_size= 0;
167 166
static float mux_preload= 0.5;
168 167
static float mux_max_delay= 0.7;
169 168

  
......
3315 3314
        exit(1);
3316 3315
    }
3317 3316

  
3318
    oc->packet_size= mux_packet_size;
3319 3317
    oc->preload= (int)(mux_preload*AV_TIME_BASE);
3320 3318
    oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE);
3321 3319
    oc->loop_output = loop_output;
......
3706 3704
        audio_bit_rate = 224000;
3707 3705
        audio_sample_rate = 44100;
3708 3706

  
3709
        mux_packet_size= 2324;
3707
        opt_default("packetsize", "2324");
3710 3708
        opt_default("muxrate", "1411200"); // 2352 * 75 * 8;
3711 3709

  
3712 3710
        /* We have to offset the PTS, so that it is consistent with the SCR.
......
3735 3733
        audio_bit_rate = 224000;
3736 3734
        audio_sample_rate = 44100;
3737 3735

  
3738
        mux_packet_size= 2324;
3736
        opt_default("packetsize", "2324");
3739 3737

  
3740 3738
    } else if(!strcmp(arg, "dvd")) {
3741 3739

  
......
3752 3750
        opt_default("minrate", "0"); //1500000;
3753 3751
        opt_default("bufsize", "1835008"); //224*1024*8;
3754 3752

  
3755
        mux_packet_size= 2048;  // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack.
3753
        opt_default("packetsize", "2048");  // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack.
3756 3754
        opt_default("muxrate", "10080000"); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8
3757 3755

  
3758 3756
        audio_bit_rate = 448000;
......
3978 3976
    { "gd", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_GRAB, {(void*)opt_grab_device}, "set grab device", "device" },
3979 3977

  
3980 3978
    /* muxer options */
3981
    { "packetsize", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&mux_packet_size}, "set packet size", "size" },
3982 3979
    { "muxdelay", OPT_FLOAT | HAS_ARG | OPT_EXPERT, {(void*)&mux_max_delay}, "set the maximum demux-decode delay", "seconds" },
3983 3980
    { "muxpreload", OPT_FLOAT | HAS_ARG | OPT_EXPERT, {(void*)&mux_preload}, "set the initial demux-decode delay", "seconds" },
3984 3981

  

Also available in: Unified diff