diff options
author | kmkaplan <kmkaplan@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-26 16:32:06 +0000 |
---|---|---|
committer | kmkaplan <kmkaplan@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-26 16:32:06 +0000 |
commit | 875f1a63118e15ee5493280ee7f515b63941117f (patch) | |
tree | dbfba82f6badcbd2d922f1be9f5927454d96a9e4 | |
parent | 6232ad450b1c7281f0b658dae1524ea3ef6a1310 (diff) | |
download | mpv-875f1a63118e15ee5493280ee7f515b63941117f.tar.bz2 mpv-875f1a63118e15ee5493280ee7f515b63941117f.tar.xz |
Add -nosound/-sound and -ovc null to mencoder.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4356 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | cfg-common.h | 2 | ||||
-rw-r--r-- | cfg-mencoder.h | 3 | ||||
-rw-r--r-- | cfg-mplayer.h | 2 | ||||
-rw-r--r-- | mencoder.c | 21 |
4 files changed, 23 insertions, 5 deletions
diff --git a/cfg-common.h b/cfg-common.h index 1c47869f5d..51d48ea5f7 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -60,6 +60,8 @@ #ifdef USE_FAKE_MONO {"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL}, #endif + {"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 16, NULL}, // keep ranges in sync {"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 14, NULL}, // with codec-cfg.c diff --git a/cfg-mencoder.h b/cfg-mencoder.h index 0afaaff25b..802f22e901 100644 --- a/cfg-mencoder.h +++ b/cfg-mencoder.h @@ -71,7 +71,8 @@ struct config ovc_conf[]={ {"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL}, {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL}, {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL}, - {"help", "\nAvailable codecs:\n copy\n frameno\n divx4\n raw\n lavc\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL}, + {"help", "\nAvailable codecs:\n copy\n frameno\n divx4\n raw\n lavc\n null\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; diff --git a/cfg-mplayer.h b/cfg-mplayer.h index fb8ac9a0f0..a5c640c690 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -184,8 +184,6 @@ static config_t mplayer_opts[]={ {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"noloop", &loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL}, {"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000, NULL}, - {"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - {"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"abs", &ao_data.buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL}, diff --git a/mencoder.c b/mencoder.c index f2880b85b5..2f42f266b6 100644 --- a/mencoder.c +++ b/mencoder.c @@ -4,6 +4,7 @@ #define VCODEC_DIVX4 2 #define VCODEC_RAW 3 #define VCODEC_LIBAVCODEC 4 +#define VCODEC_NULL 5 #define ACODEC_COPY 0 #define ACODEC_PCM 1 @@ -96,6 +97,7 @@ int audio_id=-1; int video_id=-1; int dvdsub_id=-1; +static int has_audio=1; char *audio_codec=NULL; // override audio codec char *video_codec=NULL; // override video codec int audio_family=-1; // override audio codec family @@ -419,6 +421,8 @@ divx4_param.rc_reaction_ratio = 20; } #endif + if(!has_audio) audio_id=-2; /* do NOT read audio packets... */ + //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id); demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id); if(!demuxer){ @@ -657,6 +661,16 @@ case VCODEC_FRAMENO: mux_v->bih->biCompression=mmioFOURCC('F','r','N','o'); mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8); break; +case VCODEC_NULL: + mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)); + mux_v->bih->biSize=sizeof(BITMAPINFOHEADER); + mux_v->bih->biWidth=vo_w; + mux_v->bih->biHeight=vo_h; + mux_v->bih->biPlanes=1; + mux_v->bih->biBitCount=24; + mux_v->bih->biCompression=0; + mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8); + break; case VCODEC_DIVX4: #ifndef HAVE_DIVX4ENCORE printf("No support for Divx4 encore compiled in\n"); @@ -784,6 +798,7 @@ aviwrite_write_header(muxer,muxer_f); switch(mux_v->codec){ case VCODEC_COPY: case VCODEC_RAW: +case VCODEC_NULL: break; case VCODEC_FRAMENO: decoded_frameno=0; @@ -1299,6 +1314,8 @@ if(sh_audio){ AV_delay, c_total, v_pts_corr ); } +else + printf("V:%6.1f \r", d_video->pts ); #if 0 mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d/%3d %2d%% %2d%% %4.1f%% %d%%\r", @@ -1340,8 +1357,8 @@ fseek(muxer_f,0,SEEK_SET); aviwrite_write_header(muxer,muxer_f); // update header fclose(muxer_f); -printf("\nVideo stream: %8.3f kbit/s (%d bps) size: %d bytes %5.3f secs\n", - (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), mux_v->size, (float)mux_v->timer); +printf("\nVideo stream: %8.3f kbit/s (%d bps) size: %d bytes %5.3f secs %d frames\n", + (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), mux_v->size, (float)mux_v->timer, decoded_frameno); if(sh_audio) printf("\nAudio stream: %8.3f kbit/s (%d bps) size: %d bytes %5.3f secs\n", (float)(mux_a->size/mux_a->timer*8.0f/1000.0f), (int)(mux_a->size/mux_a->timer), mux_a->size, (float)mux_a->timer); |