简体   繁体   中英

In MediaToolkit output file not saved in the specified directory path in the asp.net core with docker

When I try to convert video using MediaToolkit in the local system, then it's working fine, but the same project when I run in docker then output file not saved in the given path.

Also, the output file is not saved in the directory so I am getting null metadata.

Here is my code

using (var engine = new Engine())
 {
    engine.Convert(inputFile, outputFile, conversionOptions);
    engine.GetMetadata(outputFile);
    engine.Dispose();
 }
    
FileInfo outputFileInfo = new FileInfo(outputFile.Filename);

Error - Could not find file '/app/e77f2017-ef6e-4115-ba00-73a5c09941a9.mp4'

Can anyone please help me with this?

check the current path (you are working relative) the program might not run from you think and then "app" directory is not found.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM