Open AlexLonardi opened 9 years ago
Is there a tool to create such a mjpeg stream for testing? I can't test the your url becasue network is slow. btw, you can send full log. remember to set environment var QTAV_LOG=all
.
Hi Wang, of course you can make your own mjpeg stream with a lot of tool, even with VLC. For instance, you can follow this tutorial: http://www.howtogeek.com/120202/how-to-record-your-desktop-to-a-file-or-stream-it-over-the-internet-with-vlc/ Under the section of "Live-Streaming Your Desktop". Remember to setup a profile which uses MJPEG codec.
Unfortunatly, local streams are always played nicely. I think that you've to introduce some network issues between you and the stream source. For instance, my sources are taken from a VPN with a 3000ms latency, with some packet losses. To simulate this behavior locally you need some network shaping tool, or a proper local network infrastructure. Can't you at all play the above stream URL? I usually leave it about 2 minutes, pressing "Ok" to timeout popups and leaving stream loading (which continues undisturbed over timeout).
I've found some other mjpeg stream URLs for testing: http://rax1.bsn.net/mjpg/video.mjpg?streamprofile=Balanced http://wmccpinetop.axiscam.net/mjpg/video.mjpg http://212.162.177.75/mjpg/video.mjpg http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg http://trackfield.webcam.oregonstate.edu/mjpg/video.mjpg http://50.73.56.89/mjpg/video.mjpg http://construction.sfhs.com/mjpg/video.mjpg http://208.42.203.54:8588/mjpg/video.mjpg
how to play the stream that vlc created?
Simply set as argument to your player the source stream url, that will be something like:
I've noticed that keeping opened some MJPEG streams causes a crash after a while, only in Windows environment (tested both in XP x32 and Win7 x64, every usage under Linux environment instead went fine) and the commits:
I can reproduce this behavior in the player example, tested with both Qt 5.2.1 and 5.3.2.
To reproduce this issue, simply load player (or QMLPlayer, or any) example with an MJPEG stream URL as parameter. After a while (usually <5 minutes) that the stream is playing, the player starts to allocate a lot of memory, until it crashes with a segmentation fault. On console I get a lot of: Warning: "[AVDemuxer] error: Immediate exit requested"
As far as I can see from stacktrace and messages, it's indicative of an error external to the player or QtAV itself, but maybe it can be avoided with a different configuration of the underlying services used. As I mentioned, not all streams reproduces this behavior. I can't get a rule to profile a good stream from a bad, but I think that's something related to the reply latency (and timeout). I got errors with this one: http://webcam.hotelbibionepalace.it/mjpg/video.mjpg (beware, it loads really slowly, over 2 minutes sometimes) and others under a private network, made from different IPCams.
Thanks in advance for any tips about.