Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of the bmp image format to the list of images to remove #773

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Community/Tdarr_Plugin_MC93_MigzImageRemoval.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 & GIF \n\n',
Version: '1.4',
Description: 'Identify any unwanted image formats in the file and remove those streams. MJPEG, BMP, PNG & GIF \n\n',
Version: '1.5',
Tags: 'pre-processing,ffmpeg,video only',
Inputs: [],
});
Expand Down Expand Up @@ -42,11 +42,12 @@ 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, png or gif. Remove if so.
// Check if stream codec is mjpeg, bmp, 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'
|| file.ffProbeData.streams[i].codec_name === 'bmp'
) {
convert = true;
extraArguments += `-map -v:${videoIdx} `;
Expand Down