Comments (21)
Hi,
Is if 6 seconds in the beginning of the stream, i.e. the first frame appears 6 seconds later after you press the Play button?
from webeye.
To build the C++ part of the control you will need to build FFmpeg and boost first. The instructions are here: #33 (comment)
from webeye.
from webeye.
You could try your stream with ffplay: https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20171128-86cead5-win64-static.zip
from webeye.
There is no delay on the StreamPlayer. I run my cameras into Blue Iris and I use the StreamPlayer control to play the video from BI on the desktop. Within a quarter of a second from the time motion is detected, the video begins to play. However, I first used StreamPlayer to play the video directly from the camera. When you try that, the video does not fully display until the I frame shows up. That just doesn't work. But the problem isn't with StreamPlayer control, it is with the process of starting the camera and trying to sync the video. And I doubt it would make a difference as to which camera you use. Not sure about that. But I did have the same problem with 5 different brands of cameras.
from webeye.
@jacobbo in theory, could I force the frame queue (ConcurrentQueue queue_
) to skip "stale" frames e.g. after pop I empty it (or leave one frame at most) and only after that I take sleep_for(interframeDelay)
?
This way I might skip some frames but it would always show the latest frame? What do you think? I will try to recompile StreamPlayer and replace .dll
from webeye.
Your idea is that for the first 6 seconds the stream has 'stale' frames, isn't? But then it's not a control's issue, that's a stream's issue.
Regarding your question, yes, you can skip frames, but this will be a very custom solution and you need a criteria based on which you will be skipping frames.
from webeye.
Sorry to bother you but I would like to try out that solution but I cannot get ffmpeg to compile. I've followed the instructions you provided as well as their guide https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC
$ make CC libavformat/mxfenc.o mxfenc.c libavformat/mxfenc.c(1447): error C2059: syntax error: '}' make: *** [libavformat/mxfenc.o] Error 2
Which seems like c99 syntax problem. But they mentioned this is something to worry about only on <2012 MSVC
Do you have any advice maybe how to simplify the build procedure? I tried to find pre-compiled binaries of boost/ffmpeg and try with them.
from webeye.
I do not remember such an issue. Which tools are you using to build it? I successfully build it using MSVC 2015 + MSYS + YASM x64.
Pre-compiled binaries will not work, as I use static linking for FFmpeg.
from webeye.
I fixed the compilation issue and managed to compile ffmpeg with ./configure --toolchain=msvc --arch=amd64 --target-os=win64 --enable-version3 --enable-static --disable-shared --disable-programs --disable-doc
and make
I've added everything into VC++ Directories (Library/Include) for Release x64. Still I cannot get it to compile, it says Severity Code Description Project File Line Suppression State Error LNK1104 cannot open file 'libpostproc.a' StreamPlayer C:\Users\Hrvoje\work\WebEye\StreamPlayerControl\StreamPlayer\StreamPlayer\LINK
.
I cannot find .a files anywhere. I would expect them after compiling ffmpeg with the static option :(
from webeye.
That's correct, the .a files should be generated by make.
from webeye.
btw, have you tried ffplay?
from webeye.
I did, there is a lag also (2 seconds).
Tail:
[h264 @ 000000000289b720] concealing 1245 DC, 1245 AC, 1245 MV errors in I frame
[rtsp @ 00000000027e8b20] max delay reached. need to consume packet
[rtsp @ 00000000027e8b20] RTP: missed 34 packets
[h264 @ 00000000038835e0] negative number of zero coeffs at 18 45
[h264 @ 00000000038835e0] error while decoding MB 18 45
[h264 @ 00000000038835e0] concealing 2791 DC, 2791 AC, 2791 MV errors in I frame
[rtsp @ 00000000027e8b20] max delay reached. need to consume packet
[rtsp @ 00000000027e8b20] RTP: missed 25 packets
[h264 @ 0000000003883d60] corrupted macroblock 51 54 (total_coeff=-1)
[h264 @ 0000000003883d60] error while decoding MB 51 54 0B f=1/1
[h264 @ 0000000003883d60] concealing 1678 DC, 1678 AC, 1678 MV errors in I frame
[rtsp @ 00000000027e8b20] max delay reached. need to consume packet
[rtsp @ 00000000027e8b20] RTP: missed 36 packets
[h264 @ 0000000003a20380] corrupted macroblock 8 43 (total_coeff=-1)
[h264 @ 0000000003a20380] error while decoding MB 8 43
[h264 @ 0000000003a20380] concealing 3041 DC, 3041 AC, 3041 MV errors in I frame
[rtsp @ 00000000027e8b20] max delay reached. need to consume packet
[rtsp @ 00000000027e8b20] RTP: missed 30 packets
[h264 @ 0000000003ce56a0] negative number of zero coeffs at 38 47
[h264 @ 0000000003ce56a0] error while decoding MB 38 47
[h264 @ 0000000003ce56a0] concealing 2531 DC, 2531 AC, 2531 MV errors in I frame
35.56 M-V: -0.112 fd= 7 aq= 0KB vq= 0KB sq= 0B f=1/1
from webeye.
Running ffplay -rtsp_transport tcp -probesize 32
makes it better.
from webeye.
I see. The control supports setting the rtsp_transport option, but doesn't support the probesize option.
You could try to create a custom build with hardcoded probesize setting. I think, you just need to add it to the dictionary in the Stream::GetOptions() method
from webeye.
But I don't understand ffmpeg, I did configure ...
, make
, make install
shouldn't .a files be in the same directory (under respective subdirs)?
from webeye.
'make install' is not needed, just 'make' is enough in my case. Also, make produces logging info, you could forward it to a file and find out what's going on.
from webeye.
Ah libpostproc
was the problem. It's GPL so I had to add --enable-gpl
to configure! You can update it in that procedure if you want...
Let't me try probe now!
from webeye.
Probe helped a little bit but in the end I removed that sleep and now it works <1s lag!
from webeye.
You mentioned that some other players handle your stream correctly, i.e. without the lag.
I'm wondering what are they? Software that comes with camera?
from webeye.
from webeye.
Related Issues (20)
- Gray screen when play H.265 stream HOT 1
- Could not load file or assembly WebEye.Stream.Win32 HOT 11
- memory Leak HOT 1
- Is it possible to support switching between the front / back cameras on a tablet device? HOT 7
- image is horizontally flipped HOT 8
- GetLocalStreams error HOT 4
- 'System.BadImageFormatException' in mscorlib.dll: Could not load file or assembly 'WebEye.Stream.Win32.dll' HOT 4
- I Do All things Ok, but my online stream http don't have voice HOT 4
- Add a License.md
- Video delay of 2 seconds HOT 4
- If i create the control dinamically it stays blank HOT 1
- Error playing RTMPS stream HOT 1
- Missing WebEye.Stream.Win32 and WebEye.Stream.x86 HOT 1
- streaming errors in ffmpeg 4.2.1
- WebEye project from Github HOT 1
- Problem with the dll for 32-bit architectures HOT 1
- Memory Leak / Stream not stopping HOT 1
- Increase the video speed
- Crash with Access Violation on resume after failed stream
- debo instalar algo antes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webeye.