mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 02:05:54 -07:00
Merge pull request #1 from jshessen/fix-for-ts-and-avi-1
Set genpts to fix unknown timestamp for .ts or .avi
This commit is contained in:
commit
bfc1116bf8
1 changed files with 8 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ const details = () => ({
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
Operation: 'Transcode',
|
Operation: 'Transcode',
|
||||||
Description: 'Files will be remuxed into either mkv or mp4. \n\n',
|
Description: 'Files will be remuxed into either mkv or mp4. \n\n',
|
||||||
Version: '1.1',
|
Version: '1.2',
|
||||||
Tags: 'pre-processing,ffmpeg,video only,configurable',
|
Tags: 'pre-processing,ffmpeg,video only,configurable',
|
||||||
Inputs: [{
|
Inputs: [{
|
||||||
name: 'container',
|
name: 'container',
|
||||||
|
|
@ -80,8 +80,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
|
|
||||||
// Set up required variables.
|
// Set up required variables.
|
||||||
let extraArguments = '';
|
let extraArguments = '';
|
||||||
|
let genpts = '';
|
||||||
let convert = false;
|
let convert = false;
|
||||||
|
|
||||||
|
// If Container .ts or .avi set genpts to fix unknown timestamp
|
||||||
|
if (inputs.container.toLowerCase() === 'ts' || inputs.container.toLowerCase() === 'avi') {
|
||||||
|
genpts = '-fflags +genpts';
|
||||||
|
}
|
||||||
|
|
||||||
// Check if force_conform option is checked.
|
// Check if force_conform option is checked.
|
||||||
// If so then check streams and add any extra parameters required to make file conform with output format.
|
// If so then check streams and add any extra parameters required to make file conform with output format.
|
||||||
if (inputs.force_conform === true) {
|
if (inputs.force_conform === true) {
|
||||||
|
|
@ -136,7 +142,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (convert === true) {
|
if (convert === true) {
|
||||||
response.preset += `, -map 0 -c copy -max_muxing_queue_size 9999 ${extraArguments}`;
|
response.preset += `${genpts}, -map 0 -c copy -max_muxing_queue_size 9999 ${extraArguments}`;
|
||||||
response.processFile = true;
|
response.processFile = true;
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue