Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: batch encoding / decoding #45

Open
boxerab opened this issue Nov 1, 2021 · 4 comments
Open

Feature request: batch encoding / decoding #45

boxerab opened this issue Nov 1, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@boxerab
Copy link
Contributor

boxerab commented Nov 1, 2021

Hi @osamu620, hope all is well! Have you considered adding support for encoding or decoding a folder of
images ? As HTJ2K shows promise for video encoding, I think it would be interesting to see how the workflow
might run for a batch of images, to simulate a video stream. What do you think ?

Fortunately, C++17 supports platform-independent method to list files

#include <string>
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;

int main()
{
    std::string path = "/path/to/directory";
    for (const auto & entry : fs::directory_iterator(path))
        std::cout << entry.path() << std::endl;
}
@osamu620
Copy link
Owner

osamu620 commented Nov 4, 2021

@boxerab
Hi, It would be interesting to support the batch processing. One thing that comes to my mind is this work would probably lead to implementing JPEG 2000 Part 3 (Motion JPEG 2000). I'm not familiar with the Part 3 spec, so it would take some amount of time.

If separate output codestreams are acceptable for now, it might not take longer :)

@boxerab
Copy link
Contributor Author

boxerab commented Nov 4, 2021

If separate output codestreams are acceptable for now, it might not take longer :)

Thanks, @osamu620 . Yes, it would be great for first step to have separate codestreams for each input image.
This would show how codec performs on "video" work flow.

@osamu620
Copy link
Owner

osamu620 commented Nov 8, 2021

@boxerab
OK. I will try to create a new app (video_enc) to compress image sequences in a folder/directory.
It will be a very simple one (like a shell script to do the same thing)
Anyhow, it would be a starting point :)

@osamu620 osamu620 added the enhancement New feature or request label Nov 8, 2021
@boxerab
Copy link
Contributor Author

boxerab commented Nov 9, 2021

thanks, @osamu620 . What do you think about adding three new command line args

ImageDirectory :
OutputFormat (j2k or jp2 or jpc)
OutputDirectory

then this new feature could be added to the existing encoder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants