Tweeted twitter.com/StackMma/status/1069063713104293888
8 added 10 characters in body
source | link

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 5, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20159).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then Needs["MediaTools`"] and then ?MediaToolsMediaTools`Private`$MF*Private`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF*MediaTools`Private`$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 5, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20159).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 5, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20159).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools`"] and then ?MediaTools`Private`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaTools`Private`$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

7 edited body
source | link

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 45, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (2016020159).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 4, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20160).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 5, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20159).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

6 deleted 213 characters in body
source | link

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 4, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20160).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

In conclusion Wolfram advertises the imaging capabilities of Mathematica, but to me it looks as it is for some cases the wrong language and simply too slow and useless (even I like it for many other things).

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 4, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20160).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

In conclusion Wolfram advertises the imaging capabilities of Mathematica, but to me it looks as it is for some cases the wrong language and simply too slow and useless (even I like it for many other things).

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that:

nImages = Length@Import["D:\\movie.avi", "Frames"];

Do[
  image = Import["D:\\movie.avi", {"Frames", i}];

  strCounter = ToString@PaddedForm[i, 4, NumberPadding -> {"0", ""}];

  Export[StringJoin[outputPath, "image_", strCounter, ".png"], image, 
   "png"], {i, 1, nImages}
]; 

Already only reading the number of images of a large avi file of 6GB (containing 640*480 pixel images) takes a long time (45s). If somebody does not belive it, the file is available here: https://photos.app.goo.gl/1g2kffBySogQgtsS9).

The reading of a single image at a certain position i=1 takes also about 45 sec.

Why is this so slow? (I have 32 GB of RAM, processsor: i7-4940MX 3.1 GHz)

See this:

image = Import["D:\\movie.avi", {"Frames", 1}]; // AbsoluteTiming
{44.1149, Null}

FOR SMALL AVI FILES THIS PROBLEM IS "INVISIBLE"!

For comparison I took VirtualDub (for Windows) and opened the 6GB avi file. In less than a second it shows the first image and the total number of files (20160).

In versions 11.3 MathMF does not work any more (see this question and the comment of Simon).

Simon mentioned the following:

Looking at the MediaTools package it seems like it might do everything that MathMF can do anyway. If you do Needs["MediaTools"] and then ?MediaToolsPrivate`$MF* there appear to be functions for frame-by-frame reading and writing.

If I execute ?MediaToolsPrivate$MF* I get a list of fuctions. enter image description here

How can I substitute with these functions my upper code to increase the performance?

5 deleted 3 characters in body
source | link
4 added 530 characters in body
source | link
3 deleted 6 characters in body
source | link
2 deleted 2 characters in body
source | link
1
source | link