From 2487d58b3968e381a542c688a55a29a5f0c9f5a5 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Mon, 26 Jan 2004 12:54:27 +0000 Subject: [PATCH] Added avformat git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@94 d19143bc-622f-0410-bfdd-b5b2a6649095 --- README | 1 + docs/services.txt | 49 +++++++++++++++++++++++- src/modules/avformat/producer_avformat.c | 2 - 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/README b/README index ff7887cd..8e163130 100644 --- a/README +++ b/README @@ -18,6 +18,7 @@ Directories + core - Independent MLT services + dv - libdv dependent services + ffmpeg - ffmpeg dependent services + + avformat - libavformat dependent services + sdl - SDL dependent services + resample - libresample dependent services + gtk2 - pango and pixbuf dependent services diff --git a/docs/services.txt b/docs/services.txt index 50f3cadd..390d05d6 100644 --- a/docs/services.txt +++ b/docs/services.txt @@ -1,6 +1,53 @@ Producers --------- + avformat + + Description + + ffmpeg libavformat based producer for video and audio. + + Constructor Argument + + 'file' - producer a/v from file + + Initialisation Properties + + int video_index - index of video stream to use (-1 is off) + int audio_index - index of audio stream to use (-1 is off) + int in - in point + int out - out point + + Read Only Properties + + double fps - this is fixed at 25 for PAL currently + double aspect_ratio - this is determined on the first frame read + + Dependencies + + ffmpeg must be configured as --enable-shared and installed prior + to compilation of mlt. + + Oddities + + There seems to be a discrepancy between audio and video pts (time + stamps) which causes audio seeking to be unreliable in some cases. + If audio playback is broken, try adding discrepancy=3 as a + property. + + Not sure of the exact reasons, but am investigating. + + Known Bugs + + Fixed frame rate. + Audio sync discrepancy with some content. + Not all libavformat supported formats are seekable. + ogg is currently broken. + Multiple mp3 uses in a single instance causes crash (patch + available on request - submitted to ffmpeg mailing list). + mpeg seeking is inaccurate - doesn't seek to i-frames so you may + get junk for a few frames. + ffmpeg Description @@ -24,7 +71,7 @@ Producers int audio_channels - audio channels (default: 2) int audio_track - audio track to use (default: 0) int audio_loop - loop audio until video exhausted (default: 0) - intint in - in point + int in - in point int out - out point double fps - output frames per second (default: 25) double aspect_ratio - aspect ratio of video diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 1b609f8b..572409ca 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -630,8 +630,6 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form // If we're behind, ignore this packet float current_pts = (float)pkt.pts / 1000000.0; double discrepancy = mlt_properties_get_double( properties, "discrepancy" ); - - fprintf( stderr, "%f < %f\n", discrepancy * current_pts, (float) real_timecode ); if ( discrepancy * current_pts < real_timecode ) ignore = 1; } -- 2.39.2