Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
ab2cc101
Commit
ab2cc101
authored
Apr 08, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videowmark: print correct input/output filename instead of /dev/fd/*
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
e21ccaff
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
3 deletions
+19
-3
audiowmark.cc
src/audiowmark.cc
+8
-0
videowmark
src/videowmark
+2
-1
wmadd.cc
src/wmadd.cc
+2
-2
wmcommon.cc
src/wmcommon.cc
+3
-0
wmcommon.hh
src/wmcommon.hh
+4
-0
No files found.
src/audiowmark.cc
View file @
ab2cc101
...
...
@@ -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"
))
{
...
...
src/videowmark
View file @
ab2cc101
...
...
@@ -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)"
...
...
src/wmadd.cc
View file @
ab2cc101
...
...
@@ -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
());
...
...
src/wmcommon.cc
View file @
ab2cc101
...
...
@@ -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
;
...
...
src/wmcommon.hh
View file @
ab2cc101
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment