13:26
AudioSegment AudioSegment::from_file(const std::string& file_path, const std::string& format, const std::string& codec,
const std::map& parameters, int start_second, int duration)
avformat_network_init();
av_log_set_level(AV_LOG_ERROR);
AVFormatContext* format_ctx = nullptr;
if (avformat_open_input(&format_ctx, file_path.c_str(), nullptr, nullptr) != 0)
std::cerr << "Error: Could not open audio file." << std::endl;
return AudioSegment();
if (avformat_find_stream_info(format_ctx, nullptr) < 0) (...)