Add remove a newer image attachment of "gif" (#284)

* Add remove a newer image attachment of "gif"

* Increment version

Co-authored-by: supersnellehenk <rick@marojeri.nl>
make-only-subtitle-default
Fish2 4 years ago committed by GitHub
parent 4d8aa2dc0d
commit 75c9ae3e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,8 +5,8 @@ const details = () => ({
Name: 'Migz-Remove image formats from file',
Type: 'Video',
Operation: 'Transcode',
Description: 'Identify any unwanted image formats in the file and remove those streams. MJPEG & PNG \n\n',
Version: '1.3',
Description: 'Identify any unwanted image formats in the file and remove those streams. MJPEG, PNG & GIF \n\n',
Version: '1.4',
Tags: 'pre-processing,ffmpeg,video only',
Inputs: [],
});
@ -42,10 +42,11 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
// Check if stream is video.
if (file.ffProbeData.streams[i].codec_type.toLowerCase() === 'video') {
// Check if stream codec is mjpeg or png. Remove if so.
// Check if stream codec is mjpeg, png or gif. Remove if so.
if (
file.ffProbeData.streams[i].codec_name === 'mjpeg'
|| file.ffProbeData.streams[i].codec_name === 'png'
|| file.ffProbeData.streams[i].codec_name === 'gif'
) {
convert = true;
extraArguments += `-map -v:${videoIdx} `;

Loading…
Cancel
Save