RTSP stream cannot decode Mp4v video with -mt and threads > 1
Version 2.0.0 of VLC was able to play the RTSP stream from our DLINK DCS-5220 security cameras without issue.
As of version 2.0.1, this is no longer true. VLC does not give any errors, and appears to connect and buffer... but no video is actually displayed.
Version 2.0.0 reports the following codec information:
Stream 0
type: video
codec: mpeg-4 video (mp4v)
resolution: 640x480
frame rate: 1000
decoded format: planar 4:2:0 YUV
Stream 1
type: audio
codec: mpeg aac audio (mp4a)
channels: stereo
sample rate: 32000 hz
Version 2.0.1 reports the following codec information:
Stream 0
type: video
codec: mpeg-4 video (mp4v)
Stream 1
type: audio
codec: mpeg aac audio (mp4a)
channels: stereo
sample rate: 32000 hz
The 2.0.1 message log shows no errors, but the following warning is repeated many times per second:
avcodec warning: cannot decode one frame (1952 bytes)
[though the byte-value varies from frame to frame, it's generally 1850-2000 bytes]
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
I suspect this is related to issue #6568 (closed)
- Owner
Please share the lgos
This is with debug verbosity in the messages window. I'm not sure what else you mean by "logs".
main debug: processing request item: rtsp://cam_12/live.sdp, node: Playlist, skip: 0 main debug: resyncing on rtsp://cam_12/live.sdp main debug: rtsp://cam_12/live.sdp is at 0 main debug: starting playback of the new playlist item main debug: creating new input thread main debug: Creating an input for 'rtsp://cam_12/live.sdp' main debug: using timeshift granularity of 50 MiB, in path 'C:\Users\user\AppData\Local\Temp' main debug: `rtsp://cam_12/live.sdp' gives access `rtsp' demux `' path `cam_12/live.sdp' main debug: creating demux: access='rtsp' demux='' location='cam_12/live.sdp' file='\\cam_12\live.sdp' main debug: looking for access_demux module: 1 candidate live555 debug: version 2011.12.23 qt4 debug: IM: Setting an input live555 debug: RTP subsession 'video/MP4V-ES' main debug: selecting program id=0 live555 debug: RTP subsession 'audio/MPEG4-GENERIC' live555 debug: setup start: 0.000000 stop:0.000000 live555 debug: play start: 0.000000 stop:0.000000 main debug: using access_demux module "live555" main debug: TIMER module_need() : 1407.648 ms - Total 1407.648 ms / 1 intvls (Avg 1407.648 ms) main debug: looking for decoder module: 31 candidates avcodec debug: libavcodec already initialized avcodec debug: trying to use direct rendering avcodec debug: allowing 4 thread(s) for decoding avcodec debug: ffmpeg codec (MPEG-4 Video) started avcodec debug: using frame thread mode with 4 threads main debug: using decoder module "avcodec" main debug: TIMER module_need() : 1.148 ms - Total 1.148 ms / 1 intvls (Avg 1.148 ms) main debug: looking for decoder module: 31 candidates main debug: using decoder module "faad" main debug: TIMER module_need() : 0.300 ms - Total 0.300 ms / 1 intvls (Avg 0.300 ms) main debug: looking for meta reader module: 2 candidates lua debug: Trying Lua scripts in C:\Users\user\AppData\Roaming\vlc\lua\meta\reader lua debug: Trying Lua scripts in C:\TEMP\vlc\App\vlc\lua\meta\reader lua debug: Trying Lua playlist script C:\TEMP\vlc\App\vlc\lua\meta\reader\filename.luac main debug: no meta reader module matching "any" could be loaded main debug: TIMER module_need() : 0.999 ms - Total 0.999 ms / 1 intvls (Avg 0.999 ms) main debug: `rtsp://cam_12/live.sdp' successfully opened main debug: Buffering 0% faad warning: decoded zero sample live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main error: ES_OUT_RESET_PCR called main debug: recycling audio output main debug: looking for audio output module: 2 candidates aout_directx debug: Opening DirectSound Audio Output aout_directx debug: found device: Primary Sound Driver aout_directx debug: found device: Speakers (Sound Blaster X-Fi Xtreme Audio) aout_directx debug: using device: Speakers (Sound Blaster X-Fi Xtreme Audio) aout_directx debug: found device: Digital Audio (S/PDIF) (Sound Blaster X-Fi Xtreme Audio) aout_directx debug: device supports 2 channels (DEFAULT!) aout_directx debug: device supports 1 channel aout_directx debug: Windows says your SpeakerConfig is stereo aout_directx debug: creating DirectSoundThread main debug: using audio output module "aout_directx" main debug: TIMER module_need() : 12.199 ms - Total 12.199 ms / 1 intvls (Avg 12.199 ms) aout_directx debug: DirectSoundThread ready main debug: output 's16l' 32000 Hz Stereo frame=1 samples/4 bytes main debug: mixer 'f32l' 32000 Hz Stereo frame=1 samples/8 bytes main debug: filter(s) 'f32l'->'s16l' 32000 Hz->32000 Hz Stereo->Stereo main debug: looking for audio filter module: 14 candidates audio_format debug: f32l->s16l, bits per sample: 32->16 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.141 ms - Total 0.141 ms / 1 intvls (Avg 0.141 ms) main debug: conversion pipeline completed main debug: looking for audio mixer module: 2 candidates main debug: using audio mixer module "float32_mixer" main debug: TIMER module_need() : 0.100 ms - Total 0.100 ms / 1 intvls (Avg 0.100 ms) main debug: input 'f32l' 32000 Hz Stereo frame=1 samples/8 bytes main debug: looking for audio filter module: 1 candidate scaletempo debug: format: 32000 rate, 2 nch, 4 bps, fl32 scaletempo debug: params: 30 stride, 0.200 overlap, 14 search scaletempo debug: 1.000 scale, 960.000 stride_in, 960 stride_out, 768 standing, 192 overlap, 448 search, 1600 queue, fl32 mode main debug: using audio filter module "scaletempo" main debug: TIMER module_need() : 0.124 ms - Total 0.124 ms / 1 intvls (Avg 0.124 ms) main debug: filter(s) 'f32l'->'f32l' 32000 Hz->32000 Hz Stereo->Stereo main debug: conversion pipeline completed main debug: filter(s) 'f32l'->'f32l' 32000 Hz->32000 Hz Stereo->Stereo main debug: conversion pipeline completed main debug: filter(s) 'f32l'->'f32l' 35200 Hz->32000 Hz Stereo->Stereo main debug: looking for audio filter module: 14 candidates main debug: using audio filter module "samplerate" main debug: TIMER module_need() : 0.298 ms - Total 0.298 ms / 1 intvls (Avg 0.298 ms) main debug: conversion pipeline completed main debug: End of audio preroll main debug: Buffering 0% main debug: End of audio preroll main debug: Buffering 6% main warning: clock gap, unexpected stream discontinuity main warning: feeding synchro with a new reference point trying to recover from clock gap main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 20% main debug: Buffering 20% main debug: Buffering 20% main debug: Buffering 20% live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main error: ES_OUT_RESET_PCR called main debug: Buffering 0% main debug: End of audio preroll main debug: Buffering 6% main debug: Buffering 12% main debug: Buffering 18% main debug: Buffering 19% main debug: Buffering 25% main debug: Buffering 32% main debug: Buffering 38% main debug: Buffering 38% main debug: Buffering 44% main debug: Buffering 51% main debug: Buffering 58% main debug: Buffering 58% main debug: Buffering 64% main debug: Buffering 70% main debug: Buffering 78% avcodec warning: cannot decode one frame (1989 bytes) main debug: Buffering 78% main debug: Buffering 83% main debug: Buffering 89% main debug: Buffering 98% avcodec warning: cannot decode one frame (1932 bytes) main debug: Buffering 98% main debug: Stream buffering done (1024 ms in 1018 ms) main debug: Decoder buffering done in 0 ms main warning: PTS is out of range (-9970), dropping buffer avcodec warning: cannot decode one frame (1884 bytes) main warning: audio output out of sync, adjusting dates (61897 us) main warning: not synchronized (61898 us), resampling avcodec warning: cannot decode one frame (1859 bytes) main warning: buffer too late (89908), up-sampling avcodec warning: cannot decode one frame (1809 bytes) avcodec warning: cannot decode one frame (1850 bytes) avcodec warning: cannot decode one frame (1873 bytes) avcodec warning: cannot decode one frame (1814 bytes) avcodec warning: cannot decode one frame (1822 bytes) avcodec warning: cannot decode one frame (1804 bytes) avcodec warning: cannot decode one frame (1800 bytes) avcodec warning: cannot decode one frame (1794 bytes) avcodec warning: cannot decode one frame (1812 bytes) avcodec warning: cannot decode one frame (1801 bytes) avcodec warning: cannot decode one frame (1796 bytes) avcodec warning: cannot decode one frame (1820 bytes) main debug: incoming request - stopping current input main debug: dying input main debug: control: stopping input main debug: dying input main debug: removing module "avcodec" avcodec debug: ffmpeg codec (MPEG-4 Video) stopped main debug: killing decoder fourcc `mp4v', 0 PES in FIFO main debug: removing module "faad" main debug: killing decoder fourcc `mp4a', 0 PES in FIFO main debug: removing module "scaletempo" main debug: removing module "samplerate" main debug: removing module "aout_directx" aout_directx debug: closing audio device aout_directx debug: DirectSoundThread exiting main debug: removing module "audio_format" main debug: removing module "float32_mixer" main debug: releasing audio output main debug: removing module "live555" main debug: Program doesn't contain anymore ES main debug: dead input qt4 debug: IM: Deleting the input main debug: TIMER input launching for 'rtsp://cam_12/live.sdp' : 1411.259 ms - Total 1411.259 ms / 1 intvls (Avg 1411.259 ms)
- Owner
Please try latest 2.0.2 NB
Replying to [comment:4 jb]:
Please try latest 2.0.2 NB
Same result with NB VLC media player 2.1.0-git Rincewind
The camera is a Toshiba but it has the same base firmware as the Dlink.
main debug: processing request item: rtsp://192.168.88.90/live.sdp, node: Playlist, skip: 0 main debug: resyncing on rtsp://192.168.88.90/live.sdp main debug: rtsp://192.168.88.90/live.sdp is at 0 main debug: starting playback of the new playlist item main debug: creating new input thread main debug: Creating an input for 'rtsp://192.168.88.90/live.sdp' main debug: using timeshift granularity of 50 MiB, in path '/tmp' main debug: `rtsp://192.168.88.90/live.sdp' gives access `rtsp' demux `' path `192.168.88.90/live.sdp' main debug: creating demux: access='rtsp' demux='' location='192.168.88.90/live.sdp' file='(null)' main debug: looking for access_demux module: 1 candidate live555 debug: version 2011.12.23 qt4 debug: IM: Setting an input live555 debug: RTP subsession 'video/MP4V-ES' main debug: selecting program id=0 live555 debug: RTP subsession 'audio/MPEG4-GENERIC' live555 debug: setup start: 0.000000 stop:0.000000 live555 debug: play start: 0.000000 stop:0.000000 main debug: using access_demux module "live555" main debug: looking for decoder module: 29 candidates avcodec debug: trying to use direct rendering avcodec debug: allowing 4 thread(s) for decoding avcodec debug: ffmpeg codec (MPEG-4 Video) started avcodec debug: using frame thread mode with 4 threads main debug: using decoder module "avcodec" main debug: looking for decoder module: 29 candidates main debug: using decoder module "faad" main debug: looking for meta reader module: 2 candidates lua debug: Trying Lua scripts in /home/nxn/.local/share/vlc/lua/meta/reader lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader main debug: no meta reader module matching "any" could be loaded main debug: `rtsp://192.168.88.90/live.sdp' successfully opened live555 warning: no data received in 10s. Switching to TCP main debug: removing module "avcodec" avcodec debug: ffmpeg codec (MPEG-4 Video) stopped main debug: killing decoder fourcc `mp4v', 0 PES in FIFO main debug: removing module "faad" main debug: killing decoder fourcc `mp4a', 0 PES in FIFO main debug: Program doesn't contain anymore ES live555 debug: RTP subsession 'video/MP4V-ES' main debug: looking for decoder module: 29 candidates avcodec debug: trying to use direct rendering avcodec debug: allowing 4 thread(s) for decoding avcodec debug: ffmpeg codec (MPEG-4 Video) started avcodec debug: using frame thread mode with 4 threads main debug: using decoder module "avcodec" live555 debug: RTP subsession 'audio/MPEG4-GENERIC' main debug: looking for decoder module: 29 candidates main debug: using decoder module "faad" live555 debug: setup start: 0.000000 stop:0.000000 live555 debug: play start: 0.000000 stop:0.000000 live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main error: ES_OUT_RESET_PCR called main debug: Buffering 0% main debug: Buffering 14% main warning: clock gap, unexpected stream discontinuity main warning: feeding synchro with a new reference point trying to recover from clock gap main debug: Buffering 0% live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main error: ES_OUT_RESET_PCR called faad warning: decoded zero sample main debug: Buffering 0% main debug: Buffering 0% main debug: recycling audio output main debug: looking for audio output module: 4 candidates pulse debug: using stereo channel map pulse debug: using library version 1.1.0 pulse debug: (compiled with version 1.1.0, protocol 26) pulse debug: connected locally to unix:/home/nxn/.pulse/7c6a5478bae770560dbd80b00000000b-runtime/native as client [#175](https://code.videolan.org/videolan/vlc/-/issues/175) pulse debug: using protocol 26, server protocol 26 pulse debug: using buffer metrics: maxlength=4194304, tlength=6144, prebuf=0, minreq=2560 pulse debug: connected to sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo main debug: using audio output module "pulse" main debug: output 'f32l' 16000 Hz Stereo frame=1 samples/8 bytes main debug: mixer 'f32l' 16000 Hz Stereo frame=1 samples/8 bytes main debug: filter(s) 'f32l'->'f32l' 16000 Hz->16000 Hz Stereo->Stereo main debug: conversion pipeline completed main debug: looking for audio mixer module: 2 candidates main debug: using audio mixer module "float32_mixer" main debug: input 'f32l' 16000 Hz Stereo frame=1 samples/8 bytes main debug: looking for audio filter module: 1 candidate scaletempo debug: format: 16000 rate, 2 nch, 4 bps, fl32 scaletempo debug: params: 30 stride, 0.200 overlap, 14 search scaletempo debug: 1.000 scale, 480.000 stride_in, 480 stride_out, 384 standing, 96 overlap, 224 search, 800 queue, fl32 mode main debug: using audio filter module "scaletempo" main debug: filter(s) 'f32l'->'f32l' 16000 Hz->16000 Hz Stereo->Stereo main debug: conversion pipeline completed main debug: filter(s) 'f32l'->'f32l' 16000 Hz->16000 Hz Stereo->Stereo main debug: conversion pipeline completed main debug: filter(s) 'f32l'->'f32l' 17600 Hz->16000 Hz Stereo->Stereo main debug: looking for audio filter module: 14 candidates main debug: using audio filter module "speex_resampler" main debug: conversion pipeline completed main debug: End of audio preroll pulse debug: listing sink alsa_output.pci-0000_00_1b.0.analog-stereo (0): Built-in Audio Analog Stereo pulse debug: base volume: 65536 main debug: Buffering 14% main debug: Buffering 14% main debug: Buffering 28% main debug: Buffering 28% main debug: Buffering 42% avcodec warning: cannot decode one frame (882 bytes) main debug: Buffering 42% main debug: Buffering 42% main debug: Buffering 56% avcodec warning: cannot decode one frame (777 bytes) main debug: Buffering 56% main debug: Buffering 70% avcodec warning: cannot decode one frame (677 bytes) main debug: Buffering 70% main debug: Buffering 85% avcodec warning: cannot decode one frame (696 bytes) main debug: Buffering 85% main debug: Buffering 99% avcodec warning: cannot decode one frame (16601 bytes) main debug: Buffering 99% main debug: Stream buffering done (1134 ms in 1156 ms) avcodec warning: cannot decode one frame (1092 bytes) main debug: Decoder buffering done in 0 ms main warning: PTS is out of range (92172), dropping buffer main warning: PTS is out of range (-35643), dropping buffer pulse debug: deferring start (291204 us) main warning: buffer too late (99156), up-sampling avcodec warning: cannot decode one frame (943 bytes) avcodec warning: cannot decode one frame (953 bytes) pulse debug: starting deferred main warning: timing screwed, stopping resampling pulse warning: too late by 129069 us pulse debug: changed sample rate to 16030 Hz pulse debug: started pulse warning: too late by 128994 us pulse debug: changed sample rate to 16045 Hz pulse debug: listing sink alsa_output.pci-0000_00_1b.0.analog-stereo (0): Built-in Audio Analog Stereo pulse warning: too late by 125747 us pulse debug: changed sample rate to 16060 Hz pulse warning: too late by 124426 us pulse debug: changed sample rate to 16075 Hz pulse warning: too late by 123288 us pulse debug: changed sample rate to 16090 Hz pulse warning: too late by 122305 us pulse debug: changed sample rate to 16105 Hz avcodec warning: cannot decode one frame (884 bytes) main warning: buffer too late (167756), up-sampling pulse warning: too late by 120432 us pulse debug: changed sample rate to 16120 Hz avcodec warning: cannot decode one frame (872 bytes) pulse warning: too late by 118592 us pulse debug: changed sample rate to 16135 Hz avcodec warning: cannot decode one frame (910 bytes) avcodec warning: cannot decode one frame (884 bytes) pulse warning: too late by 115407 us pulse debug: changed sample rate to 16150 Hz avcodec warning: cannot decode one frame (867 bytes) avcodec warning: cannot decode one frame (964 bytes) avcodec warning: cannot decode one frame (1024 bytes) main warning: resampling stopped after 899080 usec (drift: -96652) avcodec warning: cannot decode one frame (974 bytes) main warning: buffer too late (96652), up-sampling avcodec warning: cannot decode one frame (941 bytes) pulse warning: too late by 108967 us pulse debug: changed sample rate to 16151 Hz main warning: timing screwed, stopping resampling avcodec warning: cannot decode one frame (999 bytes) main warning: buffer too late (164770), up-sampling avcodec warning: cannot decode one frame (964 bytes) avcodec warning: cannot decode one frame (918 bytes) avcodec warning: cannot decode one frame (796 bytes) avcodec warning: cannot decode one frame (804 bytes) avcodec warning: cannot decode one frame (813 bytes) avcodec warning: cannot decode one frame (910 bytes) main warning: resampling stopped after 899646 usec (drift: -90108) avcodec warning: cannot decode one frame (1208 bytes) main warning: buffer too late (90108), up-sampling avcodec warning: cannot decode one frame (1269 bytes) pulse warning: too late by 97708 us pulse debug: changed sample rate to 16131 Hz main warning: timing screwed, stopping resampling avcodec warning: cannot decode one frame (1177 bytes) main warning: buffer too late (151102), up-sampling avcodec warning: cannot decode one frame (1146 bytes) main debug: incoming request - stopping current input main debug: dying input main debug: control: stopping input main debug: dying input avcodec warning: cannot decode one frame (1098 bytes) main debug: removing module "avcodec" avcodec debug: ffmpeg codec (MPEG-4 Video) stopped main debug: killing decoder fourcc `mp4v', 0 PES in FIFO main debug: removing module "faad" main debug: killing decoder fourcc `mp4a', 0 PES in FIFO main debug: removing module "scaletempo" main debug: removing module "speex_resampler" main debug: removing module "pulse" main debug: removing module "float32_mixer" main debug: releasing audio output main debug: removing module "live555" main debug: Program doesn't contain anymore ES main debug: dead input qt4 debug: IM: Deleting the input
That seems to work around the issue.
Note this pretty closely tracks the upstream Libav which was only bumped to 0.8.2 on 05.04.12 libav-extra (4:0.8.1ubuntu1) precise
I missed this before. Console Output without --avcodec-threads=1
[mpeg4 @ 0x7f130800cf20] Width/height/bit depth/chroma idc changing with threads is not implemented. Update your Libav 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.
- Felix Paul Kühne changed milestone to %2.0.4
changed milestone to %2.0.4
- Jean-Baptiste Kempf changed title from RTSP stream cannot decode video in 2.0.1 to RTSP stream cannot decode video with -mt and threads > 1
changed title from RTSP stream cannot decode video in 2.0.1 to RTSP stream cannot decode video with -mt and threads > 1
- Jean-Baptiste Kempf changed title from RTSP stream cannot decode video with -mt and threads > 1 to RTSP stream cannot decode Mp4v video with -mt and threads > 1
changed title from RTSP stream cannot decode video with -mt and threads > 1 to RTSP stream cannot decode Mp4v video with -mt and threads > 1
- Owner
An important duplicate is #6841 (closed)
- Owner
A similar issue (not RTSP related) with lots of sample is #6533 (closed)
Had this error:
Width/height/bit depth/chroma idc changing with threads is not implemented. Update your Libav 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.
So I've upgraded to 2.0.4 and I still have to manually set this option for rtsp streams to work:
:ffmpeg-threads=1
- Jean-Baptiste Kempf added Status::fixed label
added Status::fixed label
- Jean-Baptiste Kempf closed
closed
I think the problem is still not fixed in VLC 2.0.8...
How do I get my error I stream the video with the following application (RTSP Edition): http://ipvideotrans.com/surveillance.html
I stream in MPEG4 format (H.264 is working fine). Now the interesting part: VLC 1.0.5 is able to play stream perfectly. VLC 2.0.6, 2.0.8, 2.1.0 (Nightly Build) - all of them are unable to play the stream. It happens once every 10-20 trials to play the stream, but usually it ends up with 50% CPU load and VLC Player doing nothing.
Can you reopen the ticket and look at the problem again? Thanks. Pawel
- alien5 removed Status::fixed label
removed Status::fixed label
- alien5 reopened
reopened
- Jean-Baptiste Kempf closed
closed