You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
openshot-example: Path fixes
Instead of the hardcoded `/home/jonathan/...` input path, load the input file from TEST_MEDIA_PATH, defined as in `tests/CMakeLists.txt`
This commit is contained in:
@@ -43,12 +43,15 @@ int main(int argc, char* argv[]) {
|
||||
s->HARDWARE_DECODER = 2; // 1 VA-API, 2 NVDEC
|
||||
s->HW_DE_DEVICE_SET = 0;
|
||||
|
||||
FFmpegReader r9("/home/jonathan/Videos/sintel_trailer-720p.mp4");
|
||||
std::string input_filepath = TEST_MEDIA_PATH;
|
||||
input_filepath += "sintel_trailer-720p.mp4";
|
||||
|
||||
FFmpegReader r9(input_filepath);
|
||||
r9.Open();
|
||||
r9.DisplayInfo();
|
||||
|
||||
/* WRITER ---------------- */
|
||||
FFmpegWriter w9("/home/jonathan/metadata.mp4");
|
||||
FFmpegWriter w9("metadata.mp4");
|
||||
|
||||
// Set options
|
||||
w9.SetAudioOptions(true, "libmp3lame", r9.info.sample_rate, r9.info.channels, r9.info.channel_layout, 128000);
|
||||
@@ -83,4 +86,4 @@ int main(int argc, char* argv[]) {
|
||||
cout << "Completed successfully!" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user