
Recherche avancée
Sur d’autres sites (2180)
-
Javascript sync images
26 septembre 2021, par Ruan MattI'm studying about FPS, animations, image processing in order to get into the game development world.


I took a video and extract each frame into a .jpg image, and I want to run these images, side by side, in the same sync as the original video


You can test at this link => https://jsfiddle.net/ruanmatt144/267erymL/2/


The problem : The video FPS is 30, but even if I put 1000/30, or any other value that refers to the original FPS, it doesn't work ! It doesn't stay in sync. setTimeout has a limit on decimal places that I don't know about ?


Video timestamp for each frame => https://unity-animation.ztech.gq/timestamp.txt


How can I sync those images following the original video timestamp ? Thank you.


var arr = Array();
var v = 0;
var v2 = 0;
var k = 0;

(function getImages(i) {
 setTimeout(function() {
 v++;
 var r = Math.random();
 loadImage("https://unity-animation.ztech.gq/frames/out-" + v + ".jpg?v=" + r);
 arr.push("https://unity-animation.ztech.gq/frames/out-" + v + ".jpg?v=" + r);

 if (--i) getImages(i);
 }, 30)
})(20000);



const loadImage = src =>
 new Promise((resolve, reject) => {
 const img = new Image();
 img.onload = () => resolve(img);
 img.src = src;
 }) 
;

var imgArray = new Array();
setTimeout(function() {
 (function runVideo(i) {
 setTimeout(function() {
 v2++;
 imgArray[v2] = new Image();
 document.getElementById('load').appendChild(imgArray[v2]);

 imgArray[v2].src = arr[v2];
 imgArray[v2].classList.add("overlayImage");
 imgArray.shift();
 var parent = document.querySelector("#load");
 [...parent.children].slice(0,-10).forEach(parent.removeChild.bind(parent));
 var last = document.querySelector('#load img:last-child').getAttribute("src");
 var _final = last.substring(
 last.indexOf("-") + 1, 
 last.lastIndexOf(".jpg")
 );
 arr.shift();
 if (--i) runVideo(i);
 }, 90) // <== the problem is here, which value I must use?
 })(38194);
 document.getElementById("video").play();
}, 20000);



-
Dreamcast Operating Systems
16 septembre 2010, par Multimedia Mike — Sega DreamcastThe Sega Dreamcast was famously emblazoned with a logo proudly announcing that it was compatible with Windows CE :
It’s quite confusing. The console certainly doesn’t boot into some version of Windows to launch games. Apparently, there was a special version of CE developed for the DC and game companies had the option to leverage it. I do recall that some game startup screens would similarly advertise Windows CE.
Once the homebrew community got ahold of the device, the sky was the limit. I think NetBSD was the first alternative OS to support the Dreamcast. Meanwhile, I have recollections of DC Linux and LinuxDC projects along with more generic Linux-SH and SH-Linux projects.
DC Evolution hosts a disc image available for download with an unofficial version of DC Linux, assembled by one Adrian O’Grady. I figured out how to burn the disc (burning DC discs is a blog post of its own) and got it working in the console.
It’s possible to log in directly via the physical keyboard or through a serial terminal provided that you have a coder’s cable. That reminds me– my local Fry’s had a selection of USB-to-serial cables. I think this is another area that is sufficiently commoditized that just about any cable ought to work with Linux out of the box. Or maybe I’m just extrapolating from the experience of having the cheapest cable in the selection (made by io connect) plug and play with Linux.
Look ! No messy converter box in the middle as in the Belkin case. The reason I went with this cable is that the packaging claimed it was capable of up to 500 Kbits/sec. Most of the cables advertised a max of 115200 bps. I distinctly recall being able to use the DC coder’s cable at 230400 bps a long time ago. Alas, 115200 seems to be the speed limit, even with this new USB cable.
Anyway, the distribution is based on a 2.4.5 kernel circa 2001. I tried to make PPP work over the serial cable but the kernel doesn’t have support. If you’re interested, here is some basic information about the machine from Linux’s perspective, gleaned from some simple commands. This helps remind us of a simpler time when Linux was able to run comfortably on a computer with 16 MB of RAM.
Debian GNU/Linux testing/unstable dreamcast ttsc/1
dreamcast login : root
Linux dreamcast 2.4.5 #27 Thu May 31 07:06:51 JST 2001 sh4 unknownMost of the programs included with the Debian GNU/Linux system are
freely redistributable ; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyrightDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.dreamcast : # uname -a
Linux dreamcast 2.4.5 #27 Thu May 31 07:06:51 JST 2001 sh4 unknowndreamcast : # cat /proc/cpuinfo
cpu family : SH-4
cache size : 8K-byte/16K-byte
bogomips : 199.47Machine : dreamcast
CPU clock : 200.00MHz
Bus clock : 100.00MHz
Peripheral module clock : 50.00MHzdreamcast : # top -b
09:14:54 up 14 min, 1 user, load average : 0.04, 0.03, 0.03
15 processes : 14 sleeping, 1 running, 0 zombie, 0 stopped
CPU states : 1.1% user, 5.8% system, 0.0% nice, 93.1% idle
Mem : 14616K total, 11316K used, 3300K free, 2296K buffers
Swap : 0K total, 0K used, 0K free, 5556K cachedPID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
219 root 18 0 1072 1068 868 R 5.6 7.3 0:00 top
1 root 9 0 596 596 512 S 0.0 4.0 0:01 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 9 0 0 0 0 SW 0.0 0.0 0:00 kswapd
4 root 9 0 0 0 0 SW 0.0 0.0 0:00 kreclaimd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
7 root 9 0 0 0 0 SW 0.0 0.0 0:00 kmapled
39 root 9 0 900 900 668 S 0.0 6.1 0:00 devfsd
91 root 8 0 652 652 556 S 0.0 4.4 0:00 pump
96 daemon 9 0 524 524 420 S 0.0 3.5 0:00 portmap
149 root 9 0 944 944 796 S 0.0 6.4 0:00 syslogd
152 root 9 0 604 604 456 S 0.0 4.1 0:00 klogd
187 root 9 0 540 540 456 S 0.0 3.6 0:00 getty
201 root 9 0 1380 1376 1112 S 0.0 9.4 0:01 bashNote that at this point I had shutdown both gpm and inetd. The rest of the processes, save for bash, are default. The above stats only report about 14 MB of RAM ; where are the other 2 MB ?
dreamcast : # df -h Filesystem Size Used Avail Use% Mounted on /dev/rd/1 2.0M 560k 1.4M 28% /
-
Piwik Analytics becomes Matomo to reflect Users’ Privacy Focus
10 janvier 2018, par Matomo Core TeamOne of the world’s leading analytics software platforms is changing its name. Piwik is the sixth most-used web and mobile analytics computer solution worldwide. It is now changing its name to Matomo.
The name change comes after 10 years of Piwik building its top analytics software, with great success. It is already used on over one million websites in more than 170 countries. Matomo will build on that success, and focus even more on privacy.
‘Privacy has become a huge concern worldwide’, says Matomo’s creator, Matthieu Aubry. ‘Privacy legislation is being developed in Europe, and we will be ahead of the game in being ready for those changes. We’ll grow in line with the law and regulation changes.’
Matomo will lead the way in openness and transparency for its users. Its new name means honesty in Japanese.
‘Matomo will always be free and community-driven, just as Piwik was’, says Matthieu Aubry. ‘We have worked with hundreds of people to create the best open digital analytics solution in the world. We’re committed to giving every user full control of their data.’The change of name is appropriate as the Matomo platform moves into a new stage of growth. But for its community, little will obviously change. The same people will still be involved, and users will still get useful data to improve their own website. That data includes who visits their site, what they do there, how long they stay, and what they buy.
Matomo is an all-in-one analytics solution that gives companies a 360 degree view of their users.‘They can grow their business while still keeping 100% ownership of their data, and being fully compliant with privacy laws’, says Matthieu Aubry. ‘We’re more motivated than ever to building on that, so that Matomo stays ahead of the pack.’
The platform can be fully customised with hundreds of plug-ins, integrations and configurations.
Matomo’s updated website and new logo is now available on https://matomo.org.
For further information, please contact the Matomo Team on hello@matomo.orgThe post Piwik Analytics becomes Matomo to reflect Users’ Privacy Focus appeared first on Analytics Platform - Matomo.