AVI header

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

AVI header

Gheorghe Postelnicu
Hi all,

First, Happy Holidays to all of you!

I have recently started to use ffmpeg with the goal to do 1 simple
thing: convert a .flv file to an uncompressed .avi file (under Ubuntu)
that I can then read in Matlab. I came up with the following
command-line for this:

ffmpeg -y -i $1  -f avi -vcodec rawvideo -pix_fmt bgr24 -acodec pcm_s16le $2

This seemed perfect for almost a day. That is until I saw that the
number of frames being read was wrong, and independent of the input -
being 4163 :) (not 42, at least).

Being new to video stuff, I tried to use VirtualDub on my laptop to do
the same thing (but using the gui and specifying an uncompressed
output video stream), and then it worked, i.e. the .avi file created
with VirtualDub I read in Matlab had the correct number of frames.

Now I know this is an ill-posed question and I apologize for the mass
spam. However, I thought I might write to all of you and maybe find an
answer to this question.

Thanks,
Gheorghe
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: AVI header

Stefano Sabatini
On date Friday 2007-12-28 20:30:35 -0800, Gheorghe Postelnicu encoded:

> Hi all,
>
> First, Happy Holidays to all of you!
>
> I have recently started to use ffmpeg with the goal to do 1 simple
> thing: convert a .flv file to an uncompressed .avi file (under Ubuntu)
> that I can then read in Matlab. I came up with the following
> command-line for this:
>
> ffmpeg -y -i $1  -f avi -vcodec rawvideo -pix_fmt bgr24 -acodec pcm_s16le $2
>
> This seemed perfect for almost a day. That is until I saw that the
> number of frames being read was wrong, and independent of the input -
> being 4163 :) (not 42, at least).
>
> Being new to video stuff, I tried to use VirtualDub on my laptop to do
> the same thing (but using the gui and specifying an uncompressed
> output video stream), and then it worked, i.e. the .avi file created
> with VirtualDub I read in Matlab had the correct number of frames.
>
> Now I know this is an ill-posed question and I apologize for the mass
> spam. However, I thought I might write to all of you and maybe find an
> answer to this question.

To start to debug the problem: transcode with -vstats_file <filename>
and read the output of the vstats resulting file.

HTH, regards and happy new year.
--
ffmpeg-user random tip #0
Please try to use a reasonably recent version of ffmpeg before asking
questions to ffmpeg-user: older versions aren't supported here!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user