I want to process Sentinel 2A images using another tool that is not SNAP. The later is very slow and crashes each time. I was recommended the Orfeo toolbox. I installed it on QGIS. I have 58 S2A images and I want to process them in a time-efficient way and not one by one. SNAP offers that through the graph builder and the batch processing. I want to know if there is such a thing with the Orfeo toolbox.
If you want a graphical editor to build your graph, you can use the QGIS processing toolbox modeler (which can make use of any QGIS provider: OTB, GDAL, GRASS, ...). However, for performance and stability I would strongly recommend the python API of the Orfeo ToolBox, especially for processing large amount of S2 images (answer below).
The Python API of the Orfeo ToolBox enables to chain multiple OTB applications together. It is quite easy to use, even for beginners in python. Its main advantage is that everything is processed without temporary file, and with limited memory footprint (the streaming mechanism is used internally, enabling the processing of very large images, piece by piece, propagating automatically the processed regions between the applications composing the pipeline). Everything is done under the hood, you just have to focus on building your pipeline with the Python API: it's like a graph builder from python code.
You can call OTB applications in a python loop, and the job is done!