Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on Chrome 64.0.3282.119 #1529

Closed
4 tasks done
ghost opened this issue Jan 29, 2018 · 30 comments
Closed
4 tasks done

Errors on Chrome 64.0.3282.119 #1529

ghost opened this issue Jan 29, 2018 · 30 comments
Labels
browser: Chrome Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Wontfix

Comments

@ghost
Copy link

ghost commented Jan 29, 2018

Environment
  • Link to playable M3U8 file:

https://video-dev.github.io/hls.js/demo/?src=https%3A%2F%2Fdemo.stockweight.com%2Fmmm%2Fdir%2Fok.m3u8%3Fv%3D1&enableStreaming=true&autoRecoverError=true&enableWorker=true&dumpfMP4=false&levelCapping=-1&defaultAudioCodec=undefined

  • Hls.js version: v0.8.9
  • Browser name/version: Chrome
  • OS name/version: 64.0.3282.119

This is a very wired bug. Before this version of Chrome, the video can play without any problem. After I upgraded the Chrome to 64.0.3282.119( This version was released on January 24, 2018), the errors were occurred.

If you try to open the URL by Safari or Firefox or IE, you can also play the video without any errors.

Please help me to check the root cause.

Thank you.

@tchakabam
Copy link
Collaborator

Hey, thanks for the early report :)

You are using Windows or MacOS, or maybe even Linux?

(That's what we ask about in OS name/version btw ;))

Unfortunately I can't verify this right now.

But can you post the errors here, like a console log or even a screenshot? :)

@tchakabam tchakabam added the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Jan 30, 2018
@ghost
Copy link
Author

ghost commented Jan 30, 2018

Hello,

I think the OS doesn't affect the results. I have tested on MacOS High 10.13.2(The latest version) and Windows 10, and both of them got the same errors.

The errors I got from the HLS dev demo page are:

The video playback was aborted due to a corruption problem or because the video used features your browser did not support - PIPELINE_ERROR_DECODE: Failed to send audio packet for decoding: timestamp=661333 duration=21333 size=345 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (ms)=(0, 0)

The errors screenshot I got from console log when the video is loaded:

2018-01-30 9 25 47

and ...

2018-01-30 9 27 32

After I clicked the play, the following errors occurred:

2018-01-30 9 43 38

I have already fighted on this issues for 2 days, I have already tried the player videojs + videojs-contrib-hls and flowplayer, and I also got the errors. ( I think that's because they use hls.js as their HLS library )

Please take a look on it.

Thank you very much.

@mangui
Copy link
Member

mangui commented Jan 31, 2018

indeed i am able to repro (only after updating to Chrome 64, Chrome 63 is working fine on High Sierra)
it also reproducible on videojs-contrib-hls, which uses another transmuxer.
pinging @dalecurtis as he might be able to provide some hints

@dalecurtis
Copy link

What codec is this stream using? FFmpeg suddenly got a lot pickier about the packets it accepts:

https://bugs.chromium.org/p/chromium/issues/detail?id=794782

Thus far we've only seen junk in mp3 streams trigger this.

@ghost
Copy link
Author

ghost commented Jan 31, 2018

Hi @dalecurtis,

Thanks for your comment.

ffmpeg -i for this video, I got:

Input #0, hls,applehttp, from 'http://demo.stockweight.com/mmm/dir/ok.m3u8':
Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

This bug looks like it was caused by junk? audio stream.
Is there any possible to fix it from the HLS library? ( skip the junk? )
I hope it can work well like the old Chrome version.

Thanks.

@dalecurtis
Copy link

Thanks for the info. I'll take a look. MSE (which is much stricter than ffmpeg) should be preventing you from even appending junk packets, so I'm not sure that's the root cause here.

@dalecurtis
Copy link

dalecurtis commented Feb 1, 2018

FFmpeg says:

[aac @ 0x7f834f8f5000] SSR is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x7f834f8f5000] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)

I'm surprised this worked at all in previous versions since apparently this has been an issue for years:

https://trac.ffmpeg.org/ticket/1693

Probably this generated a non-fatal decoder error in the past, but resulted in a/v sync and other subtle issues over the lifetime of the stream.

@dalecurtis
Copy link

ffmpeg -i confirms the failure,

$ ffmpeg -i http://demo.stockweight.com/mmm/dir/ok.m3u8 out.mp4
ffmpeg version N-87099-g37a818da26 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration:
libavutil 55. 74.100 / 55. 74.100
libavcodec 57.103.101 / 57.103.101
libavformat 57. 78.100 / 57. 78.100
libavdevice 57. 8.100 / 57. 8.100
libavfilter 6.100.100 / 6.100.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
[hls,applehttp @ 0x7fec0b009400] Opening 'http://demo.stockweight.com/mmm/dir/0.ts' for reading
Input #0, hls,applehttp, from 'http://demo.stockweight.com/mmm/dir/ok.m3u8':
Duration: 00:00:20.02, start: 0.000000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
Metadata:
variant_bitrate : 0
Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 0
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[mpeg4 @ 0x7fec0d010a00] Invalid pixel aspect ratio 1280/1281, limit is 255/255 reducing
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf57.78.100
Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, SAR 1280:1281 DAR 16:9, 29.97 fps, 30k tbn, 29.97 tbc
Metadata:
variant_bitrate : 0
encoder : Lavc57.103.101 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
variant_bitrate : 0
encoder : Lavc57.103.101 aac
[aac @ 0x7fec0d000000] SSR is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x7fec0d000000] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
Error while decoding stream #0:0: Not yet implemented in FFmpeg, patches welcome

@ghost
Copy link
Author

ghost commented Feb 1, 2018

Yes. I also found this error(SSR is not implemented) and some of our videos also have this error.
It can still play from the player even if I got this errors before this newest Chrome version.

Starting from the newest version of Chrome, it can not play anymore. :(

@dalecurtis
Copy link

This is now tracked by https://bugs.chromium.org/p/chromium/issues/detail?id=808064 -- I don't expect this situation to change anytime soon though. Past Chrome versions were incorrectly dropping these packets and thus accumulating huge a/v sync delay over long streams.

Unfortunately there doesn't seem to be a profile string which can be used to test for SSR support via isTypeSupported/canPlayType, so we can't codify this in the code. I've updated https://sites.google.com/a/chromium.org/dev/audio-video to make it clear only Main, HE, and LC profiles are supported.

Notably Firefox drops the audio stream entirely for this playback, so I'm not sure it counts as successful playback. If this is okay for you, you can just play out only the video stream and Chrome will play the video portion of the content without issue.

@ghost
Copy link
Author

ghost commented Feb 2, 2018

Thanks for the update.

If I want to avoid this error, is there any tools or parameters in FFmpeg I can use if the audio source has SSR.
We got some videos that use SSR to encode the audio, and we used FFmpeg to encode and transform it.

It looks like FFmpeg will not support SSR in the soon future. Since the SSR is not supported in FFmpeg and cannot be played in Chrome, is there any solution that we can use if source video contains SSR audio?

Btw, Firefox can play this video if you upgrade to the newest version. The old version indeed returns the errors.

Thank you.

@NinoSkopac
Copy link

@tchakabam tchakabam added Bug browser: Chrome Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Bug labels Feb 2, 2018
@dalecurtis
Copy link

@chianhsieh You should be able to re-encode the stream w/o SSR if you build/get ffmpeg with libfdk-aac support since that aac library has SSR support. See https://trac.ffmpeg.org/wiki/Encode/AAC#fdk_aac

There's otherwise no workaround but dropping the audio stream for Chrome. As noted on the Chrome bug this has never worked, in M63 your sample video loses ~1 second of a/v sync every 10 seconds; note the end time of audio @ 18 seconds vs clip length of 20 seconds.

@ghost
Copy link
Author

ghost commented Feb 5, 2018

I have already built the libfdk_aac with ffmpeg but it does not support AAC SSR and shows the "SSR is not implemented" either.

Is there other transcoding tools or library that can support to process the AAC SSR?

Thank you.

@dalecurtis
Copy link

For ffmpeg you need to specify the "-acodec libfdk_aac" before the "-i" input line to control decoder selection. This still emits some errors on some unsupported AAC features but otherwise generates an output of the correct duration. I.e.

./ffmpeg -acodec libfdk_aac -i ~/Downloads/ok.m3u8?v=1 -acodec libfdk_aac -vcodec copy out.mp4

[libfdk_aac @ 0xa66940] aacDecoder_DecodeFrame() failed: 400a
Error while decoding stream #0:0: Unknown error occurred

400a is AAC_DEC_UNSUPPORTED_GAIN_CONTROL_DATA = 0x400A, /*!< Gain control data found but not supported. Most probably the bitstream is corrupt, or has a wrong format. */

@whisk
Copy link

whisk commented Mar 13, 2018

We started to get decode errors on some HLS media in Chrome after it's update, without any meaningful debug info ("Failed to send audio packet for decoding: timestamp=0 duration=23219 size=9 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (ms)=(0, 0)").

It showed up that erroneous media have audio encode errors:

[libfdk_aac @ 0x7ffc85806400] aacDecoder_DecodeFrame() failed: 4002

Simple ffmpeg run fixes this issue:

ffmpeg -i file.mp4 -acodec libfdk_aac <other ffmpeg options> fixed_file.mp4

Though audio is somehow corrupt, playback in other browsers show no noticeable issues and ffmpeg could fix the stream, therefore I suppose this may be considered as Chrome regression bug.

@dalecurtis
Copy link

I've added SSR parsing support to upstream ffmpeg, you shouldn't need to use libfdk anymore if you have a version of ffmpeg from the last couple weeks. If you're still getting errors though, your file is likely just corrupt.

@OlegBose
Copy link

I have the same just streaming audio:
03-28 13:25:36.070: E/chromium(17073): [ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"Failed to send audio packet for decoding: timestamp=253805714 duration=26122 size=340 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (ms)=(0, 0)"}
03-28 13:25:36.073: E/chromium(17073): [ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"audio decode error"}
03-28 13:25:36.073: E/chromium(17073): [ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"audio error during playing, status: PIPELINE_ERROR_DECODE"}
03-28 13:25:36.074: E/chromium(17073): [ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"audio error during playing, status: PIPELINE_ERROR_DECODE"}
03-28 13:25:36.076: E/chromium(17073): [ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR PIPELINE_ERROR_DECODE

@stale
Copy link

stale bot commented Jun 15, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Wontfix label Jun 15, 2018
@stale stale bot closed this as completed Jun 22, 2018
@arturslab
Copy link

arturslab commented Jun 30, 2018

I have the same issue. On Google Chrome (ver. 67.0.3396.99 64-bit) one of MP4 videos after 8 seconds playing return an error:
html5: PIPELINE_ERROR_DECODE: Failed to send audio packet for decoding: timestamp=9264762 duration=23220 size=713 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (ms)=(0, 0)
In standalone player (GOM Player) or other latest versions browsers (MS Edge, IE 11, Firefox or Opera) this video is playing OK. When i play video on those browsers, i hear in that fragment short pick but player don't stop the video. Only on Chrome playing is stopped and return error I wrote above.

@pspkshah
Copy link

pspkshah commented Jul 9, 2018

This issue is not reproducible in Mozilla browser

@johnBartos johnBartos reopened this Aug 10, 2018
@johnBartos
Copy link
Collaborator

johnBartos commented Aug 10, 2018

@dalecurtis
Copy link

Whenever someone encounters this, the first thing you should do is check the quality of the audio stream using ffmpeg. Do you have a specific segment which is failing? Can you include the chrome://media-internals error that you see for that stream?

ffmpeg -i http://bob.jwplayer.com.s3.amazonaws.com/CBC_DRAGONS_SEASON_11_S11E09-v2-11272128-158ce85e027.28/CBC_DRAGONS_SEASON_11_S11E09-v2-11272128.m3u8 -vn -f wav -y /dev/null

In this case, no errors seem to appear in the stream, so from Chrome's side I'd need to know the exact segment you're appending that's triggering a decoder error. Since there appear to be no stream errors, it could be a transmuxing or usage bug in hls.js or actual bug in Chrome.

@johnBartos
Copy link
Collaborator

johnBartos commented Aug 10, 2018

@dalecurtis Thanks for the insight. Reopening was premature; this is definitely an issue on our end with AAC transmuxing, as it also happens in FF. The media error is:

Failed to send audio packet for decoding: timestamp=153332834 duration=23219 size=386 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (ms)=(0, 0)
--

Would be nice to have more insight into what we're doing wrong here but fortunately our logs are pointing to the probable cause.

Whenever someone encounters this, the first thing you should do is check the quality of the audio stream using ffmpeg

For my own education would you mind elaborating on this some more? It's sometimes hard to tell what things will actually cause issues. Some commands would be helpful!

@dalecurtis
Copy link

I just meant try the stream in a recent build of ffmpeg. i.e. with something like:

ffmpeg -i -vn -f wav -y /dev/null

In english that's:

input is (-i), ignore the video stream (-vn), output to wav (-f), don't ask permission for overwrite (-y), and write to /dev/null (discard output on Linux).

That should spit out a log for any decoding errors. Since Chrome uses ffmpeg under the hood if a segment fails decode there you'll see it in the log as well. You might also add something like '-v debug' to see more informational messages about what's going wrong.

Usually the error is enough to go find the code and see specifically what's wrong with the stream, but probably from a user's perspective as soon as you see an error I'd recommend just re-encoding that segment with an updated / fixed version.

@johnBartos
Copy link
Collaborator

johnBartos commented Aug 10, 2018

Since Chrome uses ffmpeg under the hood if a segment fails decode there you'll see it in the log as well.

@dalecurtis Very helpful, thanks a lot!

@raymondjacobson
Copy link

I'm still seeing this issue today reliably with a segment

ffmpeg -i ~/Downloads/QmUR6MeguuuvstqeK5q4q2EoroWQiY5d9bt1QqrzMEpQyd -vn -f wav -y /dev/null

ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.8)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mpegts, from '/Users/raymondjacobson/Downloads/QmUR6MeguuuvstqeK5q4q2EoroWQiY5d9bt1QqrzMEpQyd':
  Duration: 00:00:05.97, start: 805.410667, bitrate: 348 kb/s
  Program 1
    Metadata:
      service_name    : ekali set 9 shorter
      service_provider: FFmpeg
    Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 319 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/dev/null':
  Metadata:
    ISFT            : Lavf58.29.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      encoder         : Lavc58.54.100 pcm_s16le
[aac @ 0x7fcf95803c00] error in spectral data, ESC overflow
Error while decoding stream #0:0: Invalid data found when processing input
size=    1120kB time=00:00:05.99 bitrate=1530.6kbits/s speed= 514x
video:0kB audio:1120kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.006801%

I can't seem to find good reference on "error in spectral data." Any thoughts?

@dalecurtis
Copy link

This is where your error is coming from:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/ffmpeg/libavcodec/aacdec_template.c;l=1843

You'd have to look into your encoder and peek at the bitstream where the error is occurring to diagnose further.

@littlesupermanio
Copy link

This is where your error is coming from:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/ffmpeg/libavcodec/aacdec_template.c;l=1843

You'd have to look into your encoder and peek at the bitstream where the error is occurring to diagnose further.

Hi, I have encontered the same problem today. According to your comment, does this mean that some part of the video is invalid or broken so that it couldn't be decoded correctly?

@dalecurtis
Copy link

Yes, specifically some part of the audio stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: Chrome Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Wontfix
Projects
None yet
Development

No branches or pull requests