Page 1 of 2
ASF + RTSP+TS = problem
Posted: 24 Jul 2017 11:40
by postscripter
Hello!
There was my topic about HTTP streaming, with no solution, so I decided to give a try to RTSP. But everything turned out even worse with it. I can see clear image when the player reads a stream from the same computer (127.0.0.1), but on any other computer in the network I can see an ugly block mess with about 50% of frames lost. Sometimes the real image appears.
What could it be?
Code: Select all
vcl.exe c:\1.asf :sout=#duplicate{dst=rtp{mux=ts,sdp=rtsp://:9090/},dst=display} :no-sout-rtp-sap :no-sout-standard-sap :ttl=25 :sout-keep
Re: ASF + RTSP+TS = problem
Posted: 24 Jul 2017 15:45
by postscripter
Oh, the same with h264... and other files with, or without transcoding or/and TS muxing. That's strange
Re: ASF + RTSP+TS = problem
Posted: 24 Jul 2017 18:51
by Jean-Baptiste Kempf
You need to transcode, I'm afraid.
Re: ASF + RTSP+TS = problem
Posted: 25 Jul 2017 04:43
by postscripter
Well, I tried to transcode. Looks like this:
Code: Select all
vlc c:\torchwood.mkv :sout=#transcode{vcodec=h264,vb=5000,width=320,height=240,fps=25}:duplicate{dst=rtp{sdp=rtsp://:9090/},dst=http{mux=asf,dst=:8080},dst=display} :no-sout-rtp-sap :no-sout-standard-sap :ttl=25 :sout-keep
Re: ASF + RTSP+TS = problem
Posted: 25 Jul 2017 04:52
by postscripter
Anyway, when I launch two copies of VLC on the same PC - transmitter and receiver - the image is clear. Problems begins when the receiving VLC is network-attached.
The network is gigabit, and the stream is 2-5 mbit at most. Network quality is okay, it can handle 900 real mbits with no losses. MTU is 1500, and the RTSP packets are about 1370. Unfortunately I didn't manage to count their number precisely...
Re: ASF + RTSP+TS = problem
Posted: 25 Jul 2017 04:59
by postscripter
1)Checked with mobile VLC and Wi-Fi. Mobile version of VLC plays the same RTSP stream just perfect!!
2) Checked with another PC and another network (cheap hub 100 mbit). Image is much better with just a small artefacts.
So, is it network-related problem? The network where I see problems is based on cisco devices and as I mentioned before, they can handle a huge amount of packets with no loss.
Re: ASF + RTSP+TS = problem
Posted: 31 Jul 2017 06:08
by postscripter
God save the queen!
Re: ASF + RTSP+TS = problem
Posted: 31 Jul 2017 06:11
by postscripter
Re: ASF + RTSP+TS = problem
Posted: 02 Aug 2017 19:16
by Jean-Baptiste Kempf
But why mux in asf and not in ts?
Re: ASF + RTSP+TS = problem
Posted: 03 Aug 2017 04:10
by postscripter
Asf is just a source file. I will mux to anything you advise)) But there is no difference. Well, wait, there is. Asf files MUST be muxed to TS, or else they won't play. For other formats it's all the same, I checked.
Actually, I've solved this problem for me. Versions 2.1.5 and older works!! No garbage, clear and stable picture.
Also versions 3.0.0 and higher works too.
So, it should be a bug in VLC. I'm surprised, no one had noticed it for years...
Re: ASF + RTSP+TS = problem
Posted: 29 Nov 2017 18:34
by Jean-Baptiste Kempf
Does it work fine in 3.0 ? the last nightly build?
Re: ASF + RTSP+TS = problem
Posted: 29 Nov 2017 22:13
by postscripter
I'll be unable to check it till february due to my vacation. As i said, 03.08.2017 nightly build of 3.0 had already had it fixed (but i've preferred old 1.7 for production due to another strange things in 3.0, such as incomprehensible manner of caching I could not solve, write me if you need details)
Re: ASF + RTSP+TS = problem
Posted: 04 Dec 2017 13:22
by Jean-Baptiste Kempf
I'll be unable to check it till february due to my vacation. As i said, 03.08.2017 nightly build of 3.0 had already had it fixed (but i've preferred old 1.7 for production due to another strange things in 3.0, such as incomprehensible manner of caching I could not solve, write me if you need details)
Staying on older versions is not going to solve anything...
Re: ASF + RTSP+TS = problem
Posted: 04 Dec 2017 18:57
by postscripter
Jean-Baptiste Kempf
Old tools were better optimized for old PC's requirements. And new stuff usually have a lot of trash, workarounds and legacy in code. There's nothing wrong with using ole' good "classic".
About VLC... I have a collection of it's distributions. Every single release from 1.6 to 3.0. Tried them all. Only 1'st branch works for me. Cause then in 2.0 the telnet module gone (
https://trac.videolan.org/vlc/ticket/8961), then in 2.x (not sure about number) you fixed telnet, but in the same release broke RTSP (could they be related issues?). Then you fixed RTSP in 3.0, but (unfortunately for me) changed caching algorithm.
About caching.. It's difficult to explain, but imagine a device.. It's a scientific device with camera. It produce ASF video files in realtime. I've shared it as an SMB folder and made up a powershell script, which waits for new files and then launches broadcasting with VLC. So, the camera writes, VLC reads. VLC 1.x and 2.x can do it for hours. But ver. 3.0 reads till the end of the file and then stops, despite the fact that, to the moment when it stops, the file is already appended with the new portion of data.
It doesn't look like a bug I can post in bugtracker and you can reproduce. So, no other options for me, except using 1.x branch or moving to linux, or digging into the code in order to fix it by myself))
Re: ASF + RTSP+TS = problem
Posted: 05 Dec 2017 01:07
by Jean-Baptiste Kempf
Jean-Baptiste Kempf
Old tools were better optimized for old PC's requirements. And new stuff usually have a lot of trash, workarounds and legacy in code. There's nothing wrong with using ole' good "classic".
Yes, security issues.
About VLC... I have a collection of it's distributions. Every single release from 1.6 to 3.0. Tried them all. Only 1'st branch works for me. Cause then in 2.0 the telnet module gone (
https://trac.videolan.org/vlc/ticket/8961), then in 2.x (not sure about number) you fixed telnet, but in the same release broke RTSP (could they be related issues?). Then you fixed RTSP in 3.0, but (unfortunately for me) changed caching algorithm.
About caching.. It's difficult to explain, but imagine a device.. It's a scientific device with camera. It produce ASF video files in realtime. I've shared it as an SMB folder and made up a powershell script, which waits for new files and then launches broadcasting with VLC. So, the camera writes, VLC reads. VLC 1.x and 2.x can do it for hours. But ver. 3.0 reads till the end of the file and then stops, despite the fact that, to the moment when it stops, the file is already appended with the new portion of data.
It doesn't look like a bug I can post in bugtracker and you can reproduce. So, no other options for me, except using 1.x branch or moving to linux, or digging into the code in order to fix it by myself))
And you don't put the logs of what happens when it stops?
Re: ASF + RTSP+TS = problem
Posted: 05 Dec 2017 13:50
by postscripter
Jean-Baptiste Kempf
Logs.. I didn't think about it. Sorry. Actually I'm still not sure if console VLC can make any logs, except stderr console output...
Well, there should be something like.. "end of file reached", shouldn't it?
Re: ASF + RTSP+TS = problem
Posted: 15 Jan 2018 10:15
by Jean-Baptiste Kempf
VLC always output logs with -vv
Re: ASF + RTSP+TS = problem
Posted: 15 Jan 2018 12:07
by postscripter
If I got you right, you're interested in getting logs from 3.0 related to different caching behaviour? That would be not an easy task, to build that test environment again.
Or you mean logs from the current release branch related to unusable RTSP?
Re: ASF + RTSP+TS = problem
Posted: 17 Jan 2018 17:13
by Jean-Baptiste Kempf
If you see an issue with 3.0, we need logs in 3.0.
Re: ASF + RTSP+TS = problem
Posted: 17 Jan 2018 21:53
by postscripter
If you see an issue with 3.0, we need logs in 3.0.
Just downloaded latest nightly, which happened to be 4.0 already (surprise!). But the telnet module is missing there:
Code: Select all
main debug: looking for interface module matching "telnet,none": 16 candidates
lua error: Couldn't find lua interface script "telnet".
main debug: no interface modules matched
main error: no suitable interface module
main error: interface "telnet,none" initialization failed
Re: ASF + RTSP+TS = problem
Posted: 17 Jan 2018 22:17
by postscripter
But I've got logs from vlc-3.0.0-20170728-0255-git-win32. Full log:
https://yadi.sk/d/ZB755DwH3RYnBW
File cache set to 100 ms (reasonable minimum)
Test file temp.asf is generated in real time by ffmpeg, that's how I imitate the real environment.
$Audio = ""
$Video = "VF0520 Live! Cam Sync"
$Fil = "c:\temp\temp.asf"
$Exec = "ffmpeg"
$Cmd = "-report -f dshow -rtbufsize 2M -i %aud% %vid% -r 25 -vcodec wmv2 -b 2M -minrate 2M -maxrate 2M -bufsize 1M -acodec wmav2 `"$Fil`""
core debug: Creating an input for 'temp.asf'
core debug: using sout chain=`duplicate{dst=rtp{mux=ts,sdp=rtsp://:9090/},dst=http{mux=asf,dst=:8080},dst=display}'
...
core debug: `file:///C:/Temp/temp.asf' successfully opened
...
asfpacket debug: 1 payloads
asfpacket debug: payload(1) stream_number:1 media_object_number:1 media_object_offset:0 replicated_data_length:8 payload_data_length 3174
asfpacket debug: extpts=-1 pkttime=0 st=0
asfpacket debug: 1 payloads
asfpacket debug: payload(1) stream_number:1 media_object_number:1 media_object_offset:3174 replicated_data_length:8 payload_data_length 3174
asfpacket debug: extpts=-1 pkttime=0 st=0
asfpacket debug: 1 payloads
asfpacket debug: payload(1) stream_number:1 media_object_number:1 media_object_offset:6348 replicated_data_length:8 payload_data_length 3174
asfpacket debug: extpts=-1 pkttime=0 st=0
asfpacket debug: 1 payloads
...
asfpacket debug: payload(1) stream_number:1 media_object_number:49 media_object_offset:9175 replicated_data_length:8 payload_data_length 3174
asfpacket debug: extpts=-1 pkttime=1920000 st=1920
asfpacket debug: 1 payloads
asfpacket debug: payload(1) stream_number:1 media_object_number:49 media_object_offset:12349 replicated_data_length:8 payload_data_length 3174
asfpacket debug: extpts=-1 pkttime=1920000 st=1920
asfpacket debug: 2 payloads
asfpacket debug: payload(1) stream_number:1 media_object_number:49 media_object_offset:15523 replicated_data_length:8 payload_data_length 856
asfpacket debug: extpts=-1 pkttime=1920000 st=1920
asfpacket debug: payload(2) stream_number:1 media_object_number:50 media_object_offset:0 replicated_data_length:8 payload_data_length 2298
asfpacket debug: extpts=-1 pkttime=1960000 st=1920
asfpacket debug: 1 payloads
asfpacket debug: payload(1) stream_number:1 media_object_number:50 media_object_offset:2298 replicated_data_length:8 payload_data_length 3174
asfpacket debug: extpts=-1 pkttime=1960000 st=1960
asfpacket warning: cannot peek while getting new packet, EOF ?
core debug: Buffering 0%
core debug: switching to sync mode
core debug: adding a new sout input for `WMV2` (sout_input: 05be6ae0)
core debug: Buffering 100%
duplicate debug: duplicated a new stream codec=WMV2 (es=1 group=0)
core debug: Stream buffering done (200 ms in 2 ms)
core debug: adding a new input
mux_ts debug: adding input codec=WMV2 pid=100
mux_ts debug: new PCR PID is 100
duplicate debug: - added for output 0
core debug: adding a new input
asf debug: adding input
duplicate debug: - added for output 1
core debug: looking for video decoder module matching "any": 16 candidates
avcodec debug: using ffmpeg Lavc57.100.104
avcodec debug: CPU flags: 0x000853db
avcodec debug: allowing 4 thread(s) for decoding
avcodec debug: available software decoder output format 0 (yuv420p)
avcodec debug: codec (wmv2) started
core debug: using video decoder module "avcodec"
duplicate debug: - added for output 2
core debug: Decoder wait done in 10 ms
core debug: looking for text renderer module matching "any": 3 candidates
freetype warning: DirectWrite initialization failed. Falling back to GDI/Uniscribe
core debug: using text renderer module "freetype"
core debug: looking for video converter module matching "any": 24 candidates
swscale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality)
core debug: using video converter module "swscale"
core debug: looking for video converter module matching "any": 24 candidates
yuvp debug: YUVP to YUVA converter
core debug: using video converter module "yuvp"
core debug: Deinterlacing available
core debug: deinterlace -1, mode auto, is_needed 0
core debug: looking for vout window module matching "any": 3 candidates
core debug: no vout window modules matched
core debug: Opening vout display wrapper
core debug: looking for vout display module matching "any": 12 candidates
direct3d9 debug: Using Direct3D9 Extended API!
direct3d9 debug: creating Vout EventThread
direct3d9 debug: Win32VoutCreateWindow
direct3d9 debug: inclinometer not found. (hr=0x80070490)
direct3d9 debug: created video sub-window
direct3d9 debug: Vout EventThread running
direct3d9 debug: disabling screen saver
direct3d9 debug: Direct3d9 Device: Intel(R) HD Graphics 4000 32902 354 9
direct3d9 warning: trying surface pixel format: YV12
direct3d9 debug: selected surface pixel format is YV12
direct3d9 debug: DirectXUpdateRects source offset: 0,0 visible: 640x480
direct3d9 debug: DirectXUpdateRects image_src coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_src_clipped coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_dst coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_dst_clipped coords: 0,0,640,480
direct3d9 debug: Direct3D created texture: 640x480
direct3d9 debug: Direct3D9 scene created successfully
direct3d9 debug: Direct3D9 device adapter successfully initialized
core debug: using vout display module "direct3d9"
core debug: original format sz 640x480, of (0,0), vsz 640x480, 4cc I420, sar 1:1, msk r0x0 g0x0 b0x0
core debug: VoutDisplayEvent 'window state' 0
core debug: VoutDisplayEvent 'window state' 0
direct3d9 debug: DirectXUpdateRects source offset: 0,0 visible: 640x480
avcodec warning: plane 0 not aligned: disabling direct rendering
direct3d9 debug: DirectXUpdateRects image_src coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_src_clipped coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_dst coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_dst_clipped coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects source offset: 0,0 visible: 640x480
direct3d9 debug: DirectXUpdateRects image_src coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_src_clipped coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_dst coords: 0,0,640,480
direct3d9 debug: DirectXUpdateRects image_dst_clipped coords: 0,0,640,480
core debug: VoutDisplayEvent 'resize' 640x480
core warning: picture is too late to be displayed (missing 84 ms)
core warning: picture is too late to be displayed (missing 67 ms)
core warning: picture is too late to be displayed (missing 29 ms)
core debug: auto hiding mouse cursor
asf debug: Asf muxer creating header
core debug: VoutDisplayEvent 'mouse button' 0 t=8
core debug: EOF reached
core debug: VoutDisplayEvent 'mouse button' 0 t=9
core debug: killing decoder fourcc `WMV2'
core debug: removing module "copy"
core debug: removing a sout input (sout_input: 05be6ae0)
mux_ts debug: removing input pid=100
mux_ts debug: freeing video PID 100
core warning: no more input streams for this mux
asf debug: removing input
core warning: no more input streams for this mux
core debug: killing decoder fourcc `WMV2'
core debug: removing module "avcodec"
core debug: saving a free vout
core debug: reusing provided vout
core debug: removing module "asf"
asf debug: freing asf object 0x8cabdca1-0xa947-0x11cf-0x8ee400c00c205365
asf debug: freing asf object 0x5fbf03b5-0xa92e-0x11cf-0x8ee300c00c205365
asf debug: freing asf object 0xd2d0a440-0xe307-0x11d2-0x97f000a0c95ea850
asf debug: freing asf object 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365
asf debug: freing asf object 0x86d15240-0x311d-0x11d0-0xa3a400a0c90348f6
asf debug: freing asf object 0x75b22630-0x668e-0x11cf-0xa6d900aa0062ce6c
asf debug: freing asf object 0x75b22636-0x668e-0x11cf-0xa6d900aa0062ce6c
core debug: Program doesn't contain anymore ES
.....
Re: ASF + RTSP+TS = problem
Posted: 20 Jan 2018 19:33
by Jean-Baptiste Kempf
logs from a version from 6 month ago? come on.
Re: ASF + RTSP+TS = problem
Posted: 27 Jan 2018 23:46
by postscripter
logs from a version from 6 month ago? come on.
I'm trying my best, see:
Just downloaded latest nightly, which happened to be 4.0 already (surprise!). But the telnet module is missing there:
Code: Select all
main debug: looking for interface module matching "telnet,none": 16 candidates
lua error: Couldn't find lua interface script "telnet".
main debug: no interface modules matched
main error: no suitable interface module
main error: interface "telnet,none" initialization failed
And it's utterly indispensable to have a telnet module
Cause I use powershell scripting in order to prepare and start broadcasting synchronously.
Re: ASF + RTSP+TS = problem
Posted: 28 Jan 2018 09:34
by RĂ©mi Denis-Courmont
The so-called telnet module was folded into the Remote Control interface years ago.
Re: ASF + RTSP+TS = problem
Posted: 02 Feb 2018 06:31
by postscripter
Remote control does not work either, or the wiki recipe is outdated.
vlc.exe --intf qt --extraintf rc --rc-host=127.0.0.1:4212 --qt-start-minimized
core debug: looking for interface module matching "rc,none": 16 candidates
oldrc debug: base: (null), port: 0
core debug: net: listening to * port 0
core error: Cannot resolve port 0 :
oldrc warning: can't listen to (null) port 0
core debug: no interface modules matched
core error: no suitable interface module
core error: interface "rc,none" initialization failed
Both 3.0/4.0