Closed klenium closed 4 years ago
Yes, the resulting video should have an audio track. Any errors in the ffmpeg output from the point youtube-dl is invoked? Look at the log before all the crypto+https
lines start polluting it.
Oh sorry, my bad.
To explain the case: The download is divided into two phases: video then audio downloading. The first phase prints the status of ffmpeg to the console so I knew there was something happening. After the video downloading ended, it printed something like "[100%] Downloading done", so yeah I thought it finished, but the 2nd phase just started. I didn't noticed the URL was different, ffmpeg didn't print anything (that is well visible), and since I could start playing the video, I thought everything was fine (since I'm deaf, didn't noticed the audio was missing), and further "Opening
So now I just have to wait a bit more, the script should finish running. I've looked at the source code, I don't think you can do much with this. Maybe add a note to README, we should be patient, and the "downloading done" message doesn't mean everything is done.
I'm facing a similar issue here, but in this case, the audio fragments are not being downloaded, resulting in the following errors:
Error when loading first segment [...]: Invalid data found when processing input
and then: ERROR: ffmpeg exited with code 1 Unhandled error! Timeout or fatal error, please check your downloads and try again if necessary
I've tried downloading the fragment just by accessing the URL, it works fine.
What's your FFmpeg version? Can you post the output of executing ffmpeg
(without arguments)?
Ok, here it goes:
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
I forgot to post the error that followed the others previously mentioned:
{ Error: Command failed: youtube-dl --no-call-home --no-warnings --output "[...]" --add-header "Authorization: Bearer [...]" "https://euno-1.api.microsoftstream.com/api/[...]"
at checkExecSyncError (child_process.js:607:13)
at Object.execSync (child_process.js:647:13)
at rentVideoForLater (/destreamer/destreamer.js:149:25)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
error: null,
cmd: 'youtube-dl --no-call-home --no-warnings --output "[...]" --add-header "Authorization: Bearer [...]"',
file: '/bin/sh',
args:
[ '/bin/sh',
'-c',
'youtube-dl --no-call-home --no-warnings --output "videos/[...].mp4" --add-header "Authorization: Bearer [...]" "https://euno-1.api.microsoftstream.com/api/[...]"' ],
options:
{ stdio: [ [Object], [Object], [Object] ],
shell: true,
file: '/bin/sh',
args:
[ '/bin/sh',
'-c',
'youtube-dl --no-call-home --no-warnings --output "videos/[...].mp4" --add-header "Authorization: Bearer [...]" "https://euno-1.api.microsoftstream.com/api/[...]"' ],
envPairs: [...],
killSignal: undefined },
envPairs: [ ... ],
stderr: null,
stdout: null,
output: [ null, null, null ],
signal: null,
status: 1 }
/destreamer/destreamer.js:210
throw new Error('Killing process..\n');
^
Error: Killing process..
at process.on (/destreamer/destreamer.js:210:11)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emitPendingUnhandledRejections (internal/process/promises.js:108:22)
at process._tickCallback (internal/process/next_tick.js:190:7)
I've replaced with [...]
what seemed to be unimportant.
When trying to run the same command again (since I already had the recorded video stream) the download and inclusion of the audio track worked fine. However, if I try to do all at once, it fails.
I believe the access token expired midway through if you were able to download the file correctly the second time around (with audio). We are implementing access token refresh in the next release (v2.0). Should be out in a week or so.
Closing for now as the dev
branch is no longer maintained.
I could download some videos, this is great. But mainly I'd need the audio stream.
Sadly the downloaded MP4 file has no audio stream, only video. I asked one of my friends, he said in the real browser the video has sound, so the recording is correct.
Do I need to specify some parameters to get the audio too? Like the format?