Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
b171f76a
Commit
b171f76a
authored
4 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Set mkv metadata
parent
ef1360c5
No related branches found
No related tags found
No related merge requests found
Pipeline
#26483
passed
4 years ago
Stage: all
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/ftl2mkv/src/main.cpp
+5
-0
5 additions, 0 deletions
applications/ftl2mkv/src/main.cpp
components/codecs/include/ftl/codecs/codecs.hpp
+1
-0
1 addition, 0 deletions
components/codecs/include/ftl/codecs/codecs.hpp
with
6 additions
and
0 deletions
applications/ftl2mkv/src/main.cpp
+
5
−
0
View file @
b171f76a
...
...
@@ -52,6 +52,8 @@ static AVStream *add_video_stream(AVFormatContext *oc, const ftl::codecs::Packet
st
->
codecpar
->
format
=
AV_PIX_FMT_NV12
;
st
->
codecpar
->
bit_rate
=
4000000
;
if
(
pkt
.
flags
&
ftl
::
codecs
::
kFlagStereo
)
av_dict_set_int
(
&
st
->
metadata
,
"stereo_mode"
,
1
,
0
);
/* put sample parameters */
//c->bit_rate = 4000000;
/* resolution must be a multiple of two */
...
...
@@ -166,6 +168,9 @@ int main(int argc, char **argv) {
}
av_dump_format
(
oc
,
0
,
"output.mkv"
,
1
);
av_dict_set
(
&
oc
->
metadata
,
"title"
,
"Future Tech Lab Recording"
,
0
);
av_dict_set
(
&
oc
->
metadata
,
"artist"
,
"University of Turku"
,
0
);
if
(
avformat_write_header
(
oc
,
NULL
)
<
0
)
{
LOG
(
ERROR
)
<<
"Failed to write stream header"
;
}
...
...
This diff is collapsed.
Click to expand it.
components/codecs/include/ftl/codecs/codecs.hpp
+
1
−
0
View file @
b171f76a
...
...
@@ -19,6 +19,7 @@ static constexpr uint8_t kFlagFlipRGB = 0x01; // Swap blue and red channels [de
static
constexpr
uint8_t
kFlagMappedDepth
=
0x02
;
// Use Yuv mapping for float [deprecated]
static
constexpr
uint8_t
kFlagFloat
=
0x04
;
// Floating point output
static
constexpr
uint8_t
kFlagPartial
=
0x10
;
// This frameset is not complete
static
constexpr
uint8_t
kFlagStereo
=
0x20
;
// Left-Right stereo in single channel
static
constexpr
uint8_t
kFlagMultiple
=
0x80
;
// Multiple video frames in single packet
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment