matroska | A Rust library for reading Matroska files
kandi X-RAY | matroska Summary
kandi X-RAY | matroska Summary
A Rust library for reading metadata from Matroska files (.mkv, .webm, etc.). This library supports much of the same metadata reported by mkvinfo such as the file’s title, duration, track information, attachments, and so on.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of matroska
matroska Key Features
matroska Examples and Code Snippets
Community Discussions
Trending Discussions on matroska
QUESTION
I'm trying to convert a .ts file with this output to mkv:
...ANSWER
Answered 2021-May-02 at 08:14Try to run with the -ss
flag.
QUESTION
I have ben struggling with this for quite some time; Essentially what I'm trying to do is broadcast my webcam from within the Browser to Ffmpeg on the server to convert into a .m3u8 HLS live stream. But I am having a few problems with video playback I initially thought it was CORS and cross origin headers however now I am thinking its to do with the way I'm trying to encode the media.
I did a ffprobe on the input this was the response;
...ANSWER
Answered 2021-Apr-15 at 21:56FFmpeg 2.8.17 is from 2015 and is way too old. Don't waste your time with this.
QUESTION
I am recording screen capture of my Electron app to a file, as suggested here: Save captured video to file in Electron
It works great, but the file is a “transport stream”. I can play it in Chrome browser, but can’t adjust the time slider.
The suggestion was to use ffmpeg
to post-process the file. The simplest, straight-forward command I found is:
ANSWER
Answered 2021-Mar-25 at 19:11I am fairly sure your FFmpeg processing isn't exactly what you think it is -- with your command line, particularly with absence of certain explicit switches, FFmpeg will transcode your video and audio at its own discretion, which is why your output file is much smaller -- the data have been re-compressed, with potentially loss of quality.
If you just want to generate the index necessary for the kind of seeking most players do, and avoid the undesired transcoding, the following command line will suffice:
QUESTION
I am trying to convert some mkv
videos with hevc
codec to avi
format. For this I run the following command:
ANSWER
Answered 2021-Mar-11 at 14:36AVI is not meant to be used with HEVC.
Use a modern output container format such as MP4, MOV, or MKV.
A workaround is to add the -vtag hvc1
output option.
QUESTION
I'm trying to make a discord music bot, but for some reason, the audio just crashes.
Here's the code:
...ANSWER
Answered 2021-Feb-25 at 02:32Try this out:
QUESTION
In my case I have 3 .webm files the first one is audio only, the second one is video only, the third one is audio and video.
I want to concatenate them into a single file which shows black screen for audio only parts, video for video only parts, and plays both for the parts that have audio and video.
The video codec is VP8, the audio codec is Opus.
concat.txt contains the entries for the three files
I am using the following command to concatenate them.
...ANSWER
Answered 2021-Feb-26 at 02:00All files to be concatenated must have the same attributes and stream order.
Add black video to audio only file:
QUESTION
I'm trying to scale down a webm video with transparency using this line of commands (based off of an answer in this stackoverflow question @ How to keep transparency when scale webm file with ffmpeg):
ffmpeg -c:v libvpx -i in.webm -c:v libvpx -vf scale=400:416 -auto-alt-ref 0 out.webm
but I keep getting errors (for example):
...ANSWER
Answered 2021-Feb-06 at 18:37Use
QUESTION
I have the values 88
40
B0
00
. They are is hex. I don't understand how, but they represent a number of nanoseconds. I need help with understand this document which outlines Matroska and WebM metadata encoding. I am relatively new to this, but I am using JavaScript to alter a file duration. What I am currently using works, but the goal is to know how to set a custom duration of the WebM video file. The document shows the following for the duration parameters:
- Element Name
- Duration
- The level within an EBML tree
- 2
- Element ID displayed as octets
- 0x4489
- Mandatory
- False
- May occur multiple times
- False
- Contained in
- 1
- 2
- 3
- 4
- Available to use in WebM
- True
- Description
- Duration of the Segment in nanoseconds based on TimestampScale
I am using the default time stamp scale (1000000
). My question is how to I get those hex values, and turn them into hours:minutes:seconds:milliseconds
. I simply am stumped :( 0x8840B000
doesn't help me.
ANSWER
Answered 2021-Jan-24 at 06:19Refer to the Stack Overflow question about a TimestampScale Element.
In this question, you are asking about a Duration Element.
The Duration Element you mentioned is made of
- Element ID
44 89
- Element Data Size
88
(a 1-byte Variable-Size Integer indicating 8 bytes of Element Data follow) - Element Data
40 B0 00 00 00 00 00 00
(a big-endian 64-bit float representation of decimal 4096)
In JavaScript, you can convert those 8 bytes to the corresponding float value they represent using code like the following (adapted from an answer to question Convert uint8array to double in javascript)
QUESTION
I know that you are reading this, and I would appreciate a comment if do not have an answer because I feel that I am alone in trying to figure this out.
How Does this Work?I have thoroughly read this document. It mentions an element called TimestampScale. I have downloaded probably thirty WebM example files and seen that the values following the HEX { 0x2AD7B1
or 2A
D7
B1
or ['2A','D7','B1']
} or NON-HEX integers { 42
215
177
or [42, 215, 177]
} are always the same: HEX { 0x830F4240
or 83
0F
42
40
or ['83', '0F', '42', '40']
} or NON-HEX integers { 131
15
66
64
or [131,15,66,64]
}. The values all SHOULD be the default of 1000000
as stated in the Matroska Element Specification. So the question is... How does 0x830F4240
end up as 1000000
?
Incase Above Was Too Sloppy For You or You Want More Explanation:
...ANSWER
Answered 2021-Jan-24 at 04:10The WebM container format is a subset of the Matroska container format.
Matroska is based on EBML (Extensible Binary Meta Language).
An EBML Document is made of Elements.
An Element is made of an Element ID, an Element Data Size, and Element Data.
An Element Data Size is a Variable-Size Integer. (An Element ID is also a Variable-Size Integer.)
A Variable-Size Integer uses the kind of bit patterns shown below, where the leading bits indicate how many bytes are used and the x
bits store the actual value.
- 1-byte:
1xxxxxxx
- 2-byte:
01xxxxxx xxxxxxxx
- 3-byte:
001xxxxx xxxxxxxx xxxxxxxx
- 4-byte:
0001xxxx xxxxxxxx xxxxxxxx xxxxxxxx
and so on
The TimestampScale Element you mentioned is made of
- Element ID
2A D7 B1
- Element Data Size
83
(a 1-byte Variable-Size Integer indicating 3 bytes of Element Data follow) - Element Data
0F 42 40
(a big endian encoding of decimal 1000000)
QUESTION
I'm trying to write a C++ class handling MP4 movies via ffmpeg.
First I created a couple of functions to use with std::unique<>()
so that way things get released even on exceptions.
However, I get a double free when I try to free the BitStreamFilter object, yet the documentation clearly says that each av_bsf_alloc()
must be paired with an av_bsf_free()
call.
@param ctx
a pointer into which the pointer to the newly-allocated context will be written. It must be freed withav_bsf_free()
after the filtering is done.
Note: emphasis mine.
However, at the time I call the avformat_close_input()
I get a double free error, even if I haven't used the two contexts for anything!? I'm thinking that there may be a packet that both allocate and both try to free. But since these two contexts are not directly connected, I really don't understand how they end up freeing something twice.
Below is code which reproduce the error (at least on an amd64 platform). Once compiled, you can just execute it. Make sure to specify a filename as in:
...ANSWER
Answered 2021-Jan-19 at 17:53It's double-freeing the AVCodecParameters*
which you set here:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install matroska
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page