diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-09-22 05:17:42 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-09-22 05:17:42 +0200 |
commit | 00902a0ef808048f6d839723090e477b15a2d9e9 (patch) | |
tree | 997a6f049d67cda6dc52b5fbe81bfc5c206d8872 /src/options.c | |
parent | fixed wrong type for textoverlay parameters (diff) |
recording with different codecs works now
Signed-off-by: Christian Pointner <equinox@spreadspace.org>
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/options.c b/src/options.c index 7789456..ac3909c 100644 --- a/src/options.c +++ b/src/options.c @@ -214,8 +214,10 @@ int options_parse(options_t* opt, int argc, char* argv[]) PARSE_STRING_PARAM("-o","--rtp-host", opt->rtp_host_) PARSE_INT_PARAM("-O","--rtp-port-base", opt->rtp_port_base_, 10) PARSE_STRING_PARAM("-V","--videosink", opt->preview_videosink_) - PARSE_STRING_PARAM("-m","--rec-mux", opt->rec_mux_) - PARSE_STRING_PARAM("-r","--rec-name-format", opt->rec_name_format_) + PARSE_STRING_PARAM("-rv","--rec-video-encoder", opt->video_enc_rec_) + PARSE_STRING_PARAM("-ra","--rec-audio-encoder", opt->audio_enc_rec_) + PARSE_STRING_PARAM("-rm","--rec-mux", opt->rec_mux_) + PARSE_STRING_PARAM("-R","--rec-name-format", opt->rec_name_format_) else return i; } @@ -271,6 +273,8 @@ void options_default(options_t* opt) opt->preview_videosink_ = NULL; + opt->video_enc_rec_ = NULL; + opt->audio_enc_rec_ = strdup("audioconvert ! vorbisenc bitrate=96000"); opt->rec_mux_ = strdup("matroskamux"); opt->rec_name_format_ = strdup("./recordings/%Y-%m-%d_%H-%M-%S.mkv"); } @@ -309,6 +313,10 @@ void options_clear(options_t* opt) free(opt->rtp_host_); if(opt->preview_videosink_) free(opt->preview_videosink_); + if(opt->video_enc_rec_) + free(opt->video_enc_rec_); + if(opt->audio_enc_rec_) + free(opt->audio_enc_rec_); if(opt->rec_mux_) free(opt->rec_mux_); if(opt->rec_name_format_) @@ -330,15 +338,17 @@ void options_print_usage() printf(" [-U|--debug] don't daemonize and log to stdout with maximum log level\n"); printf(" [-n|--appname] <name> set the application name (will be used by xvimagesink for window title)\n"); printf(" [-vs|--video-source pipeline for raw video (i.e. videotestsrc)\n"); - printf(" [-ve|--video-encoder pipeline for video encoder (stream and recording)\n"); + printf(" [-ve|--video-encoder pipeline for video encoder (stream)\n"); printf(" [-vp|--video-payloader video payloader element (i.e. rtpvp8pay)\n"); printf(" [-as|--audio-source pipeline for raw audio (audiotestsrc)\n"); - printf(" [-ae|--audio-encoder pipeline for audio encoder (stream only)\n"); + printf(" [-ae|--audio-encoder pipeline for audio encoder (stream)\n"); printf(" [-ap|--audio-payloader audio payloader element (i.e. rptopuspay)\n"); printf(" [-o|--rtp-host remote host for RTP packets\n"); printf(" [-O|--rtp-port-base base number for remote ports\n"); printf(" [-V|--videosink video sink element for local preview (i.e. xvimagesink) - leave empty to disable preview\n"); - printf(" [-m|--rec-mux muxer elemenent (i.e. matroskamux)\n"); + printf(" [-rv|--rec-video-encoder pipeline for video encoder (recording - leave empty for same as stream)\n"); + printf(" [-ra|--rec-audio-encoder pipeline for audio encoder (recording - leave empty for same as stream)\n"); + printf(" [-rm|--rec-mux muxer elemenent (i.e. matroskamux)\n"); printf(" [-r|--rec-name-format] <format> the recording file name format, see manpage of strftime for the syntax\n"); } @@ -372,6 +382,8 @@ void options_print(options_t* opt) printf(" rtp_host: >>%s<<\n", opt->rtp_host_); printf(" rtp_port_base: %d\n", opt->rtp_port_base_); printf(" preview_video_sink: >>%s<<\n", opt->preview_videosink_); + printf(" video_enc_rec: >>%s<<\n", opt->video_enc_rec_); + printf(" audio_enc_rec: >>%s<<\n", opt->audio_enc_rec_); printf(" rec_mux: >>%s<<\n", opt->rec_mux_); printf(" rec_name_format: '%s'\n", opt->rec_name_format_); } |