Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6656370b
Commit
6656370b
authored
Apr 29, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: set the "encoder" tag when transcoding
parent
d246231e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
24 deletions
+54
-24
avconv.c
avconv.c
+30
-0
mkv
tests/ref/lavf/mkv
+2
-2
lavf-mkv
tests/ref/seek/lavf-mkv
+22
-22
No files found.
avconv.c
View file @
6656370b
...
...
@@ -1638,6 +1638,34 @@ static void parse_forced_key_frames(char *kf, OutputStream *ost,
}
}
static
void
set_encoder_id
(
OutputFile
*
of
,
OutputStream
*
ost
)
{
AVDictionaryEntry
*
e
;
uint8_t
*
encoder_string
;
int
encoder_string_len
;
int
format_flags
=
0
;
e
=
av_dict_get
(
of
->
opts
,
"fflags"
,
NULL
,
0
);
if
(
e
)
{
const
AVOption
*
o
=
av_opt_find
(
of
->
ctx
,
"fflags"
,
NULL
,
0
,
0
);
if
(
!
o
)
return
;
av_opt_eval_flags
(
of
->
ctx
,
o
,
e
->
value
,
&
format_flags
);
}
encoder_string_len
=
sizeof
(
LIBAVCODEC_IDENT
)
+
strlen
(
ost
->
enc
->
name
)
+
2
;
encoder_string
=
av_mallocz
(
encoder_string_len
);
if
(
!
encoder_string
)
exit_program
(
1
);
if
(
!
(
format_flags
&
AVFMT_FLAG_BITEXACT
))
av_strlcpy
(
encoder_string
,
LIBAVCODEC_IDENT
" "
,
encoder_string_len
);
av_strlcat
(
encoder_string
,
ost
->
enc
->
name
,
encoder_string_len
);
av_dict_set
(
&
ost
->
st
->
metadata
,
"encoder"
,
encoder_string
,
AV_DICT_DONT_STRDUP_VAL
|
AV_DICT_DONT_OVERWRITE
);
}
static
int
transcode_init
(
void
)
{
int
ret
=
0
,
i
,
j
,
k
;
...
...
@@ -1786,6 +1814,8 @@ static int transcode_init(void)
ist
->
decoding_needed
=
1
;
ost
->
encoding_needed
=
1
;
set_encoder_id
(
output_files
[
ost
->
file_index
],
ost
);
/*
* We want CFR output if and only if one of those is true:
* 1) user specified output framerate with -r
...
...
tests/ref/lavf/mkv
View file @
6656370b
753261b6299d2ef36cfba70f6e6fa848
*./tests/data/lavf/lavf.mkv
320
275
./tests/data/lavf/lavf.mkv
48237728e90d74a12d0fe9ae51d23759
*./tests/data/lavf/lavf.mkv
320
389
./tests/data/lavf/lavf.mkv
./tests/data/lavf/lavf.mkv CRC=0xbe7d3cda
tests/ref/seek/lavf-mkv
View file @
6656370b
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
163
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
277
size: 27834
ret: 0 st: 0 flags:0 ts: 0.788000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
163
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
277
size: 27834
ret: 0 st: 0 flags:1 ts:-0.317000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st: 1 flags:0 ts: 2.577000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.471000
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320
004
size: 209
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320
118
size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146
716
size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146
830
size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st: 0 flags:0 ts: 2.153000
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.048000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
163
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
277
size: 27834
ret: 0 st: 1 flags:0 ts:-0.058000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st: 1 flags:1 ts: 2.836000
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320
004
size: 209
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320
118
size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146
716
size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146
830
size: 27925
ret: 0 st: 0 flags:0 ts:-0.482000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st: 0 flags:1 ts: 2.413000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
163
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
277
size: 27834
ret: 0 st: 1 flags:0 ts: 1.307000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 0.201000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
163
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
277
size: 27834
ret: 0 st: 0 flags:0 ts: 0.883000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
163
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292
277
size: 27834
ret: 0 st: 0 flags:1 ts:-0.222000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
ret: 0 st: 1 flags:0 ts: 2.672000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.566000
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320
004
size: 209
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320
118
size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146
716
size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146
830
size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
525
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos:
639
size: 208
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