|
|
|
|
@ -218,16 +218,17 @@ export function getStreamIdsToCopy({ streams, includeAllStreams }) {
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// With these codecs, the player will not give a playback error, but instead only play audio
|
|
|
|
|
// With these codecs, the player will not give a playback error, but instead only play audio,
|
|
|
|
|
// so we will detect these codecs and convert to dummy
|
|
|
|
|
export function doesPlayerSupportFile(streams) {
|
|
|
|
|
const realVideoStreams = getRealVideoStreams(streams);
|
|
|
|
|
// Don't check audio formats, assume all is OK
|
|
|
|
|
// If audio-only format, assume all is OK
|
|
|
|
|
if (realVideoStreams.length === 0) return true;
|
|
|
|
|
// If we have at least one video that is NOT of the unsupported formats, assume the player will be able to play it natively
|
|
|
|
|
// https://github.com/mifi/lossless-cut/issues/595
|
|
|
|
|
// https://github.com/mifi/lossless-cut/issues/975
|
|
|
|
|
// But cover art / thumbnail streams don't count e.g. hevc with a png stream (disposition.attached_pic=1)
|
|
|
|
|
return realVideoStreams.some(s => !['hevc', 'prores', 'mpeg4', 'tscc2'].includes(s.codec_name));
|
|
|
|
|
return realVideoStreams.some(s => !['hevc', 'prores', 'mpeg4', 'tscc2', 'dvvideo'].includes(s.codec_name));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function isAudioDefinitelyNotSupported(streams) {
|
|
|
|
|
|