Why ffmpeg/mplayer2 play sloppy something that vlc plays well? - ffmpeg

While trying to play with mplayer2 or stream with ffmpeg, the video has a slight delay about every 12 seconds. Sometimes leading to distorted picture. But the same input plays back perfectly with vlc. What could be the reason for this?
mplayer2 shows it's infamous "YOUR SYSTEM IS TOO SLOW TO PLAY THIS", but neither of its suggestions make difference.

Related

ffmpeg: transmission problems / artifacts in rtsp screen grab - might be a WiFi problem

In short: Is there a way to "force" ffmpeg to not save a grabbed frame if there are transmission problems? Or any other software that does the same and I just don't know of?
Long story:
Updating my house surveillance from almost 10 years old DCS-932L cameras to Tapo C100 Cameras, I changed the image delivery method from ftp push to rtsp grab via ffmpeg.
I had written a program in C++ to check for "bad" pictures from the old cameras, where parts of the picture tended to be simply black once every minute or so (I'm grabbing a pic every 2 seconds). The Tapo C100 doesn't feature ftp-push, thus I tried (after a few days trying)
ffmpeg.exe -y -i rtsp://user:pass#10.0.0.%ld:554/stream1 -vframes 1 %scamera\rtsp.jpg -loglevel quiet
This works absolutely perfect in my main house, which features a Fritz!Box 7590 and a set of Fritz!Powerline (510/and two 540e) repeaters, plus one WiFi repeater Fritz 600) as my phone line and the router are in the basement.
In my holiday home, though, it doesn't. The Wifi is managed by a Hybrid DSL/5G - box I have no alternative to, which is a Huawei DN9245W and works as DHCP Server, because this is almost impossible to change. Everything "real" is managed by another Fritz!Box 7590, connected via ethernet, and another set of Fritz!Powerline 510 and two 540e repeaters plus half a dozen Wifi Repeaters, mostly Fritz! 310, 450E and 600. The house was partially built with local stones, which are very iron-y, and there's a lot of metallized glass. Full set is show in Image
Now, this does produce different artifacts, about two per minute or in every 15th picture, see
Image with artifacts No. 1
Thinking this might be a transmission problem, I tried forcing the streamgrab via TCP, because while rtsp doesn't have error correction, TCP does:
ffmpeg.exe -rtsp_transport tcp -i
rtsp://user:pass#10.0.0.%ld:554/stream1 -y -f image2 -update 1 -r
1 -vframes 1 -qscale:v 30 %scamera\rtsp.jpg -loglevel quiet
Which didn't change the artifacts much, see Image with artifacts No. 2
The house now has a total of 12 Cameras, six of which are each "managed" by an older Dell Optiplex Desktop bought used off ebay with an i3 or i5 processor from about 2015, which goes to about 65% load. My software will check if the grabbed picture is finished saving (to RAMdisk), rename it, check if there are artifacts, if so, drop it, if not, convert to bitmap and then compare it to previous image, guess if there's a change, mark that change with a rhombus and rate it, save that as a jpeg file, and then some other stuff that's not relevant here. See: Image of my program running with six cameras
I did try grabbing keyframes only, but a bunny or deer or burglar hopping through my property doesn't produce a keyframe, so that turned out to be missing the point.
I'm out of ideas here. It does work flawlessly in the main house. It doesn't in the holiday house. I can hardly install more repeaters; I already tried mesh and not-mesh, and the problem isn't exactly wifi overload, because even with just one camera running, it still persists. In certain places. Some have no problems. Reasons? No clue. I really hope someone has a good idea.
I got a couple of these cameras and working on what I'd call a poor quality wifi network I had similar problems until I switched the camera via the app to 1080P mode. After that the frames seem to fine.
My camera defaulted to 720P mode plus the always available? 320P stream2.
My $0.02. Thanks for your post BTW.

MoviePy : Slow down the rendering of videos

I actually try to display a video with Python and MoviePy, but when the script run the video, it is playing with my_clip.preview() but seem like at 1FPS.
When I check inside my code the FPS of my video, they said me 30/sec. For more details, the script running on a Raspberry Pi 4 Model B+ (2GB RAM / 1.5GHZ).
I have check the processor and it's good, also when I try to run the video from VLC or OMXPlayer everything is okay. The video hasn't any lag or bad FPS. So, I don't know why MoviePy, which normally use the default player(VLC here), slow down my video render if with VLC player it doesn't happen.
I can provide some code if needed, but it's a classic moviePy program.
I have tried my code on my Mac OS and moviePy doesn't slow down the video. On my code, with my_clip.fps, the FPS are the same than when I execute the code on my Mac.
Probably the mistake come from to Raspberry ?
I would know what happen and how to solve, if possible, this problem. Thanks
The raspberry pi probably doesn't have enough speed to render 30fps every second so it only manages to make 1 frame per seconds and that is what you are seeing.

Animated GIF to video with ffmpeg - wrong timing

I'm trying to convert an animated GIF to video with ffmpeg, but there's a strange problem: the time delays of each frame seem to be off by one frame.
For example, if the frame #1 is supposed to be shown for 2000 ms and the frames from #2 to #10 are supposed to be shown for 100 ms each, in the resulting video it immediately skips to the frame #2 which is shown for 2000 ms instead :P
Is this some kind of a bug? Or am I doing something wrong?
Here's my command line:
ffmpeg –i Mnozenie_anim_deop.gif Mnozenie_anim.mp4
(Aside: why doesn't the "-" show up in code blocks unless I replace it with "–"?)
so nothing extraordinary, just the defaults. (Unless this is the root of the problem? Maybe my defaults are bad, and I need to specify some magic options?)
This problem seems to appear for any video formats except MKV, and when I play these files in mplayer, they all behave that way except MKV.
But when I open them in kdenlive (a non-linear video editing program), the problem appears in all of them, including MKV (which is strange, because it plays back just fine in mplayer :q ).
I tried converting the same exact file with this online converter here:
https://ezgif.com/gif-to-mp4
and there is no problem with its output – it plays back fine both in mplayer and when imported to kdenlive, so I guess they must have been using some magic command line options that I'm missing.
Any ideas what can be wrong and how to track down the culprit?
Edit: Here's a sample animated GIF file I'm trying to convert:
http://nauka.mistu.info/Matematyka/Algebra/Szeregi/Mnozenie_anim.gif
and the MP4 file that I generated from it which demonstrates this problem:
http://sasq.comyr.com/Stuff/Mnozenie_anim.mp4
As you can see, the fade in starts prematurely but stops for a couple of seconds instead of waiting for a couple of seconds BEFORE the fade in begins.

Can I get VLC or other media player to output information to an external program in real time?

My scenario is this:
I want to play a TV show or a movie on some media player. I want to be able to run a custom program that can get real time info - for example, the current timestamp, percentage of video left etc. - from this player.
My aim is that with this program running, I can annotate my video watching experience. Maybe take screencaps at the touch of a button, or mark a timestamp as the onset of a joke or something like that. Can media players be queried for this information while they're playing video? I imagine VLC would be the best bet here.
You can talk to VLC through the VLC HTTP API:
http://wiki.videolan.org/VLC_HTTP_requests
In particular /requests/status.xml has all the playback information that is desired.

convert swf to video in Flash Pro CS5.5

I have searched the web and here for answers but so far, the links are dead, the how-tos no longer work for the version I have, or there are no answers.
I have a swf animation with full sound and scripting that I'd like to convert into a video or an flv. For some reason, the site I post on screws with my timeline somehow (the timing is off, sounds no longer match up properly with the text) so I thought a video would work better.
I tried using File>Export>Export to movie to resolve this. I tried to export to an AVI. When it's scaled down to 300x400 it works just fine (though it looks like total crap). However when I export at the full size, using full colors no compression, I get this.
I'm not sure what to do with it. It's slanted with lines through it and grayscale. VLC player is the only thing that will run it too. WMP dies with errors, saying it's an invalid or corrupt format. Funny thing is, the thumbnail for the video is exactly what it should look like.
I'm not sure what to do with it. Converting it to an .flv is just fine. I have a video converter for that. I just can't get it to convert to flv or even a movie type properly.
Why is it doing this to my video? Is there something better to use to convert? Is there a good one that won't plaster a giant watermark over it?
image being totally screwed up.
Flabaco is an online SWF to video converter. To answer your questions: It's free, doesn't impose banners or watermarks.
I have a swf animation with full sound and scripting that I'd like to
convert into a video or an flv.
Flabaco converts scripted content. It preserves the frame rate (fps) & color. It's capable of generating professional quality HD content.
It doesn't convert sound. Nonetheless the converted quality is good and you might be able to get by using another video tool to add sound to the converted video.
You can use the online converter app here: www.Flash-Banner-Converter.com
PS: There are some older posts on StackOverflow related to your question. Just search SWF to video / Flabaco.
Kayo,
FLABACO (FLAshBAnnerCOnverter)

Resources