[FFmpeg-devel] $250 to fix FLV cutting bug (STILL OPEN)

Cyrus A lists
Wed Jul 18 02:06:43 CEST 2007


Panagiotis Issaris wrote:
> Hi Cyrus,
>
> Cyrus A wrote:
>   
>> Cyrus A wrote:
>>   
>>     
>>> Piero Bugoni wrote:
>>>   
>>>     
>>>       
>>>>> I'm trying to cut a small portion out of a larger
>>>>> FLV file. I have an 
>>>>> FLV file that is 156 seconds long. The command...
>>>>>
>>>>> ffmpeg -ss 6 -t 100 -y -vcodec copy -acodec copy -i 
>>>>> /home/cyrus/Desktop/test.flv
>>>>> /home/cyrus/Desktop/cut.flv
>>>>>
>>>>> ...should create a file that is 94 seconds long
>>>>> (seeking 6 seconds, 
>>>>> duration for 100 seconds). Instead, it creates a
>>>>> file 150 seconds long. 
>>>>> That is, it seems to be seeking for 6 seconds, then
>>>>> giving me the rest 
>>>>> of the clip. Any ideas why that's happening?
>>>>>
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> Maybe the -ss and -t options are exclusive of each
>>>> other.
>>>>
>>>> Have you tries the -vframes option? If you know the
>>>> number of frames you want, try specifying that, and
>>>> maybe it will give you just the frames you want.
>>>>
>>>> This probably belongs in ffmpeg.user.
>>>>
>>>> If I figure it out for you, I'll post it there.
>>>>
>>>> P.
>>>>   
>>>>     
>>>>       
>>>>         
>>> Thanks for taking a look. I don't think this belongs on ffmpeg-user. I 
>>> use the "-ss seek -t duration" combo extensively on other file formats 
>>> (mostly DivX 5.0 MPEG-4 AVI) and it works great (99% of the time). There 
>>> is obviously a bug here with FLVs.
>>>
>>> I'll let you know if I get any private responses and find a fix.
>>>
>>> Cyrus
>>>   
>>>     
>>>       
>> The donation is now $250 to fix the bug.
>>
>> Sorry to turn this list into elance.com. Look at it as further evidence 
>> of ffmpeg's commercial viability!
>>   
>>     
>
> Can you try the attached patch?
>
>  flvdec.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> With friendly regards,
> Takis
>   
Hi everybody.

Unfortunately, that patch did not work. Here is the output:

ffmpeg -ss 10 -t 100 -y -vcodec copy -acodec copy -i 
/home/cyrus/Desktop/test.flv /home/cyrus/Desktop/cut.flv
FFmpeg version SVN-r9725, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-libmp3lame
  libavutil version: 49.4.1
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jul 17 2007 19:39:22, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51)
Input #0, flv, from '/home/cyrus/Desktop/test.flv':
  Duration: 00:02:36.0, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: flv, yuv420p, 480x384, 25.00 fps(r)
  Stream #0.1: Audio: mp3, 44100 Hz, stereo
Output #0, flv, to '/home/cyrus/Desktop/cut.flv':
  Stream #0.0: Video: flv, yuv420p, 480x384, q=2-31, 25.00 fps(c)
  Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 3297 fps=  0 q=0.0 Lsize=    4532kB time=100.0 bitrate= 
371.2kbits/s   
video:3554kB audio:860kB global headers:0kB muxing overhead 2.664062%

While ffmpeg says it is a 100-sec video in duration, mplayer does not 
play the file as anticipated. For starters, the seek did not happen. The 
audio I hear is from the very beginning of the original clip. The video 
I see starts from the first frame of the original clip and moves in 
ultra-slow motion (looks like 1 frame per second). Mplayer reports the 
current position of the file as 04:39:27 and counts up while reporting 
the entire show is 01:13:09. It goes without saying mplayer is confused 
as hell about something.

I have uploaded my source FLV to http://hq.dynalias.com/test.flv . 
Please grab it there and test.

Thanks for trying. I really appreciate the responses.

Cyrus






More information about the ffmpeg-devel mailing list