Closed kodxana closed 1 year ago
Need some more info to try and figure out what is causing this issue.
As a workaround, you may be able to avoid transcoding by changing the downloaded video container from MKV to MP4. This is doneby going to the job settings, and modifying the format code to bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4
. Under the advanced options, you would also need to remove --merge-output-format mkv
. Please note this might cause issues when downloading videos from a site which does not provide MP4 files, and that it only applies to new downloads
Are any of the videos 'flv' files? The utilities to transcode those videos aren't in the docker image by default.
If you still are running into transcoding issues since updating to version 1.1.1, would it be possible for you to add some extra logging to the transcoder? This involves modifying some of the code. This can be done with a one-liner in the shell, or manually if you prefer.
Both methods are provided below:
Instructions:
sed -i '/ ffmpeg(videoPath)/a .on('\''stderr'\'', function(stderrLine) {console.log('\''FFMPEG stderr: '\'' + stderrLine);}).on('\''error'\'', function(err, stdout, stderr) {console.log('\''FFMPEG cannot process video: '\'' + err.message);}).on('\''end'\'', function(stdout, stderr) {console.log('\''FFMPEG transcoding completed.'\'');})' /opt/youtube-dl-react-viewer/youtube-dl-express-backend/index.js
OR
Change the following lines in youtube-dl-express-backend/index.js
:
https://github.com/graham-walker/youtube-dl-react-viewer/blob/3c51b6d86db53459fbd3b5411aebe68cf3696f9a/youtube-dl-express-backend/index.js#L59-L66
to this
// Transcode videos
app.use('/transcoded/videos', globalPasswordMiddleware, (req, res) => {
res.contentType('webm');
const videoPath = path.join(outputDirectory, 'videos', decodeURIComponent(req.path));
ffmpeg(videoPath)
.on('stderr', function(stderrLine) {console.log('Stderr output: ' + stderrLine);})
.on('error', function(err, stdout, stderr) {console.log('Cannot process video: ' + err.message);})
.on('end', function(stdout, stderr) {console.log('Transcoding succeeded !');})
.format('webm')
.pipe(res, { end: true });
});
Transcoding is no longer a supported feature, please use the open in VLC button or recoding option instead.
When I try playback video downloaded I get unknown format error when I enable trans-coding I get this error in console.