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

Playback error with Opus codec #186

Closed
rtyping opened this issue Apr 20, 2024 · 2 comments
Closed

Playback error with Opus codec #186

rtyping opened this issue Apr 20, 2024 · 2 comments

Comments

@rtyping
Copy link

rtyping commented Apr 20, 2024

v1.7.3

I'm trying to play a streaming video with Opus audio codec and I get the following errors:

[MSEController] > MediaSource onSourceOpen
[TSDemuxer] > Parsed first PAT: {"program_pmt_pid":{"1":256},"version_number":0}
[TSDemuxer] > Generated first AudioSpecificConfig for mimeType: opus
[TSDemuxer] > Parsed first PMT: {"pid_stream_type":{"257":6,"258":27},"common_pids":{"h264":258,"opus":257},"pes_private_data_pids":{"257":true},"timed_id3_pids":{},"synchronous_klv_pids":{},"asynchronous_klv_pids":{},"scte_35_pids":{},"smpte2038_pids":{},"program_number":1,"version_number":2,"pcr_pid":258}
[TSDemuxer] > Generated first AVCDecoderConfigurationRecord for mimeType: avc1.640c28
[MP4Remuxer] > Dropping 1 audio frame (originalDts: 1824 ms ,curRefDts: 1884 ms) due to dtsCorrection: -60 ms overlap.
[MSEController] > Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.

Video won't play, no sound.

PS: ffplay and vlc play this stream without problems. Also, when I save this stream to a file, the mpegts.js player also plays this file without any problem.

Chrome media-internals logs:

00:00:00.000 created "2024-04-20 18:02:04.068632 UTC"
00:00:00.000 origin_url "http://127.0.0.1:8082/"
00:00:00.000 kFrameUrl "http://127.0.0.1:8082/#/ptz/main"
00:00:00.000 kFrameTitle "Encore"
00:00:00.000 url "blob:http://127.0.0.1:8082/47235f61-6300-4524-80b7-2b73e875c84f"
00:00:00.000 info "ChunkDemuxer"
00:00:00.000 kRendererName "RendererImpl"
00:00:00.000 pipeline_state "kStarting"
00:00:00.056 kVideoTracks [{"alpha mode":"is_opaque","codec":"h264","coded size":"1920x1080","color space":{"matrix":"BT709","primaries":"BT709","range":"LIMITED","transfer":"BT709"},"encryption scheme":"Unencrypted","has extra data":false,"hdr metadata":"unset","natural size":"1920x1080","orientation":"0°","profile":"h264 high","visible rect":"0,0 1920x1080"}]
00:00:00.057 kAudioTracks [{"bytes per channel":2,"bytes per frame":4,"channel layout":"STEREO","channels":2,"codec":"opus","codec delay":0,"discard decoder delay":true,"encryption scheme":"Unencrypted","has extra data":true,"profile":"unknown","sample format":"Signed 16-bit","samples per second":48000,"seek preroll":"80000us"}]
00:00:00.058 kIsAudioDecryptingDemuxerStream false
00:00:00.058 kAudioDecoderName "FFmpegAudioDecoder"
00:00:00.058 kIsPlatformAudioDecoder false
00:00:00.058 info "Selected FFmpegAudioDecoder for audio decoding, config: codec: opus, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Signed 16-bit, bytes_per_frame: 4, seek_preroll: 80000us, codec_delay: 0, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: false"
00:00:00.058 debug "Video rendering in low delay mode."
00:00:00.058 info "Cannot select DecryptingVideoDecoder for video decoding"
00:00:00.058 info "Cannot select VaapiVideoDecoder for video decoding"
00:00:00.058 info "Cannot select VpxVideoDecoder for video decoding"
00:00:00.058 info "Cannot select Dav1dVideoDecoder for video decoding"
00:00:00.059 kIsVideoDecryptingDemuxerStream false
00:00:00.059 kVideoDecoderName "FFmpegVideoDecoder"
00:00:00.059 kIsPlatformVideoDecoder false
00:00:00.059 info "Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
00:00:00.059 pipeline_state "kPlaying"
00:00:00.061 info "Effective playback rate changed from 0 to 1"
00:00:00.062 event "kPlay"
00:00:00.063 debug "Skipping 'trun' sample with size of 0."
00:00:00.076 error "Failed to send audio packet for decoding: {timestamp=51000 duration=20000 size=115 is_key_frame=1 encrypted=0}"
00:00:00.076 warning "audio decoder fallback after initial decode error."
00:00:00.076 error "audio error during playing, status: PIPELINE_ERROR_DECODE"
00:00:00.078 error {"code":3,"data":{},"group":"PipelineStatus","message":"","stack":[{"file":"media/renderers/audio_renderer_impl.cc","line":899}]}
00:00:00.078 event "kPause"
00:00:00.087 pipeline_state "kStopping"
00:00:00.089 pipeline_state "kStopped"
00:00:00.057 duration "unknown"
00:00:00.077 video_buffering_state {"state":"BUFFERING_HAVE_ENOUGH"}
00:02:24.464 event "kWebMediaPlayerDestroyed"

@suzp1984
Copy link
Contributor

suzp1984 commented May 4, 2024

check wether #190 fixed this issue?

@rtyping
Copy link
Author

rtyping commented May 27, 2024

Yes, thank you so much, great job. #190 total fixed problem with OPUS, I added comment in #190.

@rtyping rtyping closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants