Skip Menu |

This queue is for tickets about the FLV-Info CPAN distribution.

Report information
The Basics
Id: 26109
Status: resolved
Priority: 0/
Queue: FLV-Info

People
Owner: Nobody in particular
Requestors: jzhang533 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.17
Fixed in: (no value)



Subject: 'Unexpected end of file' occured when parsing a flv file
Hi, I've used this great module, and failed processing a flv file. It failed at line 390 of FLV/File.pm 387 if ($bytes != $n) 389 { 390 die 'Unexpected end of file'; 392 }
Subject: Re: [rt.cpan.org #26109] 'Unexpected end of file' occured when parsing a flv file
Date: Wed, 4 Apr 2007 22:43:46 -0500
To: bug-FLV-Info [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
On Apr 4, 2007, at 10:32 PM, 张军 via RT wrote: Show quoted text
> Wed Apr 04 23:32:18 2007: Request 26109 was acted upon. > Transaction: Ticket created by JZHANG > Queue: FLV-Info > Subject: 'Unexpected end of file' occured when parsing a flv file > Broken in: 0.17 > Severity: Important > Owner: Nobody > Requestors: jzhang533@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26109 > > > > Hi, I've used this great module, and failed processing a flv file. > It failed at line 390 of FLV/File.pm > > 387 if ($bytes != $n) > 389 { > 390 die 'Unexpected end of file'; > 392 } >
Could you please share more information about the video you are using and any command line option? Perhaps you could upload the failing sample? All I can tell from the above is that FLV-Info thinks your file is too short. Chris
Subject: Re: [rt.cpan.org #26109] 'Unexpected end of file' occured when parsing a flv file
Date: Thu, 5 Apr 2007 12:02:20 +0800
To: bug-FLV-Info [...] rt.cpan.org
From: jzhang <jzhang533 [...] gmail.com>
On 4/5/07, Chris Dolan via RT <bug-FLV-Info@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26109 > > > On Apr 4, 2007, at 10:32 PM, 张军 via RT wrote: >
> > Wed Apr 04 23:32:18 2007: Request 26109 was acted upon. > > Transaction: Ticket created by JZHANG > > Queue: FLV-Info > > Subject: 'Unexpected end of file' occured when parsing a flv file > > Broken in: 0.17 > > Severity: Important > > Owner: Nobody > > Requestors: jzhang533@gmail.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26109 > > > > > > > Hi, I've used this great module, and failed processing a flv file. > > It failed at line 390 of FLV/File.pm > > > > 387 if ($bytes != $n) > > 389 { > > 390 die 'Unexpected end of file'; > > 392 } > >
> > Could you please share more information about the video you are using > and any command line option? Perhaps you could upload the failing > sample?
Thanks for your quick response. The flv file I used can be downloaded from http://storage.cnboo.com/storage1/shows/2006-06/11514068624061915867586.wmv.flv I am using the following command line, $ flvinfo 11514068624061915867586.wmv.flv Failed to read FLV file: Unexpected end of file at /usr/lib/perl5/site_perl/5.8.5/FLV/File.pm line 390. I am using Linux, osname=linux, osvers=2.6.9-34.0.2.el, archname=x86_64-linux-thread-multi Thanks a lot for your help. Show quoted text
> > All I can tell from the above is that FLV-Info thinks your file is > too short. > > Chris > > >
Subject: Re: [rt.cpan.org #26109] 'Unexpected end of file' occured when parsing a flv file
Date: Wed, 4 Apr 2007 23:43:23 -0500
To: bug-FLV-Info [...] rt.cpan.org
From: Chris Dolan <chris [...] equilibrious.net>
On Apr 4, 2007, at 11:03 PM, 张军 via RT wrote: Show quoted text
> Thanks for your quick response. > The flv file I used can be downloaded from > http://storage.cnboo.com/storage1/shows/ > 2006-06/11514068624061915867586.wmv.flv > I am using the following command line, > > $ flvinfo 11514068624061915867586.wmv.flv > Failed to read FLV file: Unexpected end of file at > /usr/lib/perl5/site_perl/5.8.5/FLV/File.pm line 390. > > I am using Linux, > osname=linux, osvers=2.6.9-34.0.2.el, archname=x86_64-linux-thread- > multi > > Thanks a lot for your help.
I believe the file is simply truncated, as if the converter died or a download aborted. I can parse the first 1847 media tags, but the 1848th one expects to be 16727 bytes long when there is only 15711 bytes left in the file. The size of the file you mentioned is an even multiple of 4096 bytes, which sounds suspiciously like a converter crash. Furthermore, The FLV header is incorrect -- it states that there is neither audio nor video in the file, which is clearly wrong (that is, the 5th byte of the file is zero, but should be 4 + 1 = 5). Can you tell me how you created or acquired this FLV? There is no metadata tag, so I believe that you have not used any of the typical converters (Macromedia, Sorenson, On2, ffmpeg) Chris -- Chris Dolan, Equilibrious LLC, http://equilibrious.net/ Public key: http://chrisdolan.net/public.key vCard: http://chrisdolan.net/ChrisDolan.vcf
Subject: Re: [rt.cpan.org #26109] 'Unexpected end of file' occured when parsing a flv file
Date: Thu, 5 Apr 2007 13:15:22 +0800
To: bug-FLV-Info [...] rt.cpan.org
From: jzhang <jzhang533 [...] gmail.com>
On 4/5/07, Chris Dolan via RT <bug-FLV-Info@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26109 > > > On Apr 4, 2007, at 11:03 PM, 张军 via RT wrote: >
> > Thanks for your quick response. > > The flv file I used can be downloaded from > > http://storage.cnboo.com/storage1/shows/ > > 2006-06/11514068624061915867586.wmv.flv > > I am using the following command line, > > > > $ flvinfo 11514068624061915867586.wmv.flv > > Failed to read FLV file: Unexpected end of file at > > /usr/lib/perl5/site_perl/5.8.5/FLV/File.pm line 390. > > > > I am using Linux, > > osname=linux, osvers=2.6.9-34.0.2.el, archname=x86_64-linux-thread- > > multi > > > > Thanks a lot for your help.
> > I believe the file is simply truncated, as if the converter died or a > download aborted. I can parse the first 1847 media tags, but the > 1848th one expects to be 16727 bytes long when there is only 15711 > bytes left in the file. The size of the file you mentioned is an > even multiple of 4096 bytes, which sounds suspiciously like a > converter crash. > > Furthermore, The FLV header is incorrect -- it states that there is > neither audio nor video in the file, which is clearly wrong (that is, > the 5th byte of the file is zero, but should be 4 + 1 = 5). > > Can you tell me how you created or acquired this FLV? There is no > metadata tag, so I believe that you have not used any of the typical > converters (Macromedia, Sorenson, On2, ffmpeg) > > Chris > > -- > Chris Dolan, Equilibrious LLC, http://equilibrious.net/ > Public key: http://chrisdolan.net/public.key > vCard: http://chrisdolan.net/ChrisDolan.vcf > l
Thanks a lot for identifying the problems for me. This file is converted by using FLVTool2 (http://inlet-media.de/flvtool2). FLV::Info works for this file after I deleted line 390 of FLV/File.pm. But I am not sure whether the information given by flvinfo at this time make sense. File name 11514068624061915867586.wmv.flv File size 5586944 bytes Duration about 36.75 seconds Video 442 frames codec Sorenson H.263 height 240 type keyframe width 320 Audio 1407 packets format MP3 rate 22050 Hz size 16 bit type stereo Thanks a lot Jun
Subject: Re: [rt.cpan.org #26109] 'Unexpected end of file' occured when parsing a flv file
Date: Thu, 5 Apr 2007 00:22:53 -0500
To: bug-FLV-Info [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
On Apr 5, 2007, at 12:16 AM, 张军 via RT wrote: Show quoted text
> Thanks a lot for identifying the problems for me. > This file is converted by using FLVTool2 (http://inlet-media.de/ > flvtool2). > > FLV::Info works for this file after I deleted line 390 of FLV/File.pm. > But I am not sure whether the information given by flvinfo at this > time make sense. > > File name 11514068624061915867586.wmv.flv > File size 5586944 bytes > Duration about 36.75 seconds > Video 442 frames > codec Sorenson H.263 > height 240 > type keyframe > width 320 > Audio 1407 packets > format MP3 > rate 22050 Hz > size 16 bit > type stereo > > Thanks a lot > > Jun
Hi Jun, Deleting line 390 is like removing the battery from a beeping alarm. :-) I've used flvtool2 before and it's good code (and was the inspiration for FLV-Info, in fact). However, it is not a converter. My best guess is that some program before flvtool2 corrupted your FLV. Or, perhaps flvtool2 output a partial FLV upon discovering some other corruption. At this point, you'd probably be best served by going back to the original WMV and converting to FLV again. Chris -- Chris Dolan, Equilibrious LLC, http://equilibrious.net/ Public key: http://chrisdolan.net/public.key vCard: http://chrisdolan.net/ChrisDolan.vcf
Subject: Re: [rt.cpan.org #26109] 'Unexpected end of file' occured when parsing a flv file
Date: Thu, 5 Apr 2007 13:32:33 +0800
To: bug-FLV-Info [...] rt.cpan.org
From: jzhang <jzhang533 [...] gmail.com>
On 4/5/07, Chris Dolan via RT <bug-FLV-Info@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26109 > > > On Apr 5, 2007, at 12:16 AM, 张军 via RT wrote: >
> > Thanks a lot for identifying the problems for me. > > This file is converted by using FLVTool2 (http://inlet-media.de/ > > flvtool2). > > > > FLV::Info works for this file after I deleted line 390 of FLV/File.pm. > > But I am not sure whether the information given by flvinfo at this > > time make sense. > > > > File name 11514068624061915867586.wmv.flv > > File size 5586944 bytes > > Duration about 36.75 seconds > > Video 442 frames > > codec Sorenson H.263 > > height 240 > > type keyframe > > width 320 > > Audio 1407 packets > > format MP3 > > rate 22050 Hz > > size 16 bit > > type stereo > > > > Thanks a lot > > > > Jun
> > Hi Jun, > > Deleting line 390 is like removing the battery from a beeping > alarm. :-) > > I've used flvtool2 before and it's good code (and was the inspiration > for FLV-Info, in fact). However, it is not a converter. My best > guess is that some program before flvtool2 corrupted your FLV. Or, > perhaps flvtool2 output a partial FLV upon discovering some other > corruption. > > At this point, you'd probably be best served by going back to the > original WMV and converting to FLV again. > > Chris > > -- > Chris Dolan, Equilibrious LLC, http://equilibrious.net/ > Public key: http://chrisdolan.net/public.key > vCard: http://chrisdolan.net/ChrisDolan.vcf >
:) Thanks for your kind help, and sorry for my poor English. If you have chance to come to Beijing China in the future, I will be very happy to be your guide. Jun