Debian Bug report logs - #369134
ffmpeg: start time specified after input files is applied wrongly

version graph

Package: ffmpeg; Maintainer for ffmpeg is Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>; Source for ffmpeg is src:ffmpeg (PTS, buildd, popcon).

Reported by: Ben Hutchings <ben@decadentplace.org.uk>

Date: Sat, 27 May 2006 19:18:24 UTC

Severity: normal

Tags: patch

Fixed in version 0.svn20080206-1

Done: Reinhard Tartler <siretart@tauware.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Sam Hocevar (Debian packages) <sam+deb@zoy.org>:
Bug#369134; Package ffmpeg. (full text, mbox, link).


Acknowledgement sent to Ben Hutchings <ben@decadentplace.org.uk>:
New Bug report received and forwarded. Copy sent to Sam Hocevar (Debian packages) <sam+deb@zoy.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ben Hutchings <ben@decadentplace.org.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ffmpeg: start time specified after input files is applied wrongly
Date: Sat, 27 May 2006 20:01:31 +0100
Package: ffmpeg
Version: 0.cvs20050313-2sarge1
Severity: normal
Tags: patch

If a start time (-ss option) is specified after all input files, the
specified time period is correctly discarded from input streams, but a
video output stream will be delayed by that time again with respect to
an audio output stream; i.e. the output streams will be out-of-synch.

Here is a fix for the version in sarge (0.cvs20050313-2sarge1):

--- ffmpeg.c.orig	2005-03-12 17:24:20.000000000 +0000
+++ ffmpeg.c	2006-05-26 20:37:36.000000000 +0100
@@ -474,7 +474,7 @@
         return;               /* Should signal an error ! */
 
     if(audio_sync_method){
-        double delta = ost->sync_ipts * enc->sample_rate - ost->sync_opts 
+        double delta = (ost->sync_ipts - (double)start_time / AV_TIME_BASE) * enc->sample_rate - ost->sync_opts 
                 - fifo_size(&ost->fifo, ost->fifo.rptr)/(ost->st->codec.channels * 2);
         double idelta= delta*ist->st->codec.sample_rate / enc->sample_rate;
         int byte_delta= ((int)idelta)*2*ist->st->codec.channels;
@@ -517,7 +517,7 @@
             }
         } 
     }else
-        ost->sync_opts= lrintf(ost->sync_ipts * enc->sample_rate)
+        ost->sync_opts= lrintf((ost->sync_ipts - (double)start_time / AV_TIME_BASE) * enc->sample_rate)
                         - fifo_size(&ost->fifo, ost->fifo.rptr)/(ost->st->codec.channels * 2); //FIXME wrong
 
     if (ost->audio_resample) {
@@ -703,7 +703,7 @@
 
     if(video_sync_method){
         double vdelta;
-        vdelta = ost->sync_ipts * enc->frame_rate / enc->frame_rate_base - ost->sync_opts;
+        vdelta = (ost->sync_ipts - (double)start_time / AV_TIME_BASE) * enc->frame_rate / enc->frame_rate_base - ost->sync_opts;
         //FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
         if (vdelta < -1.1)
             nb_frames = 0;
@@ -720,7 +720,7 @@
                 fprintf(stderr, "*** %d dup!\n", nb_frames-1);
         }
     }else
-        ost->sync_opts= lrintf(ost->sync_ipts * enc->frame_rate / enc->frame_rate_base);
+        ost->sync_opts= lrintf((ost->sync_ipts - (double)start_time / AV_TIME_BASE) * enc->frame_rate / enc->frame_rate_base);
 
     nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number);
     if (nb_frames <= 0) 
-- END --

It appears that the version in etch and sid (0.cvs20060329-4) has had
a similar change applied to it.  However, I have not been able to
install and test that version.

This bug left me with a lot of useless XviD files at the end of
DebConf and I'm inclined to consider it a serious data-loss bug that
merits an update in stable.  On the other hand, sensible people should
check the output by eye earlier on...

Ben.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages ffmpeg depends on:
ii  libc6         2.3.6-4                    GNU C Library: Shared libraries an
ii  libfreetype6  2.1.7-2.4                  FreeType 2 font engine, shared lib
ii  libimlib2     1.2.0-2.2                  powerful image loading and renderi
ii  libsdl1.2debi 1.2.7+1.2.8cvs20041007-4.1 Simple DirectMedia Layer
ii  libx11-6      4.3.0.dfsg.1-14sarge1      X Window System protocol client li
ii  xlibs         4.3.0.dfsg.1-14sarge1      X Keyboard Extension (XKB) configu
ii  zlib1g        1:1.2.2-4.sarge.2          compression library - runtime

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>:
Bug#369134; Package ffmpeg. (full text, mbox, link).


Acknowledgement sent to Fabian Greffrath <greffrath@leat.rub.de>:
Extra info received and forwarded to list. Copy sent to Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>. (full text, mbox, link).


Message #10 received at 369134@bugs.debian.org (full text, mbox, reply):

From: Fabian Greffrath <greffrath@leat.rub.de>
To: control@bugs.debian.org
Cc: 369134@bugs.debian.org, 420230@bugs.debian.org, 426707@bugs.debian.org, 433287@bugs.debian.org, 447478@bugs.debian.org, 294422@bugs.debian.org, 298095@bugs.debian.org, 370333@bugs.debian.org, 364487@bugs.debian.org, 374931@bugs.debian.org, 448072@bugs.debian.org, 369127@bugs.debian.org, 370599@bugs.debian.org, 418231@bugs.debian.org, 420231@bugs.debian.org, 430923@bugs.debian.org, 476644@bugs.debian.org, 418228@bugs.debian.org
Subject: reassign ffmpeg bugs to ffmpeg-free
Date: Fri, 23 May 2008 10:49:45 +0200
# reassign ffmpeg bugs to ffmpeg-free
reassign 369134 ffmpeg-free
reassign 420230 ffmpeg-free
reassign 426707 ffmpeg-free
reassign 433287 ffmpeg-free
reassign 447478 ffmpeg-free
reassign 294422 ffmpeg-free
reassign 298095 ffmpeg-free
reassign 370333 ffmpeg-free
reassign 364487 ffmpeg-free
reassign 374931 ffmpeg-free
reassign 448072 ffmpeg-free
reassign 369127 ffmpeg-free
reassign 370599 ffmpeg-free
reassign 418231 ffmpeg-free
reassign 420231 ffmpeg-free
reassign 430923 ffmpeg-free
reassign 476644 ffmpeg-free
reassign 418228 ffmpeg-free
tag 418228 - pending
thanks




Bug reassigned from package `ffmpeg' to `ffmpeg-free'. Request was from Fabian Greffrath <greffrath@leat.rub.de> to control@bugs.debian.org. (Fri, 23 May 2008 08:51:26 GMT) (full text, mbox, link).


Bug reassigned from package `ffmpeg-free' to `ffmpeg-debian'. Request was from Reinhard Tartler <siretart@tauware.de> to control@bugs.debian.org. (Sun, 07 Sep 2008 13:15:03 GMT) (full text, mbox, link).


Bug reassigned from package 'ffmpeg-debian' to 'ffmpeg'. Request was from Andres Mejia <mcitadel@gmail.com> to control@bugs.debian.org. (Tue, 01 Sep 2009 00:03:07 GMT) (full text, mbox, link).


Reply sent to Reinhard Tartler <siretart@tauware.de>:
You have taken responsibility. (Sun, 31 Jan 2010 16:12:07 GMT) (full text, mbox, link).


Notification sent to Ben Hutchings <ben@decadentplace.org.uk>:
Bug acknowledged by developer. (Sun, 31 Jan 2010 16:12:07 GMT) (full text, mbox, link).


Message #21 received at 369134-done@bugs.debian.org (full text, mbox, reply):

From: Reinhard Tartler <siretart@tauware.de>
To: 369134-done@bugs.debian.org
Cc: Ben Hutchings <ben@decadentplace.org.uk>
Subject: Re: ffmpeg: start time specified after input files is applied wrongly
Date: Sun, 31 Jan 2010 17:06:21 +0100
Version: 0.svn20080206-1

Sorry for taking so long to get back to you.

On Sa, Mai 27, 2006 at 21:01:31 (CEST), Ben Hutchings wrote:

> Package: ffmpeg
> Version: 0.cvs20050313-2sarge1
> Severity: normal
> Tags: patch
>
> If a start time (-ss option) is specified after all input files, the
> specified time period is correctly discarded from input streams, but a
> video output stream will be delayed by that time again with respect to
> an audio output stream; i.e. the output streams will be out-of-synch.
>
> Here is a fix for the version in sarge (0.cvs20050313-2sarge1):

This patch does no longer apply to our package at all. By looking at it,
I'm fairly confident that this has been fixed now anyway, which is why
I'm closing this report.

In case that you can confirm this is not fixed for you, please try to
forward port that patch, ideally to current ffmpeg trunk.

thanks for your understanding.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 01 Mar 2010 07:30:52 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Jan 30 06:37:14 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.