VLC is unable to stream consistently in mkv format with HTTP

About encoding, codec settings, muxers and filter usage
mcw
New Cone
New Cone
Posts: 1
Joined: 04 Apr 2016 10:22

VLC is unable to stream consistently in mkv format with HTTP

Postby mcw » 04 Apr 2016 11:09

When we try to stream video in mkv format with HTTP streaming, sometimes detecting proper 'mkv' demux format at client and some times other formats like 'ps', 'mp3' so in this case video is not playing. We tried with both encoders x264 and x265. flv format is fine but we want HTTP stream in mkv format, any ideas?

command: :sout=#transcode{vcodec=h264,vb=1500,venc=x264{preset=ultrafast},scale=Auto,acodec=none}:duplicate{dst=http{mux=mkv,dst=:8080/},dst=display} :sout-all :sout-keep


error message at client:
[00007f549c000ec8] core access debug: using access module "access"
[00007f549c001de8] core stream debug: looking for stream_filter module matching "cache_block": 11 candidates
[00007f549c001de8] cache_block stream debug: Using block method for AStream*
[00007f549c001de8] cache_block stream debug: starting pre-buffering
[0000000001e73838] qt interface debug: IM: Setting an input
[00007f549c001de8] cache_block stream debug: received first data after 5441 ms
[00007f549c001de8] cache_block stream debug: prebuffering done 2048 bytes in 5s - 0 KiB/s
[00007f549c001de8] core stream debug: using stream_filter module "cache_block"
[00007f549c001ba8] core stream debug: looking for stream_filter module matching "any": 11 candidates
[00007f549c001ba8] core stream debug: no stream_filter modules matched
[00007f549c001ba8] core stream debug: looking for stream_filter module matching "record": 11 candidates
[00007f549c001ba8] core stream debug: using stream_filter module "record"
[00007f549c000d58] core input source debug: creating demux: access='http' demux='any' location='192.168.1.4:8080/' file='(null)'
[00007f549c003158] core demux debug: looking for demux module matching "any": 58 candidates
[00007f549c00c7c8] core xml reader debug: looking for xml reader module matching "any": 1 candidates
[00007f549c00c7c8] core xml reader debug: using xml reader module "xml"
[00007f549c003158] avformat demux debug: trying url: http://192.168.1.4:8080/
[00007f549c003158] avformat demux debug: CPU flags: 0x000fd3db
[00007f549c003158] avformat demux debug: couldn't guess format
[00007f549c01be18] core xml debug: looking for xml module matching "any": 1 candidates
[00007f549c01be18] core xml debug: using xml module "xml"
[00007f549c01bf28] core xml reader debug: looking for xml reader module matching "any": 1 candidates
[00007f549c01bf28] core xml reader debug: using xml reader module "xml"
[00007f549c01be18] core xml debug: removing module "xml"
[00007f549c003158] ps demux warning: this does not look like an MPEG PS stream, continuing anyway
[00007f549c003158] core demux debug: using demux module "ps"
[00007f549c01c2e8] core demux meta debug: looking for meta reader module matching "any": 0 candidates
[00007f549c01c2e8] core demux meta debug: no meta reader modules
[00007f54980009d8] core input debug: `http://192.168.1.4:8080/' successfully opened
[00007f549c003158] ps demux warning: garbage at input, trying to resync...
[00007f549c003158] ps demux warning: found sync code
[00007f54980009d8] core input debug: selecting program id=0
[00007f549c5aca18] core packetizer debug: looking for packetizer module matching "any": 20 candidates
[00007f549c5aca18] core packetizer debug: using packetizer module "mpeg_audio"
[00007f549c021be8] core decoder debug: looking for decoder module matching "any": 31 candidates
[00007f549c021be8] avcodec decoder debug: CPU flags: 0x000fd3db
[00007f549c021be8] avcodec decoder debug: codec (mp2) started
[00007f549c021be8] core decoder debug: using decoder module "avcodec"

from above message,
core demux debug: using demux module "ps"
ps demux warning: garbage at input, trying to resync...

gu6526
New Cone
New Cone
Posts: 6
Joined: 27 Feb 2016 21:56

Re: VLC is unable to stream consistently in mkv format with HTTP

Postby gu6526 » 08 Feb 2017 16:35

I see similar behaiviour on an rtmp:// stream. An older Version of libVLC reades the stream just fine using avformat. The newest Version uses 'ps' which fails.

Messages from older Version (98dd4c3)

02-08 16:20:52.350 17280-17280/? D/VLC: [69ae1140/4380] core input: Creating an input for 'rtmp://stream.smcloud.net/live/fokustv'
02-08 16:20:52.370 17280-21241/? D/VLC: [69ae1140/52f9] core input: using timeshift granularity of 50 MiB
02-08 16:20:52.370 17280-21241/? D/VLC: [69ae1140/52f9] core input: using default timeshift path
02-08 16:20:52.370 17280-21241/? D/VLC: [69ae1140/52f9] core input: `rtmp://stream.smcloud.net/live/fokustv' gives access `rtmp' demux `' path `stream.smcloud.net/live/fokustv'
02-08 16:20:52.370 17280-21241/? D/VLC: [6e624d60/52f9] core input source: specified demux: any
02-08 16:20:52.380 17280-21241/? D/VLC: [6e624d60/52f9] core input source: creating demux: access='rtmp' demux='any' location='stream.smcloud.net/live/fokustv' file='(null)'
02-08 16:20:52.380 17280-21241/? D/VLC: [69c22190/52f9] core demux: looking for access_demux module matching "rtmp": 6 candidates
02-08 16:20:52.380 17280-21241/? D/VLC: [69c22190/52f9] core demux: no access_demux modules matched
02-08 16:20:52.380 17280-21241/? D/VLC: [6e65b388/52f9] core access: creating access: rtmp://stream.smcloud.net/live/fokustv
02-08 16:20:52.380 17280-21241/? D/VLC: [6e65b388/52f9] core access: looking for access module matching "rtmp": 22 candidates
02-08 16:20:52.380 17280-21241/? D/VLC: [6e65b388/52f9] avio access: CPU flags: 0x0000003f
02-08 16:20:52.450 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 258
02-08 16:20:52.450 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() Opening
02-08 16:20:52.450 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 259
02-08 16:20:53.630 17280-21241/? D/VLC: [6e65b388/52f9] avio access: not seekable, size=-38
02-08 16:20:53.630 17280-21241/? D/VLC: [6e65b388/52f9] core access: using access module "avio"
02-08 16:20:53.630 17280-21241/? D/VLC: [6ad35930/52f9] core stream: looking for stream_filter module matching "prefetch,cache_read": 12 candidates
02-08 16:20:53.640 17280-21241/? D/VLC: [6ad35930/52f9] cache_read stream: Using stream method for AStream*
02-08 16:20:53.640 17280-21241/? D/VLC: [6ad35930/52f9] cache_read stream: starting pre-buffering
02-08 16:20:53.680 17280-21241/? D/VLC: [6ad35930/52f9] cache_read stream: received first data after 45 ms
02-08 16:20:53.680 17280-21241/? D/VLC: [6ad35930/52f9] cache_read stream: pre-buffering done 1024 bytes in 0s - 21 KiB/s
02-08 16:20:53.680 17280-21241/? D/VLC: [6ad35930/52f9] core stream: using stream_filter module "cache_read"
02-08 16:20:53.680 17280-21241/? D/VLC: [6ad56070/52f9] core stream: looking for stream_filter module matching "any": 12 candidates
02-08 16:20:53.680 17280-21241/? D/VLC: [6ad56070/52f9] core stream: no stream_filter modules matched
02-08 16:20:53.690 17280-21241/? D/VLC: [6ad56070/52f9] core stream: looking for stream_filter module matching "record": 12 candidates
02-08 16:20:53.690 17280-21241/? D/VLC: [6ad56070/52f9] core stream: using stream_filter module "record"
02-08 16:20:53.690 17280-21241/? D/VLC: [6e624d60/52f9] core input source: creating demux: access='rtmp' demux='any' location='stream.smcloud.net/live/fokustv' file='(null)'
02-08 16:20:53.690 17280-21241/? D/VLC: [6ad05c88/52f9] core demux: looking for demux module matching "any": 61 candidates
02-08 16:20:53.690 17280-21241/? D/VLC: [69af11d8/52f9] core xml reader: looking for xml reader module matching "any": 1 candidates
02-08 16:20:53.690 17280-21241/? D/VLC: [69af11d8/52f9] core xml reader: using xml reader module "xml"
02-08 16:20:53.700 17280-21241/? D/VLC: [6ad05c88/52f9] mod demux: MOD validation failed (ext=)
02-08 16:20:53.700 17280-21241/? D/VLC: [6ad05c88/52f9] ts demux: TS module discarded (lost sync)
02-08 16:20:53.700 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: trying url: rtmp://stream.smcloud.net/live/fokustv
02-08 16:20:53.700 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: CPU flags: 0x0000003f
02-08 16:20:53.700 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: detected format: flv
02-08 16:20:55.650 17280-21241/? D/VLC: [69ae1140/52f9] core input: selecting program id=0
02-08 16:20:55.650 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 277
02-08 16:20:55.650 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() ESDeleted
02-08 16:20:55.650 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 277
02-08 16:20:55.650 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() ESDeleted
02-08 16:20:55.650 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 277
02-08 16:20:55.650 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() ESDeleted
02-08 16:20:55.650 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: adding es: video codec = h264 (28)
02-08 16:20:55.660 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: adding es: audio codec = mp4a (86018)
02-08 16:20:55.660 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: AVFormat supported stream
02-08 16:20:55.660 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: - format = flv (FLV (Flash Video))
02-08 16:20:55.660 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: - start time = 0
02-08 16:20:55.660 17280-21241/? D/VLC: [6ad05c88/52f9] avformat demux: - duration = -1

02-08 16:20:55.660 17280-21241/? D/VLC: [6ad05c88/52f9] core demux: using demux module "avformat"
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 276
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() ESAdded
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 276
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() ESAdded
02-08 16:20:55.660 17280-21241/? D/VLC: [6aaefe68/52f9] core decoder: looking for decoder module matching "mediacodec_jni,iomx,all": 39 candidates
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 269
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() SeekableChanged
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() 270
02-08 16:20:55.660 17280-17280/? D/VLCVideoPlayerActivity: onMediaPlayerEvent() PausableChanged
02-08 16:20:55.680 17280-21241/? D/VLC: [6aaefe68/52f9] mediacodec decoder: Number of profile levels: 0
02-08 16:20:55.680 17280-21241/? D/VLC: [6aaefe68/52f9] mediacodec decoder: Number of profile levels: 0
02-08 16:20:55.680 17280-21241/? D/VLC: [6aaefe68/52f9] mediacodec decoder: Number of profile levels: 0
02-08 16:20:55.680 17280-21241/? D/VLC: [6aaefe68/52f9] mediacodec decoder: Number of profile levels: 0
02-08 16:20:55.690 17280-21241/? D/VLC: [6aaefe68/52f9] avcodec decoder: CPU flags: 0x0000003f
02-08 16:20:55.690 17280-21241/? D/VLC: [6aaefe68/52f9] avcodec decoder: allowing 4 thread(s) for decoding
02-08 16:20:55.700 17280-21241/? D/VLC: [6aaefe68/52f9] avcodec decoder: codec (h264) started
02-08 16:20:55.700 17280-21241/? D/VLC: [6aaefe68/52f9] avcodec decoder: using frame thread mode with 4 threads
02-08 16:20:55.700 17280-21241/? D/VLC: [6aaefe68/52f9] core decoder: using decoder module "avcodec"
02-08 16:20:55.700 17280-21241/? D/VLC: [69a2f408/52f9] core decoder: looking for decoder module matching "mediacodec_jni,iomx,all": 39 candidates
02-08 16:20:55.700 17280-21241/? D/VLC: [69a2f408/52f9] avcodec decoder: CPU flags: 0x0000003f
02-08 16:20:55.710 17280-21241/? D/VLC: [69a2f408/52f9] avcodec decoder: codec (aac) started
02-08 16:20:55.710 17280-21241/? D/VLC: [69a2f408/52f9] core decoder: using decoder module "avcodec"
02-08 16:20:55.710 17280-21241/? D/VLC: [69a0a258/52f9] core demux meta: looking for meta reader module matching "any": 1 candidates
02-08 16:20:55.710 17280-21241/? D/VLC: [69a0a258/52f9] core demux meta: no meta reader modules matched
02-08 16:20:55.710 17280-21241/? D/VLC: [69ae1140/52f9] core input: `rtmp://stream.smcloud.net/live/fokustv' successfully opened
02-08 16:20:55.710 17280-21241/? D/VLC: [69ae1140/52f9] core input: Buffering 0%
02-08 16:20:55.710 17280-21247/? D/VLC: [6aaefe68/52ff] avcodec decoder: available software decoder output format 0 (yuv420p)

Messages from newest Version (6d09369)

02-08 16:24:16.844 1673-684/tv.ulango.ulangotv D/VLC: [ab925740/2ac] core input source: creating demux: access='rtmp' demux='any' location='stream.smcloud.net/live/fokustv' file='(null)'
02-08 16:24:16.845 1673-684/tv.ulango.ulangotv D/VLC: [ab925800/2ac] core demux: looking for access_demux module matching "rtmp": 6 candidates
02-08 16:24:16.845 1673-684/tv.ulango.ulangotv D/VLC: [ab925800/2ac] core demux: None of the shortcuts matched, fall back to any module
02-08 16:24:16.845 1673-684/tv.ulango.ulangotv D/VLC: [ab925800/2ac] core demux: no access_demux modules matched
02-08 16:24:16.845 1673-684/tv.ulango.ulangotv D/VLC: [ab9258d8/2ac] core stream: creating access: rtmp://stream.smcloud.net/live/fokustv
02-08 16:24:16.845 1673-684/tv.ulango.ulangotv D/VLC: [ab9258d8/2ac] core stream: looking for access module matching "rtmp": 23 candidates
02-08 16:24:16.845 1673-684/tv.ulango.ulangotv D/VLC: [ab9258d8/2ac] avio stream: CPU flags: 0x0000003f
02-08 16:24:16.875 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() 258
02-08 16:24:16.875 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() Opening
02-08 16:24:16.875 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() 259
02-08 16:24:17.570 1673-684/tv.ulango.ulangotv D/VLC: [ab9258d8/2ac] avio stream: seekable, size=-38
02-08 16:24:17.570 1673-684/tv.ulango.ulangotv D/VLC: [ab9258d8/2ac] core stream: using access module "avio"
02-08 16:24:17.570 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] core stream: looking for stream_filter module matching "prefetch,cache_read": 13 candidates
02-08 16:24:17.570 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] cache_read stream: Using stream method for AStream*
02-08 16:24:17.570 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] cache_read stream: starting pre-buffering
02-08 16:24:17.627 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] cache_read stream: received first data after 56 ms
02-08 16:24:17.627 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] cache_read stream: pre-buffering done 1024 bytes in 0s - 17 KiB/s
02-08 16:24:17.627 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] core stream: using stream_filter module "cache_read"
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [ab8caf00/2ac] core stream: looking for stream_filter module matching "any": 13 candidates
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [ab8caf00/2ac] core stream: None of the shortcuts matched, fall back to any module
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [ab8caf00/2ac] core stream: no stream_filter modules matched
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [abaaafb8/2ac] core stream_extractor: looking for stream_extractor module matching "any": 0 candidates
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [abaaafb8/2ac] core stream_extractor: no stream_extractor modules
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [ab925740/2ac] core input source: attach of directory extractor failed
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [ab8b4ba8/2ac] core stream: looking for stream_filter module matching "record": 13 candidates
02-08 16:24:17.628 1673-684/tv.ulango.ulangotv D/VLC: [ab8b4ba8/2ac] core stream: using stream_filter module "record"
02-08 16:24:17.629 1673-684/tv.ulango.ulangotv D/VLC: [ab925740/2ac] core input source: creating demux: access='rtmp' demux='any' location='stream.smcloud.net/live/fokustv' file='(null)'
02-08 16:24:17.629 1673-684/tv.ulango.ulangotv D/VLC: [ab6556d8/2ac] core demux: looking for demux module matching "any": 60 candidates
02-08 16:24:17.629 1673-684/tv.ulango.ulangotv D/VLC: [ab9715b8/2ac] core xml reader: looking for xml reader module matching "any": 1 candidates
02-08 16:24:17.629 1673-684/tv.ulango.ulangotv D/VLC: [ab9715b8/2ac] core xml reader: using xml reader module "xml"
02-08 16:24:17.630 1673-684/tv.ulango.ulangotv D/VLC: [ab6556d8/2ac] ts demux: TS module discarded (lost sync)
02-08 16:24:17.630 1673-684/tv.ulango.ulangotv D/VLC: [ab6556d8/2ac] mod demux: MOD validation failed (ext=)
02-08 16:24:17.634 1673-684/tv.ulango.ulangotv D/VLC: [ab6556d8/2ac] core demux: using demux module "ps"
02-08 16:24:17.637 1673-684/tv.ulango.ulangotv D/VLC: [abacfbf8/2ac] core demux meta: looking for meta reader module matching "any": 1 candidates
02-08 16:24:17.637 1673-684/tv.ulango.ulangotv D/VLC: [abacfbf8/2ac] core demux meta: None of the shortcuts matched, fall back to any module
02-08 16:24:17.638 1673-684/tv.ulango.ulangotv D/VLC: [abacfbf8/2ac] core demux meta: no meta reader modules matched
02-08 16:24:17.638 1673-684/tv.ulango.ulangotv D/VLC: [abadf4c8/2ac] core input: `rtmp://stream.smcloud.net/live/fokustv' successfully opened
02-08 16:24:17.642 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() 269
02-08 16:24:17.642 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() SeekableChanged
02-08 16:24:17.642 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() 270
02-08 16:24:17.642 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() PausableChanged
02-08 16:24:17.643 1673-1673/tv.ulango.ulangotv D/VLC/MediaWrapper: Title rtmp://stream.smcloud.net/live/fokustv
02-08 16:24:17.644 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: handleMessage() playerState 1 => 2
02-08 16:24:17.646 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() 260
02-08 16:24:17.646 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: onMediaPlayerEvent() Playing
02-08 16:24:21.653 1673-1673/tv.ulango.ulangotv D/VLCVideoPlayerActivity: handleMessage() FADE_OUT
02-08 16:24:48.980 1673-684/tv.ulango.ulangotv D/VLC: [ab6556d8/2ac] core demux: removing module "ps"
02-08 16:24:48.980 1673-684/tv.ulango.ulangotv D/VLC: [ab8b4ba8/2ac] core stream: removing module "record"
02-08 16:24:48.980 1673-684/tv.ulango.ulangotv D/VLC: [ab86f9e0/2ac] core stream: removing module "cache_read"
02-08 16:24:48.981 1673-684/tv.ulango.ulangotv D/VLC: [ab9258d8/2ac] core stream: removing module "avio"
02-08 16:24:48.985 1673-1673/tv.ulango.ulangotv D/VLC: [abadf4c8/689] core input: Destroying the input for 'rtmp://stream.smcloud.net/live/fokustv'
02-08 16:24:48.986 1673-1673/tv.ulango.ulangotv D/VLC: [aba9c618/689] core audio output: removing module "opensles_android"


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 16 guests