Ke Yu | 1 Feb 07:45
Picon
Gravatar

Re: sample size of STSZ table in MP4

I went over the X264 options in MPlayer, but couldn't figure out how to make
it produce fixed sample size.  Would you be more specific?

Thanks!

On Sat, Jan 31, 2009 at 5:26 PM, Baptiste Coudurier <
baptiste.coudurier <at> gmail.com> wrote:

> Hi,
>
> Ke Yu wrote:
> > Hi All,
> >
> > I've got 2 questions regarding the sample size in MP4:
> > 1). Is it possible to get the encoder (both H.264 and AAC) to output
> fixed
> > sample size for MP4? Per the MP4 format spec, I can put a fixed sample
> size
> > in STSZ table. I'm just wondering how I can do that with FFMPEG.
>
> Configure x264 encoder to do so.
>
> > 2). If the answer to 1) is NO and then the sample size would fluctuate,
> can
> > I use "skip" or "free" type to pad each sample so that I can still use
> the
> > fixed sample size in STSZ table?
>
> Or you can pad the video frame with padding NAL units to get fixed
> sample size, if I'm not mistaken.
(Continue reading)

LÉVAI Dániel | 1 Feb 10:51
Picon
Gravatar

can not feed ffserver

Hi!

After starting ffserver with a simple ffserver.conf attached below, it 
starts fine, and begins to accept connections. I can view the stat.html 
and see the requests on stdout.
However, when I try to feed ffserver with some media, it hangs, the web 
interface becomes unresponsive, I can not request the media with a 
player, cpu load hits the roof, and I must kill ffserver to stop this.

$ strace ffserver
[...]
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, eve......etc...

$ ffmpeg -r 15 -s 160x112 -i /some/video.mp4 \
	http://127.0.0.1:8090/videocam.ffm

Then ffserver's strace output looks like this:
[...]
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
accept(3, {sa_family=AF_INET, sin_port=htons(41688), 
sin_addr=inet_addr("127.0.0.1")}, [4294967312]) = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 1000) = 1 
([{fd=4, revents=POLLIN}])
(Continue reading)

Baptiste Coudurier | 1 Feb 11:36
Picon

Re: can not feed ffserver

Hi,

LÉVAI Dániel wrote:
> Hi!
> 
> After starting ffserver with a simple ffserver.conf attached below, it 
> starts fine, and begins to accept connections. I can view the stat.html 
> and see the requests on stdout.
> However, when I try to feed ffserver with some media, it hangs, the web 
> interface becomes unresponsive, I can not request the media with a 
> player, cpu load hits the roof, and I must kill ffserver to stop this.
> 
>
> 
> $ ffmpeg -r 15 -s 160x112 -i /some/video.mp4 \
> 	http://127.0.0.1:8090/videocam.ffm
> 
> [...]
> 
> <Stream videocam.mp4>
> Feed videocam.ffm
> 
> Format mp4
> 
> VideoBitRate 20
> VideoBufferSize 40
> VideoFrameRate 15
> VideoSize 160x112
> VideoGopSize 30
> VideoCodec h263
(Continue reading)

Andrey Kolesnikov | 1 Feb 11:52
Picon

Add resync_marker to mpeg4 part 2 video stream

Hello. Is it possible to add resync_marker to mpeg4 part 2 video stream 
(file) using ffmpeg?
David Bolt | 1 Feb 12:06
Favicon

Re: No suitable audio output format for '/dev/null' ??

On Sat, 31 Jan 2009, Baptiste Coudurier wrote:-

<snip>

>-f null /dev/null should be even faster.

That's a lot faster at decoding but, after giving it a few test runs to
verify, nothing gets written to the log and so the second pass fails.

davjam <at> donnas:/local/videos> ffmpeg -threads 2 -i "CPA_Empire_Scott_Richter.flv" -f null -pass 1 -y
/dev/null </dev/null ; ls -l ffmpeg2pass-
0.log
FFmpeg version SVN-r16851, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64
--enable-shared --enable-libmp3lame --enable-
libvorbis --enable-libtheora --enable-libspeex --enable-libfaad --enable-libfaac
--enable-libxvid --enable-swscale --enable-postproc --enable-
gpl --enable-vhook --enable-x11grab --enable-libgsm --enable-libx264 --enable-libamr-nb
--enable-libamr-wb --enable-libdc1394 --enable-nonfree -
-enable-pthreads
  libavutil     49.14. 0 / 49.14. 0
  libavcodec    52.11. 0 / 52.11. 0
  libavformat   52.25. 0 / 52.25. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Jan 29 2009 19:46:19, gcc: 4.1.2 20061115 (prerelease) (SUSE Linux)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, flv, from 'CPA_Empire_Scott_Richter.flv':
(Continue reading)

LÉVAI Dániel | 1 Feb 12:18
Picon
Gravatar

Re: can not feed ffserver

On Sunday 01 February 2009 11.36.06 Baptiste Coudurier wrote:
> Hi,
>
> LÉVAI Dániel wrote:
> > Hi!
> >
> > After starting ffserver with a simple ffserver.conf attached below,
> > it starts fine, and begins to accept connections. I can view the
> > stat.html and see the requests on stdout.
> > However, when I try to feed ffserver with some media, it hangs, the
> > web interface becomes unresponsive, I can not request the media
> > with a player, cpu load hits the roof, and I must kill ffserver to
> > stop this.
> >
> >
> >
> > $ ffmpeg -r 15 -s 160x112 -i /some/video.mp4 \
> > 	http://127.0.0.1:8090/videocam.ffm
> >
> > [...]
> >
> > <Stream videocam.mp4>
> > Feed videocam.ffm
> >
> > Format mp4
> >
> > VideoBitRate 20
> > VideoBufferSize 40
> > VideoFrameRate 15
> > VideoSize 160x112
(Continue reading)

Ferenc Kovacs | 1 Feb 13:30
Picon
Gravatar

Re: can not feed ffserver

On Sun, Feb 1, 2009 at 12:18 PM, LÉVAI Dániel <leva <at> ecentrum.hu> wrote:

> On Sunday 01 February 2009 11.36.06 Baptiste Coudurier wrote:
> > Hi,
> >
> > LÉVAI Dániel wrote:
> > > Hi!
> > >
> > > After starting ffserver with a simple ffserver.conf attached below,
> > > it starts fine, and begins to accept connections. I can view the
> > > stat.html and see the requests on stdout.
> > > However, when I try to feed ffserver with some media, it hangs, the
> > > web interface becomes unresponsive, I can not request the media
> > > with a player, cpu load hits the roof, and I must kill ffserver to
> > > stop this.
> > >
> > >
> > >
> > > $ ffmpeg -r 15 -s 160x112 -i /some/video.mp4 \
> > >     http://127.0.0.1:8090/videocam.ffm
> > >
> > > [...]
> > >
> > > <Stream videocam.mp4>
> > > Feed videocam.ffm
> > >
> > > Format mp4
> > >
> > > VideoBitRate 20
> > > VideoBufferSize 40
(Continue reading)

Baptiste Coudurier | 1 Feb 13:35
Picon

Re: No suitable audio output format for '/dev/null' ??

David Bolt wrote:
> On Sat, 31 Jan 2009, Baptiste Coudurier wrote:-
> 
> <snip>
> 
>> -f null /dev/null should be even faster.
> 
> That's a lot faster at decoding but, after giving it a few test runs to
> verify, nothing gets written to the log and so the second pass fails.
> 
> [...]
> 
> Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
> Input #0, flv, from 'CPA_Empire_Scott_Richter.flv':
>   Duration: 00:05:01.90, start: 0.000000, bitrate: 64 kb/s
>     Stream #0.0: Video: flv, yuv420p, 320x240, 29.97 tb(r)
>     Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 64 kb/s
> Output #0, null, to '/dev/null':
>     Stream #0.0: Video: rawvideo, yuv420p, 320x240, q=2-31, pass 1, 200 kb/s, 29.97 tb(c)
>     Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s

Here you should see that you are transcoding to rawvideo+pcm_s16le.

You need to have the same exact commandline as if you were encoding
normally.

-f null will just avoid any actual writing operation.

> Output #0, mpeg, to 'pipe:':
>     Stream #0.0: Video: mpeg2video, yuv420p, 320x240, q=2-31, pass 1, 200 kb/s, 29.97 tb(c)
(Continue reading)

David Bolt | 1 Feb 13:58
Favicon

Re: No suitable audio output format for '/dev/null' ??

On Sun, 1 Feb 2009, Baptiste Coudurier wrote:-

>David Bolt wrote:
>> On Sat, 31 Jan 2009, Baptiste Coudurier wrote:-
>>
>> <snip>
>>
>>> -f null /dev/null should be even faster.
>>
>> That's a lot faster at decoding but, after giving it a few test runs to
>> verify, nothing gets written to the log and so the second pass fails.
>>
>> [...]
>>
>> Seems stream 0 codec frame rate differs from container frame rate:
>>1000.00 (1000/1) -> 29.97 (30000/1001)
>> Input #0, flv, from 'CPA_Empire_Scott_Richter.flv':
>>   Duration: 00:05:01.90, start: 0.000000, bitrate: 64 kb/s
>>     Stream #0.0: Video: flv, yuv420p, 320x240, 29.97 tb(r)
>>     Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 64 kb/s
>> Output #0, null, to '/dev/null':
>>     Stream #0.0: Video: rawvideo, yuv420p, 320x240, q=2-31, pass 1,
>>200 kb/s, 29.97 tb(c)
>>     Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s
>
>Here you should see that you are transcoding to rawvideo+pcm_s16le.
>
>You need to have the same exact commandline as if you were encoding
>normally.
>
(Continue reading)

Baptiste Coudurier | 1 Feb 14:21
Picon

Re: No suitable audio output format for '/dev/null' ??

David Bolt wrote:
> [...]
> 
> As you can see, it decodes the stream very quickly but it still doesn't
> write any output to ffmpeg2pass-0.log which means it still fails when
> performing the second pass:

Humm, you are right indeed, it seems -f null does not encode the video
anyway for whatever reason. It seems it use AVFMT_RAWPICTURE since years.

So use -f rawvideo.

--

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org

Gmane