Checklist
Affected version
0.28.0
Steps to reproduce the bug
See #11601. The downloader is unable to combine/mux two segmented MP4 files and will generate a file with only audio and with strange intermittent silences. ffmpeg can combine the two files without issues. These two PeerTube videos are examples: https://peertube.qontinuum.space/w/k2wKrFgGpoSSrGTCkkjoLC https://video.blast-info.fr/w/87GhAwHborpk5Kym1eqZ6m . To make the download dialog provide the option to download video+audio, change the following in SecondaryStreamHelper:
Things to change to reproduce the problem
Turn this:
} else if (mediaFormat == MediaFormat.MPEG_4) {
return audioStreams
.stream()
.filter(audioStream -> audioStream.getFormat() == MediaFormat.M4A)
.max(ListHelper.getAudioFormatComparator(MediaFormat.M4A,
ListHelper.isLimitingDataUsage(context)))
.orElse(null);
into this:
} else if (mediaFormat == MediaFormat.MPEG_4) {
return audioStreams
.stream()
.filter(audioStream -> audioStream.getFormat() == MediaFormat.M4A
|| audioStream.getFormat() == MediaFormat.MPEG_4)
.max(ListHelper.getAudioFormatComparator(MediaFormat.M4A,
ListHelper.isLimitingDataUsage(context)))
.orElse(null);
It would be good if someone who has some experience with the MP4 format (standard ISO/IEC 14496-12) could work on this.
Checklist
Affected version
0.28.0
Steps to reproduce the bug
See #11601. The downloader is unable to combine/mux two segmented MP4 files and will generate a file with only audio and with strange intermittent silences.
ffmpegcan combine the two files without issues. These two PeerTube videos are examples: https://peertube.qontinuum.space/w/k2wKrFgGpoSSrGTCkkjoLC https://video.blast-info.fr/w/87GhAwHborpk5Kym1eqZ6m . To make the download dialog provide the option to download video+audio, change the following inSecondaryStreamHelper:Things to change to reproduce the problem
Turn this:
into this:
It would be good if someone who has some experience with the MP4 format (standard ISO/IEC 14496-12) could work on this.