Skip to content

Commit d380e31

Browse files
authored
v1.1.7
1 parent 3ca6d43 commit d380e31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+8534
-0
lines changed

src/args/audioargs.cpp

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Sets the sample rate for an audio stream.
5+
/// </summary>
6+
/// <param name="rate">The sample rate of the audio.</param>
7+
/// <returns>String representation of the argument.</returns>
8+
QString Argument::audioRate(QString rate, QString stream) {
9+
return(QString("-ar:%1 %2").arg(stream).arg(rate));
10+
}
11+
12+
/// <summary>
13+
/// Sets the metadata for audio streams.
14+
/// </summary>
15+
/// <param name="stream">Stream number</param>
16+
/// <returns>String representation of the argument.</returns>
17+
QString Argument::audioMetadata(QString stream) {
18+
return(QString("-metadata:s:a:%1").arg(stream));
19+
}
20+
21+
/// <summary>
22+
/// Sets the audio title for a specific audio stream.
23+
/// </summary>
24+
/// <param name="stream">The stream file specifier.</param>
25+
/// <param name="title">The contents to be added to the title.</param>
26+
/// <returns>String representation of the argument.</returns>
27+
QString Argument::audioTitle(QString title) {
28+
return(QString("title=\"%2\"").arg(title));
29+
}
30+
31+
/// <summary>
32+
/// Sets the audio language for a specific audio stream.
33+
/// </summary>
34+
/// <param name="stream">The stream file specifier.</param>
35+
/// <param name="lang">The language.</param>
36+
/// <returns>String representation of the argument.</returns>
37+
QString Argument::audioLang(QString lang) {
38+
return(QString("language=%2").arg(lang));
39+
}
40+
41+
/// <summary>
42+
/// Sets the number of channels in the audio stream.
43+
/// </summary>
44+
/// <param name="channels">The number of audio channels</param>
45+
/// <returns>String representation of the argument.</returns>
46+
QString Argument::audioChannels(QString channels, QString stream) {
47+
return(QString("-ac:%1 %2").arg(stream).arg(channels));
48+
}
49+
50+
/// <summary>
51+
/// Set the number of audio channels to be processed in.
52+
/// </summary>
53+
/// <param name="channels">The number of channels.</param>
54+
/// <returns>String representation of the argument.</returns>
55+
QString Argument::downMix(double channels) {
56+
return(QString("-ac %1").arg(channels));
57+
}

src/args/bitrate.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Sets the bitrate for the video.
5+
/// </summary>
6+
/// <param name="bitrate">The bitrate value.</param>
7+
/// <returns>String representation of the argument.</returns>
8+
QString Argument::videoBitrate(int bitrate) {
9+
return(QString("-b:v %1k").arg(bitrate));
10+
}
11+
12+
/// <summary>
13+
/// Sets the bitrate for the audio.
14+
/// </summary>
15+
/// <param name="bitrate">The bitrate value.</param>
16+
/// <returns>String representation of the argument.</returns>
17+
QString Argument::audioBitrate(int bitrate, QString stream) {
18+
return(QString("-b:a:%1 %2k").arg(stream).arg(bitrate));
19+
}
20+
21+
/// <summary>
22+
/// Sets the quality factor for VP9.
23+
/// </summary>
24+
/// <param name="quality"></param>
25+
/// <returns>String representation of the argument.</returns>
26+
QString Argument::vp9Quality(QString quality) {
27+
return(QString("-quality %1").arg(quality));
28+
}
29+
30+
/// <summary>
31+
///
32+
/// </summary>
33+
/// <param name="bitrate"></param>
34+
/// <returns></returns>
35+
QString Argument::buffer(int bitrate) {
36+
return(QString("vbv-bufsize=%1:vbv-maxrate=%2").arg(bitrate * 2).arg(bitrate + 2000));
37+
}

src/args/chapters.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Disables video chapters.
5+
/// </summary>
6+
/// <returns>String representation of the argument.</returns>
7+
QString Argument::mapChapters() {
8+
return(QString("-map_chapters -1"));
9+
}

src/args/codec.cpp

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Creates an argument for the video codec.
5+
/// </summary>
6+
/// <param name="codec">The video codec to use.</param>
7+
/// <returns>String representation of the argument.</returns>
8+
QString Argument::videoCodec(QString codec) {
9+
return(QString("-c:v %1").arg(codec));
10+
}
11+
12+
/// <summary>
13+
/// Creates an argument for the audio codec.
14+
/// </summary>
15+
/// <param name="codec">The audio codec to use.</param>
16+
/// <returns>String representation of the argument.</returns>
17+
QString Argument::audioCodec(QString codec) {
18+
return(QString("-c:a %1").arg(codec));
19+
}
20+
21+
/// <summary>
22+
/// Creates an argument for the subtitle codec.
23+
/// </summary>
24+
/// <param name="codec">The subtitle codec to use.</param>
25+
/// <returns>String representation of the argument.</returns>
26+
QString Argument::subtitleCodec(QString codec) {
27+
return(QString("-c:s %1").arg(codec));
28+
}
29+
30+
/// <summary>
31+
/// Verbatim to AudioCodec, but adds stream specifier.
32+
/// </summary>
33+
/// <param name="codec">The codec to use.</param>
34+
/// <param name="stream">The stream number to use.</param>
35+
/// <returns>String representation of the argument.</returns>
36+
QString Argument::audioCodecMulti(QString codec, QString stream) {
37+
return(QString("-c:a:%1 %2").arg(stream).arg(codec));
38+
}
39+
40+
/// <summary>
41+
/// Enables the x265 additional parameters.
42+
/// </summary>
43+
/// <returns>String representation of the argument.</returns>
44+
QString Argument::x265Params() {
45+
return(QString("-x265-params"));
46+
}
47+
48+
/// <summary>
49+
/// Limits the threads for an encoding task.
50+
/// </summary>
51+
/// <param name="threads">The number of threads to utilize.</param>
52+
/// <returns>String representation of the argument.</returns>
53+
QString Argument::threads(int threads) {
54+
return(QString("-threads %1").arg(threads));
55+
}

src/args/colorsargs.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// ProRes colors video usablility information.
5+
/// </summary>
6+
/// <param name="matrix">The color matrix to use.</param>
7+
/// <param name="transfer">The color transfer to use.</param>
8+
/// <param name="primaries">The color primaries to use.</param>
9+
/// <returns>String representation of the argument.</returns>
10+
QString Argument::colors(QString matrix, QString transfer, QString primaries) {
11+
return(QString("-bsf:v prores_metadata=colorspace=%1:color_trc=%2:color_primaries=%3").arg(matrix).arg(transfer).arg(primaries));
12+
}
13+
14+
/// <summary>
15+
/// The pixel format for the video to be processed in.
16+
/// </summary>
17+
/// <param name="format">The pixel format to use.</param>
18+
/// <returns>String representation of the argument.</returns>
19+
QString Argument::pixelFormat(QString format) {
20+
return(QString("-pix_fmt %1").arg(format));
21+
}

src/args/entropy.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// x264 entropy coder.
5+
/// </summary>
6+
/// <param name="coder">The coder (index) to use.</param>
7+
/// <returns>String representation of the argument.</returns>
8+
QString Argument::entropyCoding(int coder) {
9+
return(QString("-coder %1").arg(coder));
10+
}

src/args/frame.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Sets the number of B frames.
5+
/// </summary>
6+
/// <param name="bFrame">The number of B frames to use.</param>
7+
/// <returns>String representation of the argument.</returns>
8+
QString Argument::bFrame(int bFrame) {
9+
return(QString("-bf %1").arg(bFrame));
10+
}
11+
12+
/// <summary>
13+
/// Sets the number of reference frames.
14+
/// </summary>
15+
/// <param name="refFrame">The number of reference frames to use.</param>
16+
/// <returns>String representation of the argument.</returns>
17+
QString Argument::referenceFrame(int refFrame) {
18+
return(QString("-refs %1").arg(refFrame));
19+
}

src/args/hdr.cpp

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Enables HDR10 for x265.
5+
/// </summary>
6+
/// <returns>String representation of the argument.</returns>
7+
QString Argument::hdr10Opt() {
8+
return(QString("hdr-opt=1:repeat-headers=1"));
9+
}
10+
11+
/// <summary>
12+
/// Adds the master display info for HDR10.
13+
/// </summary>
14+
/// <param name="display">The master display parameters.</param>
15+
/// <returns>String representation of the argument.</returns>
16+
QString Argument::masterDisplay(QString display) {
17+
return(QString("master-display=%1").arg(display));
18+
}
19+
20+
/// <summary>
21+
/// Sets the color video usability info for HDR10.
22+
/// </summary>
23+
/// <param name="matrix">The color matrix to use.</param>
24+
/// <param name="transfer">The color transfer to use.</param>
25+
/// <param name="primaries">The color primaries to use.</param>
26+
/// <param name="range">The color range to use.</param>
27+
/// <returns>String representation of the argument.</returns>
28+
QString Argument::colors(QString matrix, QString transfer, QString primaries, QString range) {
29+
return(QString("colormatrix=%1:transfer=%2:colorprim=%3:range=%4").arg(matrix).arg(transfer).arg(primaries).arg(range));
30+
}
31+
32+
/// <summary>
33+
/// Set the maximum/minimum light content level for HDR10.
34+
/// </summary>
35+
/// <param name="cll">Maximum luminance.</param>
36+
/// <param name="fall">Minimum luminance.</param>
37+
/// <returns>String representation of the argument.</returns>
38+
QString Argument::maxCllFall(int cll, int fall) {
39+
return(QString("max-cll=%1,%2").arg(cll).arg(fall));
40+
}
41+
42+
/// <summary>
43+
/// Adds HDR10+ dynamic metadata.
44+
/// </summary>
45+
/// <param name="path">The path to the metadata file.</param>
46+
/// <returns>String representation of the argument.</returns>
47+
QString Argument::hdrPlus(QString path) {
48+
return(QString("dhdr10-info='%1'").arg(path));
49+
}
50+
51+
/// <summary>
52+
/// Sets the profile for Dolby Vision metadata.
53+
/// </summary>
54+
/// <param name="profile">The profile number.</param>
55+
/// <returns>String representation of the argument.</returns>
56+
QString Argument::dbVisionProfile(QString profile) {
57+
return(QString("dolby-vision-profile=%1").arg(profile));
58+
}
59+
60+
/// <summary>
61+
/// Sets the RPU path for Dolby Vision metadata.
62+
/// </summary>
63+
/// <param name="path">The path to the RPU.</param>
64+
/// <returns>String representation of the argument.</returns>
65+
QString Argument::dbVisionRPU(QString path) {
66+
return(QString("dolby-vision-rpu='%1'").arg(path));
67+
}

src/args/map.cpp

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#include "args.hpp"
2+
3+
/// <summary>
4+
/// Maps a stream to a media file.
5+
/// </summary>
6+
/// <param name="type">The stream type.</param>
7+
/// <param name="s1">Stream 1 selection.</param>
8+
/// <param name="s2">Stream 2 selection.</param>
9+
/// <returns>String representation of the argument.</returns>
10+
QString Argument::mapVideo(QString type, QString s1, int s2) {
11+
return(QString("-map %1:%2:%3").arg(s1).arg(type).arg(s2));
12+
}
13+
14+
/// <summary>
15+
/// Maps a stream to a media file.
16+
/// </summary>
17+
/// <param name="type">The type of stream.</param>
18+
/// <param name="s1">Stream specifier.</param>
19+
/// <returns>String representation of argument.</returns>
20+
QString Argument::mapMux(QString type, int s1) {
21+
return(QString("-map %1:%2").arg(type).arg(s1));
22+
}
23+
24+
/// <summary>
25+
/// Maps a stream type.
26+
/// </summary>
27+
/// <param name="type">The type of stream.</param>
28+
/// <returns>String representation of the argument.</returns>
29+
QString Argument::mapSingle(QString type) {
30+
return(QString("-map %1").arg(type));
31+
}
32+
33+
/// <summary>
34+
/// Maps all of a particular stream in a video container.
35+
/// </summary>
36+
/// <param name="type">The stream type to target.</param>
37+
/// <param name="s1">Stream one identifier.</param>
38+
/// <returns>String representation of the argument.</returns>
39+
QString Argument::mapAll(QString type, QString s1) {
40+
return(QString("-map %1:%2").arg(s1).arg(type));
41+
}

0 commit comments

Comments
 (0)