ashokkrish / spatialEpisim

spatialEpisim: Spatial Tracking of Infectious Disease Epidemics using Mathematical Models
GNU General Public License v3.0
8 stars 5 forks source link

No video with supported format and MIME type found when using Firefox #7

Open bryce-carson opened 2 months ago

bryce-carson commented 2 months ago

It appears that an MP4 was output, according to the log, but that might've been from a previous connection to the same server. This needs replication and further investigation.

Output #0, mp4, to 'Infected_MP4.mp4':
  Metadata:
    encoder         : Lavf60.16.100
  Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 768x768, q=2-31, 200 kb/s, 90k tbn
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Adding frame 11 at timestamp 15.00sec (90%) - video stream completed!
ashokkrish commented 2 months ago

Aggregation factor of 100 is probably too much. Ideally we want the aggregation factor to be as small as possible.

bryce-carson commented 2 months ago

I reproduced the error with Greece, default options, the default generated seed data, no cropping, and an aggregation factor of fifty (50).

bryce-carson commented 2 months ago

Further confirmed with Greece, default options, the default generated seed data, no cropping, and an aggregation factor of five (5).

bryce-carson commented 2 months ago

The issue is that the codec is non-free and thus the Firefox web browser cannot play the MP4 file directly. Maybe I need to restart my computer after installing the non-free codecs.

We should use an open container format like webm.

bryce-carson commented 2 months ago

I think the use of a video is the wrong approach anyways. What we really want is a slideshow of the static images, an animation. Video is a convenient way to achieve this, but it is much less flexible than a slideshow.

Using Splide with Autoplay and its (viewport-slideshow) Intersection extension will offer a good alternative to a video. It will be portable across browsers, and offer another mode of interactivity and customizability (by the user) and downloading individual frames as any other image on the web.

bryce-carson commented 1 month ago

In #11 I wrote,

The Theora encoder with an OGG container seems like a good choice, but WEBM is more commonly known.

Whichever R package on CRAN is most popular, recent, and well-designed which can encode video files is going to be the best choice, I imagine. We we will use that encoding with multiple containers, if possible. At worst, we can provide a fully supported encoding and container and recommend the user download Handbrake to transcode their downloaded video into another format which their operating system and browser support.

Using the webm container with an open codec is probably the best path forward to resolving this issue, which affected stable. However, resolving this issue is only going to be done in unstable.

bryce-carson commented 1 month ago

While this issue is labelled STABLE, the work should only be completed in the UNSTABLE branch following the solution tendered in #11.

bryce-carson commented 1 month ago

The label STABLE merely reflects the fact that this issue is observed in the main/stable branch.

bryce-carson commented 1 week ago

@Toby-exe, don't forget to close this issue alongside #11 when it is closed.

bryce-carson commented 2 days ago

@Toby-exe and @kle6951, can you please update me on your shared progress towards implementing Leaflet.TimeDimension + SpatRaster?

Disregard discussing the above in this issue. Discuss it in #11.