Commit ab2cc101 authored by Stefan Westerfeld's avatar Stefan Westerfeld

videowmark: print correct input/output filename instead of /dev/fd/*

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent e21ccaff
......@@ -272,6 +272,14 @@ parse_options (int *argc_p,
Params::raw_input_format.set_sample_rate (r);
Params::raw_output_format.set_sample_rate (r);
}
else if (check_arg (argc, argv, &i, "--set-input-label", &opt_arg))
{
Params::input_label = opt_arg;
}
else if (check_arg (argc, argv, &i, "--set-output-label", &opt_arg))
{
Params::output_label = opt_arg;
}
else if (check_arg (argc, argv, &i, "--quiet")
|| check_arg (argc, argv, &i, "-q"))
{
......
......@@ -88,7 +88,8 @@ function add_watermark
ffmpeg $FFMPEG_VERBOSE -y -i "$in_file" -f wav "$orig_wav" || die "extracting audio from video failed (ffmpeg)"
# watermark
[ -z "$QUIET" ] && echo >&2 "Audio Codec: $(audio_encode_options "$in_file")"
audiowmark "${AUDIOWMARK_ARGS[@]}" add "$orig_wav" "$wm_wav" "$bits" || die "watermark generation failed (audiowmark)"
audiowmark "${AUDIOWMARK_ARGS[@]}" add "$orig_wav" "$wm_wav" "$bits" \
--set-input-label "$in_file" --set-output-label "$out_file" || die "watermark generation failed (audiowmark)"
# rejoin
ffmpeg $FFMPEG_VERBOSE -y -i "$in_file" -i "$wm_wav" -c:v copy $(audio_encode_options "$in_file") -map 0:v:0 -map 1:a:0 "$out_file" || \
die "merging video and watermarked audio failed (ffmpeg)"
......
......@@ -582,10 +582,10 @@ add_watermark (const string& infile, const string& outfile, const string& bits)
}
/* write some informational messages */
info ("Input: %s\n", infile.c_str());
info ("Input: %s\n", Params::input_label.size() ? Params::input_label.c_str() : infile.c_str());
if (Params::input_format == Format::RAW)
info_format ("Raw Input", Params::raw_input_format);
info ("Output: %s\n", outfile.c_str());
info ("Output: %s\n", Params::output_label.size() ? Params::output_label.c_str() : outfile.c_str());
if (Params::output_format == Format::RAW)
info_format ("Raw Output", Params::raw_output_format);
info ("Message: %s\n", bit_vec_to_str (bitvec).c_str());
......
......@@ -19,6 +19,9 @@ Format Params::output_format = Format::AUTO;
RawFormat Params::raw_input_format;
RawFormat Params::raw_output_format;
std::string Params::input_label;
std::string Params::output_label;
using std::vector;
using std::complex;
......
......@@ -50,6 +50,10 @@ public:
static RawFormat raw_input_format;
static RawFormat raw_output_format;
// input/output labels can be set for pretty output for videowmark add
static std::string input_label;
static std::string output_label;
};
typedef std::array<int, 30> UpDownArray;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment