4

I am trying to play this video I downloaded it via youtube-dl.

$ youtube-dl --verbose -c -f 22 SYahi3XFEa4
[debug] System config: []
[debug] User config: [u'-f', u'bestvideo[height<=720]+bestaudio/best[height<=720]']
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-c', u'-f', u'22', u'SYahi3XFEa4']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.28
[debug] Python version 2.7.17 (CPython) - Linux-5.3.0-2-amd64-x86_64-with-debian-bullseye-sid
[debug] exe versions: ffmpeg 4.2.1-2, ffprobe 4.2.1-2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] SYahi3XFEa4: Downloading webpage
[youtube] SYahi3XFEa4: Downloading video info webpage

It downloads the whole video but when I start to play it after a while I get this message -

Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x55b8592a73c0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x55b8592a73c0] Inconsistent channel configuration.
[aac @ 0x55b8592a73c0] get_buffer() failed
Error while decoding stream #0:1: Invalid argument
[aac @ 0x55b8592a73c0] Reserved bit set.
[aac @ 0x55b8592a73c0] Number of bands (62) exceeds limit (45).
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x55b8592a73c0] channel element 3.0 is not allocated
[aac @ 0x55b8592a73c0] channel element 3.15 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x55b8592a73c0] Reserved bit set.
[aac @ 0x55b8592a73c0] Prediction is not allowed in AAC-LC.
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x55b8592a73c0] Prediction is not allowed in AAC-LC.
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x55b8592a73c0] channel element 3.11 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x55b8592a73c0] channel element 3.12 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input

It goes on and on. If I try to use ffmpeg to fix the offending video it fixed but only the first 10-15 minutes of the video, the rest of the video is still corrupt i.e. cannot see or hear it.

For e.g. this is what I get when trying to play the whole file -

$ mpv output.mp4 
 (+) Video --vid=1 (*) (h264 1280x720 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p
AV: 00:26:15 / 00:28:56 (90%) A-V:  0.000
Invalid audio PTS: 260.620771 -> 381.016236
Invalid audio PTS: 381.039456 -> 413.361633
Invalid audio PTS: 413.384853 -> 430.753379
Invalid audio PTS: 430.776599 -> 517.247710
Invalid audio PTS: 517.270930 -> 584.701678
Reset playback due to audio timestamp reset.
Invalid audio PTS: 601.141406 -> 601.838005
Invalid audio PTS: 601.861224 -> 610.475828
Invalid audio PTS: 610.499048 -> 613.958821
Invalid audio PTS: 613.982041 -> 620.158549
Invalid audio PTS: 620.181769 -> 631.675646
Invalid audio PTS: 631.698866 -> 641.822766
Invalid audio PTS: 641.845986 -> 675.189841
Invalid audio PTS: 675.213061 -> 686.962358
Reset playback due to audio timestamp reset.
Invalid audio PTS: 719.029116 -> 750.283175
Invalid audio PTS: 750.306395 -> 755.368345
Invalid audio PTS: 755.391565 -> 807.009524
Invalid audio PTS: 807.032744 -> 815.949206
Invalid audio PTS: 815.972426 -> 945.725533
Invalid audio PTS: 945.748753 -> 1048.450612
Invalid audio PTS: 1048.473832 -> 1153.079728
Invalid audio PTS: 1153.102948 -> 1154.194286
Reset playback due to audio timestamp reset.
Invalid audio PTS: 1175.092245 -> 1175.231565
Invalid audio PTS: 1175.254785 -> 1184.380227
Invalid audio PTS: 1184.403447 -> 1196.059864
Invalid audio PTS: 1196.083084 -> 1283.041814
Invalid audio PTS: 1283.065034 -> 1297.020227
Invalid audio PTS: 1297.043447 -> 1343.320816
Invalid audio PTS: 1343.344036 -> 1388.460408
Invalid audio PTS: 1388.483628 -> 1472.539864
Reset playback due to audio timestamp reset.
Invalid audio PTS: 1479.621950 -> 1480.875828
Invalid audio PTS: 1480.899048 -> 1532.679546
Invalid audio PTS: 1532.702766 -> 1570.922812
Invalid audio PTS: 1570.946032 -> 1595.257324
Invalid audio PTS: 1595.280544 -> 1647.943401
Invalid audio PTS: 1647.966621 -> 1736.643628
Reset playback due to audio timestamp reset.

Any clues about what could bw wrong here. FFmpeg is the latest 4.2 on Debian.

4
  • Can't reproduce it here. Download it again and check.
    – Gyan
    Nov 30, 2019 at 4:52
  • Now it works i.e. I am able to download the 720p resolution withou an issue. But the issue I have shared has happened before. I need to know how to solve it in case such a similar scenario happens again. I have no idea either about NAL Units nor about Invalid audio PTS but will be glad if somebody cleans and tells us a bit about that and give answers to what should be in scenarios such as above.
    – shirish
    Dec 1, 2019 at 10:26
  • 1
    It's a network/downloading issue. NAL units are elements in a H264/H265 stream. You can't do anything to 'fix' it.
    – Gyan
    Dec 1, 2019 at 10:42
  • ah ok, how do I close it. I don't want to delete it so the question I asked remains so I know in the future what the cause was/is. Is there a way to do that. I tried to close it but didn't like any of the options given. Any ideas ?
    – shirish
    Dec 1, 2019 at 11:57

0

You must log in to answer this question.

Browse other questions tagged .