webm results


R. Alblas
 

Ernst,

I did a translation from avi (as generated by xrit2pic) to webm. But the result shows a lot of compression, compared to the original jpeg files. Playing the original avi file shows much better.
I didn't specify any filter, found also no option to set the compression factor.

See attached figure, top is original avi, bottom translated to webm.
Command used:
ffmpeg   -i msg_rss.avi  msg_rss.webm

Which options do you use?


Regards,
Rob.


On 27-09-2021 17:15, Ernst Lobsiger via groups.io wrote:
Dear All,

during the weekend I have read some ffmpeg docs and found that the webm format is the way to go. It is software patent free, works in all common browsers and videos can be integrated in plain HTML5 with no additional stuff.

https://www.webmproject.org/about/

In fact I can also make such webm videos under Windows 10 with one lean GPL3 statically linked ffmpeg.exe that can easily be integrated in my EUMETCast PyTROLL/SatPy Starter Kit. I have no iphone to test my videos on :-(.

I'll throw away all *.avi and *.mp4 and only use *.webm. I have just made one more dust video of LaPalma of the last few days. The result is close to breath taking. If the video displays right click it to get the usual player controls.

You find the video on my BASIC Service only receiver Terra (images and movies):       http://5.153.116.236:85

Cheers,
Ernst



Ernst Lobsiger
 

Rob,

I do video generation directly from a bunch of numbered images. So my input is different.
I just did some benchmarks *.ogv and *.webm (where webm consists of vcodecs vp8 and vp9).

Without setting a couple of encoding parameters ffmpeg tries to figure those out which is not
always the best. Attached some ideas. I do not know exactly how the framerate is set in your
conversion. It's probably directly taken from the framerate of the *.avi file. Good luck.

Best regards,
Ernst


Am 01.10.2021 18:19, schrieb R. Alblas:

Ernst,
I did a translation from avi (as generated by xrit2pic) to webm. But
the result shows a lot of compression, compared to the original jpeg
files. Playing the original avi file shows much better.
I didn't specify any filter, found also no option to set the
compression factor.
See attached figure, top is original avi, bottom translated to webm.
Command used:
ffmpeg -i msg_rss.avi msg_rss.webm
Which options do you use?
Regards,
Rob.
On 27-09-2021 17:15, Ernst Lobsiger via groups.io wrote:

Dear All,
during the weekend I have read some ffmpeg docs and found that the
webm format is the way to go. It is software patent free, works in
all common browsers and videos can be integrated in plain HTML5 with
no additional stuff.
https://www.webmproject.org/about/
In fact I can also make such webm videos under Windows 10 with one
lean GPL3 statically linked ffmpeg.exe that can easily be integrated
in my EUMETCast PyTROLL/SatPy Starter Kit. I have no iphone to test
my videos on :-(.
I'll throw away all *.avi and *.mp4 and only use *.webm. I have just
made one more dust video of LaPalma of the last few days. The result
is close to breath taking. If the video displays right click it to
get the usual player controls.
You find the video on my BASIC Service only receiver Terra (images
and movies): http://5.153.116.236:85
Cheers,
Ernst
Links:
------
[1] https://groups.io/g/MSG-1/message/31975
[2] https://groups.io/mt/86003857/648716
[3] https://groups.io/g/MSG-1/post
[4] https://groups.io/g/MSG-1/editsub/648716
[5] https://groups.io/g/MSG-1/leave/1418222/648716/1683671582/xyzzy


R. Alblas
 

Ernst,

The avi file I use contains plain concatenated jpeg files with an extra header and pointer table.
So the only compression present in the input file is in the original jpeg files.
Using your commands I see that especially with higher frame rates the result is really horrible, must be the result of compression in time domain. Playing back msg_rss in high speed (avi used, e.g. with vlc) gives a very nice impression on how clouds etc move; e.g. playing back with 50 frames per second. With webm the result is really ugly... but maybe improvement is possible (my avi doesn't work in firefox...)

Rob.

On 01-10-2021 18:52, Ernst Lobsiger via groups.io wrote:
Rob,

I do video generation directly from a bunch of numbered images. So my input is different.
I just did some benchmarks *.ogv and *.webm (where webm consists of vcodecs vp8 and vp9).

Without setting a couple of encoding parameters ffmpeg tries to figure those out which is not
always the best. Attached some ideas. I do not know exactly how the framerate is set in your
conversion. It's probably directly taken from the framerate of the *.avi file. Good luck.

Best regards,
Ernst


Am 01.10.2021 18:19, schrieb R. Alblas:
Ernst,

I did a translation from avi (as generated by xrit2pic) to webm. But
the result shows a lot of compression, compared to the original jpeg
files. Playing the original avi file shows much better.
I didn't specify any filter, found also no option to set the
compression factor.

See attached figure, top is original avi, bottom translated to webm.
Command used:
ffmpeg   -i msg_rss.avi  msg_rss.webm

Which options do you use?

Regards,
Rob.

On 27-09-2021 17:15, Ernst Lobsiger via groups.io wrote:

Dear All,

during the weekend I have read some ffmpeg docs and found that the
webm format is the way to go. It is software patent free, works in
all common browsers and videos can be integrated in plain HTML5 with
no additional stuff.

https://www.webmproject.org/about/

In fact I can also make such webm videos under Windows 10 with one
lean GPL3 statically linked ffmpeg.exe that can easily be integrated
in my EUMETCast PyTROLL/SatPy Starter Kit. I have no iphone to test
my videos on :-(.

I'll throw away all *.avi and *.mp4 and only use *.webm. I have just
made one more dust video of LaPalma of the last few days. The result
is close to breath taking. If the video displays right click it to
get the usual player controls.

You find the video on my BASIC Service only receiver Terra (images
and movies):       http://5.153.116.236:85

Cheers,
Ernst


Links:
------
[1] https://groups.io/g/MSG-1/message/31975
[2] https://groups.io/mt/86003857/648716
[3] https://groups.io/g/MSG-1/post
[4] https://groups.io/g/MSG-1/editsub/648716
[5] https://groups.io/g/MSG-1/leave/1418222/648716/1683671582/xyzzy



Ernst Lobsiger
 

Rob,

can you send me one of your avi files in a PM?

Ernst


Ernst Lobsiger
 

Rob,

maybe something like this works

ffmpeg -i msg_rss.avi -c:v libvpx-vp9 -lossless 1 -pix_fmt yuv420p msg_rss.webm

if not study

https://trac.ffmpeg.org/wiki/Encode/VP8

https://trac.ffmpeg.org/wiki/Encode/VP9

Regards,
Ernst


R. Alblas
 

Ernst,
You can download it from:
http://www.alblas.demon.nl/wsat/data/msg_rss.avi
The option
-lossless 1

seems to be not supported, but I need to have a closer look at it.

Codec AVOption lossless (Lossless mode) specified for output file #0 (aap.webm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

Regards,
Rob.


On 01-10-2021 18:52, Ernst Lobsiger via groups.io wrote:
Rob,

I do video generation directly from a bunch of numbered images. So my input is different.
I just did some benchmarks *.ogv and *.webm (where webm consists of vcodecs vp8 and vp9).

Without setting a couple of encoding parameters ffmpeg tries to figure those out which is not
always the best. Attached some ideas. I do not know exactly how the framerate is set in your
conversion. It's probably directly taken from the framerate of the *.avi file. Good luck.

Best regards,
Ernst


Am 01.10.2021 18:19, schrieb R. Alblas:
Ernst,

I did a translation from avi (as generated by xrit2pic) to webm. But
the result shows a lot of compression, compared to the original jpeg
files. Playing the original avi file shows much better.
I didn't specify any filter, found also no option to set the
compression factor.

See attached figure, top is original avi, bottom translated to webm.
Command used:
ffmpeg   -i msg_rss.avi  msg_rss.webm

Which options do you use?

Regards,
Rob.

On 27-09-2021 17:15, Ernst Lobsiger via groups.io wrote:

Dear All,

during the weekend I have read some ffmpeg docs and found that the
webm format is the way to go. It is software patent free, works in
all common browsers and videos can be integrated in plain HTML5 with
no additional stuff.

https://www.webmproject.org/about/

In fact I can also make such webm videos under Windows 10 with one
lean GPL3 statically linked ffmpeg.exe that can easily be integrated
in my EUMETCast PyTROLL/SatPy Starter Kit. I have no iphone to test
my videos on :-(.

I'll throw away all *.avi and *.mp4 and only use *.webm. I have just
made one more dust video of LaPalma of the last few days. The result
is close to breath taking. If the video displays right click it to
get the usual player controls.

You find the video on my BASIC Service only receiver Terra (images
and movies):       http://5.153.116.236:85

Cheers,
Ernst



Links:
------
[1] https://groups.io/g/MSG-1/message/31975
[2] https://groups.io/mt/86003857/648716
[3] https://groups.io/g/MSG-1/post
[4] https://groups.io/g/MSG-1/editsub/648716
[5] https://groups.io/g/MSG-1/leave/1418222/648716/1683671582/xyzzy







Ernst Lobsiger
 

Rob,

I dowmloaded your video. Good old *.ogv works with:

ffmpeg -i msg_rss.avi -c:v libtheora -q:v 10 -pix_fmt yuv420p msg_rss.ogv

This runs fine in Edge and in (Windows) FireFox (wich has an artefact at the bottom in full screen mode).

So far so good. Will try the webm bit with setting of appropriate bandwidth this evening.

Cheers,
Ernst


Ernst Lobsiger
 

Rob,

here on (Devuan 3.1 beowulf amd64) GNU/Linux

ffmpeg -i msg_rss.avi -c:v libvpx-vp9 -lossless 1 -pix_fmt yuv420p msg_rss.webm

does also work fine in both Edge and (Windows) FireFox but the result is twice the *.avi size.

With this -lossless 1 switch bandwidth is set too high (bitrate  2000 - 3000 kb/s). I will play with
variable bandwidth limiting maximum bandwidth this evening. Now going to work in the garden.

Cheers,
Ernst


Thorsten Miglus
 

Rob and Ernst,

if you are looking for a lossless video codec you can try huffyuv.
The resulting videos can be played with VLC media player.

ffmpeg -framerate 15 -i "F:\Temp\Image%%02d.png" -vcodec huffyuv -threads 1 -y F:\RssAirmass.avi

Cheers,
Thorsten


On Sat, Oct 2, 2021 at 09:16 AM, Ernst Lobsiger wrote:

Rob,

I dowmloaded your video. Good old *.ogv works with:

ffmpeg -i msg_rss.avi -c:v libtheora -q:v 10 -pix_fmt yuv420p msg_rss.ogv

This runs fine in Edge and in (Windows) FireFox (wich has an artefact at the bottom in full screen mode).

So far so good. Will try the webm bit with setting of appropriate bandwidth this evening.

Cheers,
Ernst


R. Alblas
 

Thorsten,

Using option -r (-framerate is not a valid option here) it works, but the resulting filesize is even bigger: 10x bigger than the original! Also, firefox doesn't accept this format.
With the right options webm lossless does work now here:

ffmpeg -r 20 -i msg_rss.avi -c:v libvpx-vp9 -lossless 1 -pix_fmt yuv420p msg_rss20.webm

(A too high rate, e.g. -r 50, gives crazy results, or does run for just a few frames).

Cheers,
Rob.


On 02-10-2021 09:52, Thorsten Miglus wrote:

Rob and Ernst,

if you are looking for a lossless video codec you can try huffyuv.
The resulting videos can be played with VLC media player.

ffmpeg -framerate 15 -i "F:\Temp\Image%%02d.png" -vcodec huffyuv -threads 1 -y F:\RssAirmass.avi

Cheers,
Thorsten

On Sat, Oct 2, 2021 at 09:16 AM, Ernst Lobsiger wrote:

Rob,

I dowmloaded your video. Good old *.ogv works with:

ffmpeg -i msg_rss.avi -c:v libtheora -q:v 10 -pix_fmt yuv420p msg_rss.ogv

This runs fine in Edge and in (Windows) FireFox (wich has an artefact at the bottom in full screen mode).

So far so good. Will try the webm bit with setting of appropriate bandwidth this evening.

Cheers,
Ernst


Ernst Lobsiger
 

On Sat, Oct 2, 2021 at 01:19 AM, R. Alblas wrote:
ffmpeg -r 20 -i msg_rss.avi -c:v libvpx-vp9 -lossless 1 -pix_fmt yuv420p msg_rss20.webm
Rob,

your *.avi has a rate of 2 images per second (Properties/Details). The -r switch does that:

ffmpeg  -r 2   -i msg_rss.avi -c:v libvpx-vp9 -lossless 1 -pix_fmt yuv420p msg_rss20.webm

plays in Edge/FireFox like your *.avi in MediaPlayer (though the filesize is much bigger).

Regards,
Ernst

P.S.
I still have to figure out the difference between -r and -framerate.
AFAIK this used to be the same thing in older ffmpeg versions.


Ernst Lobsiger
 

On Fri, Oct 1, 2021 at 09:19 AM, R. Alblas wrote:
I did a translation from avi (as generated by xrit2pic) to webm. But the result shows a lot of compression, compared to the original jpeg files. Playing the original avi file shows much better.
Dear Rob,

thank you for this thread. It pretty much advanced my understanding of webm encoding with ffmpeg. And there is even an image format webp I have started to experiment with.

@ All interested in this stuff: I attach my current knowledge. Use this as a starting point for your experiments. At the time of writing ImageMagick (IM) and FireFox work with webp.

Cheers,
Ernst


R. Alblas
 

I have now increased the jpeg quality to 90%, artefacts are nearly invisible.
File size grows, of course; avi files are doubled in size, webm grows just 15%.
But still shows ok in Firefox/VLC (not smoothly but that's a PC-kind of thing...)

Regards,
Rob.


On 03-10-2021 11:35, Ernst Lobsiger via groups.io wrote:
On Fri, Oct 1, 2021 at 09:19 AM, R. Alblas wrote:
I did a translation from avi (as generated by xrit2pic) to webm. But the result shows a lot of compression, compared to the original jpeg files. Playing the original avi file shows much better.
Dear Rob,

thank you for this thread. It pretty much advanced my understanding of webm encoding with ffmpeg. And there is even an image format webp I have started to experiment with.

@ All interested in this stuff: I attach my current knowledge. Use this as a starting point for your experiments. At the time of writing ImageMagick (IM) and FireFox work with webp.

Cheers,
Ernst


Ernst Lobsiger
 

Rob,

here is some more webm results. Not sure my 12 years old Basic Service only receiver can make it to send all this over the net :-).

http://5.153.116.236:85/images/Test5/

Cheers,
Ernst