You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Increased the number of samples to look for gaps (based on the samples per frame value)
This commit is contained in:
@@ -1131,7 +1131,7 @@ audio_packet_location FFmpegReader::GetAudioPTSLocation(int pts)
|
||||
|
||||
|
||||
// Compare to previous audio packet (and fix small gaps due to varying PTS timestamps)
|
||||
if (location.is_near(previous_packet_location, samples_per_frame, 1000))
|
||||
if (location.is_near(previous_packet_location, samples_per_frame, samples_per_frame))
|
||||
{
|
||||
int orig_frame = location.frame;
|
||||
int orig_start = location.sample_start;
|
||||
|
||||
11
src/Main.cpp
11
src/Main.cpp
@@ -147,11 +147,12 @@ int main()
|
||||
|
||||
|
||||
/* WRITER ---------------- */
|
||||
FFmpegWriter w("/home/jonathan/output.webm");
|
||||
FFmpegWriter w("/home/jonathan/output.mp3");
|
||||
|
||||
// Set options
|
||||
w.SetAudioOptions(true, "libvorbis", 48000, 2, 128000);
|
||||
w.SetVideoOptions(true, "libvpx", Fraction(24,1), 720, 420, Fraction(1,1), false, false, 3000000);
|
||||
//w.SetAudioOptions(true, "libvorbis", 48000, 2, 128000);
|
||||
w.SetAudioOptions(true, "libmp3lame", 48000, 2, 128000);
|
||||
//w.SetVideoOptions(true, "libvpx", Fraction(24,1), 720, 420, Fraction(1,1), false, false, 3000000);
|
||||
|
||||
// Prepare Streams
|
||||
w.PrepareStreams();
|
||||
@@ -167,8 +168,8 @@ int main()
|
||||
tr1::shared_ptr<Frame> f = t.GetFrame(frame);
|
||||
if (f)
|
||||
{
|
||||
//if (frame >= 13)
|
||||
//f->Display();
|
||||
//if (frame >= 62)
|
||||
// f->DisplayWaveform();
|
||||
|
||||
// Write frame
|
||||
cout << "queue frame " << frame << " (" << f->number << ", " << f << ")" << endl;
|
||||
|
||||
Reference in New Issue
Block a user