Roman Shaposhnick | 1 May 2003 03:23
Picon

Re: re: a/v sync

On Wed, Apr 30, 2003 at 09:34:50AM +0200, Giancarlo Iannizzotto wrote:
> Uhm - I think I was kinda naive: I forgot to report the version of
> ffmpeg I'm using: ffmpeg-cvs-2003-03-22
> Should I install the last version before applying the patch? 

  Yes.

Thanks,
Roman.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Steven M. Schultz | 1 May 2003 06:57

libavcodec/dv.c corrupts output

Hi -

	if a dv file with a banged up frame is encountered the output
	stream is corrupted with error messages of the form "error pos=68"
	and so on.  

	shouldn't error messages go to stderr instead of stdout?  I was
	using smilutils built against libavcodec (the DV codec of ffmpeg
	is better and faster) and wondered why a pipeline was breaking - a
	tool further downstream was getting "error pos=65" instead of its
	expected data ;)

	Cheers,
	Steven Schultz

--- dv.c.dist	Wed Apr 30 19:40:55 2003
+++ dv.c	Wed Apr 30 21:52:23 2003
 <at>  <at>  -278,7 +278,7  <at>  <at> 
             if (pos >= 64) {
             read_error:
 #if defined(VLC_DEBUG) || 1
-                printf("error pos=%d\n", pos);
+                fprintf(stderr, "error pos=%d\n", pos);
 #endif
                 /* for errors, we consider the eob is reached */
                 mb->eob_reached = 1;

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
(Continue reading)

Beckett Madden-Woods | 1 May 2003 11:14

Grab specific frames?

Hello.

I'm a developer for Gallery (http://gallery.sourceforge.net/), which is 
a PHP-based online image gallery. We are looking for a way to 
automatically generate "thumbnail" JPEGs from movies to display on a 
page, and ffmpeg seems like the obvious solution.

I have two questions:

1) It it possible to determine the number of frames in an entire movie 
in ffmpeg?
2) Is it possible to convert a single specific frame to JPEG? It's easy 
enough with the first frame, by setting the "record" time to a small 
value, but how about grabbing a higher specific frame number?

While I can get ffmpeg to dump jpegs of each frame in a movie, I cannot 
see how to grab just a specific frame. Ideally we hope to generate a 
small number of images equally spaced across the full length of the 
movie, but this would require knowing the total number of frames, or 
the length (in time) of the movie.

If it's not currently possible, do you have any thoughts on how best to 
accomplish this?

Thanks for your input,
-Beckett

--

-- 
Beckett Madden-Woods     |  beckett <at> beckettmw.com
                          |  http://www.beckettmw.com
(Continue reading)

D Richard Felker III | 1 May 2003 16:41

Re: Grab specific frames?

On Thu, May 01, 2003 at 02:14:46AM -0700, Beckett Madden-Woods wrote:
> Hello.
> 
> I'm a developer for Gallery (http://gallery.sourceforge.net/), which is 
> a PHP-based online image gallery. We are looking for a way to 
> automatically generate "thumbnail" JPEGs from movies to display on a 
> page, and ffmpeg seems like the obvious solution.
> 
> I have two questions:
> 
> 1) It it possible to determine the number of frames in an entire movie 
> in ffmpeg?
> 2) Is it possible to convert a single specific frame to JPEG? It's easy 
> enough with the first frame, by setting the "record" time to a small 
> value, but how about grabbing a higher specific frame number?
> 
> While I can get ffmpeg to dump jpegs of each frame in a movie, I cannot 
> see how to grab just a specific frame. Ideally we hope to generate a 
> small number of images equally spaced across the full length of the 
> movie, but this would require knowing the total number of frames, or 
> the length (in time) of the movie.
> 
> If it's not currently possible, do you have any thoughts on how best to 
> accomplish this?

One way to do it without using much cpu time at all, and without using
ffmpeg, is to just seek using the index (e.g. with libavformat) to all
the keyframes, then parse the DC coefficients out of the bitstream.
This gives you a (w/8) x (h/8) image very quickly. If you don't want
to do so much yourself, though, :) then you could just use libavcodec
(Continue reading)

Steven M. Schultz | 1 May 2003 19:57

411P output from ffmpeg?

Hi -

	Is it possible to get the 411P (for NTSC) data out from a DV file?

	I see the '-f rawvideo' but that's not quite what I'm after.   There's
	a yuv4mpegpipe that will, if I can figure out how to not Floating
	exception (core dumped), give 420P but I was looking to experiment with
	the 4:1:1 data.

	ffmpeg -i trailer.dv -f yuv4mpegpipe foo

Seems that stream 0 comes from film source: 29.97->nan
Input #0, dv, from 'trailer.dv':
Stream #0.0: Video: dvvideo, 720x480, 29.97 fps, 800 kb/s
Stream #0.1: Audio: dvaudio, 48000 Hz, stereo, 1536 kb/s
File 'foo' already exists. Overwrite ? [y/N] y
Output #0, yuv4mpegpipe, to 'foo':
Stream #0.0: Video: rawvideo, yuv420p, 720x480, nan fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Floating exception (core dumped)

	obviously I'm not running it correctly? ;)
`h

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
(Continue reading)

Måns Rullgård | 1 May 2003 20:05
Picon

Re: 411P output from ffmpeg?

"Steven M. Schultz" <sms <at> 2BSD.COM> writes:

> Seems that stream 0 comes from film source: 29.97->nan

This looks odd.

--

-- 
Måns Rullgård
mru <at> users.sf.net

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Roman Shaposhnick | 1 May 2003 20:55
Picon

Re: 411P output from ffmpeg?

On Thu, May 01, 2003 at 10:57:27AM -0700, Steven M. Schultz wrote:
> Hi -
> 
> 	Is it possible to get the 411P (for NTSC) data out from a DV file?
> 
> 	I see the '-f rawvideo' but that's not quite what I'm after.   There's
> 	a yuv4mpegpipe that will, if I can figure out how to not Floating
> 	exception (core dumped), give 420P but I was looking to experiment with
> 	the 4:1:1 data.

   No, I don't think you'll be able to do this. Take a look at
   libavcodec/raw.c.

> 	ffmpeg -i trailer.dv -f yuv4mpegpipe foo
> 
> Seems that stream 0 comes from film source: 29.97->nan

  Why do you say that ?

> Input #0, dv, from 'trailer.dv':
> Stream #0.0: Video: dvvideo, 720x480, 29.97 fps, 800 kb/s
> Stream #0.1: Audio: dvaudio, 48000 Hz, stereo, 1536 kb/s
> File 'foo' already exists. Overwrite ? [y/N] y
> Output #0, yuv4mpegpipe, to 'foo':
> Stream #0.0: Video: rawvideo, yuv420p, 720x480, nan fps, q=2-31, 200 kb/s
> Stream mapping:
> Stream #0.0 -> #0.0
> Floating exception (core dumped)
> 
> 	obviously I'm not running it correctly? ;)
(Continue reading)

Måns Rullgård | 1 May 2003 21:57
Picon

Re: 411P output from ffmpeg?

Roman Shaposhnick <rvs <at> sun.com> writes:

> > 	I see the '-f rawvideo' but that's not quite what I'm after.   There's
> > 	a yuv4mpegpipe that will, if I can figure out how to not Floating
> > 	exception (core dumped), give 420P but I was looking to experiment with
> > 	the 4:1:1 data.
> 
>    No, I don't think you'll be able to do this. Take a look at
>    libavcodec/raw.c.
> 
> > 	ffmpeg -i trailer.dv -f yuv4mpegpipe foo
> > 
> > Seems that stream 0 comes from film source: 29.97->nan
> 
>   Why do you say that ?

That message is from ffmpeg, see ffmpeg.c:2036.  For some reason, rfps
and rfps_base both get set to 0, hence the nan.  Later on, this
division is done in integer code, producing the SIGFPE.  There's
probably something wrong with the stream.  Maybe someone should have a
closer look.

--

-- 
Måns Rullgård
mru <at> users.sf.net

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
(Continue reading)

Steven M. Schultz | 1 May 2003 21:56

Re: 411P output from ffmpeg?


On Thu, 1 May 2003, Roman Shaposhnick wrote:

> On Thu, May 01, 2003 at 10:57:27AM -0700, Steven M. Schultz wrote:
> > 	Is it possible to get the 411P (for NTSC) data out from a DV file?

>    No, I don't think you'll be able to do this. Take a look at
>    libavcodec/raw.c.

	Oh, ok.   Is this the proper place to request the feature? ;)

> > 	ffmpeg -i trailer.dv -f yuv4mpegpipe foo
> > 
> > Seems that stream 0 comes from film source: 29.97->nan
> 
>   Why do you say that ?

	I did not say that.   That message came directly from 'ffmpeg'.

> > Stream #0.0 -> #0.0
> > Floating exception (core dumped)
> > 
>   That's weird -- it works for me just out of the box:
> 
> $ ./ffmpeg -i pond.dv -f yuv4mpegpipe foo
> Input #0, dv, from '/export/DV/tests/pond.dv':
>   Stream #0.0: Video: dvvideo, 720x480, 29.97 fps, 800 kb/s
>   Stream #0.1: Audio: dvaudio, 44100 Hz, stereo, 1411 kb/s

>    Try to use ffmpeg_g and post a stack trace from the coredump.
(Continue reading)

Roman Shaposhnick | 1 May 2003 22:18
Picon

Re: 411P output from ffmpeg?

On Thu, May 01, 2003 at 09:57:25PM +0200, M?ns Rullg?rd wrote:
> Roman Shaposhnick <rvs <at> sun.com> writes:
> 
> > > 	I see the '-f rawvideo' but that's not quite what I'm after.   There's
> > > 	a yuv4mpegpipe that will, if I can figure out how to not Floating
> > > 	exception (core dumped), give 420P but I was looking to experiment with
> > > 	the 4:1:1 data.
> > 
> >    No, I don't think you'll be able to do this. Take a look at
> >    libavcodec/raw.c.
> > 
> > > 	ffmpeg -i trailer.dv -f yuv4mpegpipe foo
> > > 
> > > Seems that stream 0 comes from film source: 29.97->nan
> > 
> >   Why do you say that ?
> 
> That message is from ffmpeg, see ffmpeg.c:2036.  For some reason, rfps
> and rfps_base both get set to 0, hence the nan.  Later on, this
> division is done in integer code, producing the SIGFPE.  There's
> probably something wrong with the stream.  Maybe someone should have a
> closer look.

  That's right, I agree. I was surprised by the mentioning of the 
  "film source".

Thanks,
Roman.

-------------------------------------------------------
(Continue reading)


Gmane