don't copy dvb_teletext by default

fixes #1343
pull/1361/head
Mikael Finstad 2022-10-20 12:33:55 +02:00
rodzic 7a27daee38
commit b319fce589
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
2 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -58,7 +58,7 @@ import {
getDuration, getTimecodeFromStreams, createChaptersFromSegments, extractSubtitleTrack,
getFfmpegPath, RefuseOverwriteError,
} from './ffmpeg';
import { shouldCopyStreamByDefault, getAudioStreams, getRealVideoStreams, defaultProcessedCodecTypes, isAudioDefinitelyNotSupported, doesPlayerSupportFile } from './util/streams';
import { shouldCopyStreamByDefault, getAudioStreams, getRealVideoStreams, isAudioDefinitelyNotSupported, doesPlayerSupportFile } from './util/streams';
import { exportEdlFile, readEdlFile, saveLlcProject, loadLlcProject, askForEdlImport } from './edlStore';
import { formatYouTube, getFrameCountRaw } from './edlFormats';
import {
@ -785,7 +785,7 @@ const App = memo(() => {
// Streams that are not copy enabled by default
const extraStreams = useMemo(() => mainStreams
.filter((stream) => !defaultProcessedCodecTypes.includes(stream.codec_type)), [mainStreams]);
.filter((stream) => !shouldCopyStreamByDefault(stream)), [mainStreams]);
// Extra streams that the user has not selected for copy
const nonCopiedExtraStreams = useMemo(() => extraStreams

Wyświetl plik

@ -1,11 +1,15 @@
// https://www.ffmpeg.org/doxygen/3.2/libavutil_2utils_8c_source.html#l00079
export const defaultProcessedCodecTypes = [
const defaultProcessedCodecTypes = [
'video',
'audio',
'subtitle',
'attachment',
];
const unprocessableCodecs = [
'dvb_teletext', // ffmpeg doesn't seem to support this https://github.com/mifi/lossless-cut/issues/1343
];
// taken from `ffmpeg -codecs`
export const pcmAudioCodecs = [
'adpcm_4xm',
@ -189,6 +193,7 @@ export function getMapStreamsArgs({ startIndex = 0, outFormat, allFilesMeta, cop
export function shouldCopyStreamByDefault(stream) {
if (!defaultProcessedCodecTypes.includes(stream.codec_type)) return false;
if (unprocessableCodecs.includes(stream.codec_name)) return false;
return true;
}