christophelorenz | 1 Feb 13:44
Picon

How to calculate muxrate for mpeg2 ?

I'd like to know of someone knowns how to calculate a realistic muxrate 
for mpeg2 ?

I guess mux rate is something like = video bitrate + audio bitrate + 
codecs overhead + container overhead

I know the two first ones, but the others....
So far, I've seen in the api the stream have a 
Stream->codec->extradata_size variable probably the codec overhead.

But I found nothing regarding the mux overhead.
Seems to be linked to packetsize somehow, but no idea how to estimate it.

Chris.
Nico Sabbi | 1 Feb 14:40
Picon
Favicon

Re: How to calculate muxrate for mpeg2 ?

On Friday 01 February 2008 13:44:15 christophelorenz wrote:
> I'd like to know of someone knowns how to calculate a realistic
> muxrate for mpeg2 ?
>
> I guess mux rate is something like = video bitrate + audio bitrate
> + codecs overhead + container overhead

there's no such thing as codecs overhead: the extradata is inserted
only once and so small that it can be safely ignored

>
> I know the two first ones, but the others....
> So far, I've seen in the api the stream have a
> Stream->codec->extradata_size variable probably the codec overhead.
>
> But I found nothing regarding the mux overhead.
> Seems to be linked to packetsize somehow, but no idea how to
> estimate it.
>

something around 5% is large enough to accomodate all variants of mpeg
Nico Sabbi | 1 Feb 14:42
Picon
Favicon

Re: How to calculate muxrate for mpeg2 ?

On Friday 01 February 2008 14:40:31 Nico Sabbi wrote:
> On Friday 01 February 2008 13:44:15 christophelorenz wrote:
> > I'd like to know of someone knowns how to calculate a realistic
> > muxrate for mpeg2 ?
> >
> > I guess mux rate is something like = video bitrate + audio
> > bitrate + codecs overhead + container overhead
>
> there's no such thing as codecs overhead: the extradata is inserted
> only once and so small that it can be safely ignored

and btw, all codecs generally carried over mpeg don't have
extradata at all
christophelorenz | 1 Feb 16:03
Picon

Re: How to calculate muxrate for mpeg2 ?

Nico Sabbi wrote:

>On Friday 01 February 2008 14:40:31 Nico Sabbi wrote:
>  
>
>>On Friday 01 February 2008 13:44:15 christophelorenz wrote:
>>    
>>
>>>I'd like to know of someone knowns how to calculate a realistic
>>>muxrate for mpeg2 ?
>>>
>>>I guess mux rate is something like = video bitrate + audio
>>>bitrate + codecs overhead + container overhead
>>>      
>>>
>>there's no such thing as codecs overhead: the extradata is inserted
>>only once and so small that it can be safely ignored
>>    
>>
>
>and btw, all codecs generally carried over mpeg don't have
>extradata at all
>  
>
Great thanks for the info.

Chris.
John Sigler | 1 Feb 16:05
Picon
Favicon

Re: How to calculate muxrate for mpeg2 ?

Nico Sabbi wrote:

> Christophe Lorenz wrote:
> 
>> But I found nothing regarding the mux overhead.
> 
> Something around 5% is large enough to accommodate all variants
> of mpeg

Consider an MPEG-2 transport stream muxer repeating the PAT and PMT
at 25 Hz. That *alone* equals 75 kbit/s overhead. And then you have
to consider PCR and PES header overhead. And padding overhead.

When one considers low bit rate elementary streams, the overhead
can easily reach 50% or more.

Regards.
Nico Sabbi | 1 Feb 16:13
Picon
Favicon

Re: How to calculate muxrate for mpeg2 ?

On Friday 01 February 2008 16:05:14 John Sigler wrote:
> Nico Sabbi wrote:
> > Christophe Lorenz wrote:
> >> But I found nothing regarding the mux overhead.
> >
> > Something around 5% is large enough to accommodate all variants
> > of mpeg
>
> Consider an MPEG-2 transport stream muxer repeating the PAT and PMT
> at 25 Hz. That *alone* equals 75 kbit/s overhead. And then you have
> to consider PCR and PES header overhead. And padding overhead.

padding and PES are accounted to in the multiplex overhead

>
> When one considers low bit rate elementary streams, the overhead
> can easily reach 50% or more.
>

I assumed the user was talking about mpeg-ps, where costant muxrate
isn't important
Grant | 1 Feb 16:31
Picon

Re: FLV quality and EXIF preservation

> >> > I'm converting .mov files to .flv and I'm wondering if there is a way
> >> > to increase the video quality?  I've tried setting a higher video
> >> > bitrate with -b but it doesn't seem to make a difference.
> >>
> >> What bitrate are upi using?
> >>
> >> I've found that the minimum decent quality starts at 784K for a 640x480
> >> image.
> >>
> >> 2048k is good - but way too big for most downloads.
> >
> > The -b option doesn't seem to be making any difference in the video
> > quality for me, even though I can see the bitrate I specify in
> > ffmpeg's output.  I just tried -b 2048000.  I'm using these videos
> > with jalbum but I don't see how that could be changing the quality.
> >
> > Any hope for EXIF preservation?
>
> This is what I use to generate a 24 hour time-lapse video of my lizard:
>
> cat `find /data/motion/lizardcam -mtime -1 -name '*jpg' | sort -n `  |
> /usr/local/bin/ffmpeg -vcodec mjpeg -f image2pipe -i - -y -b 784k -f flv
> lizard.flv
>
> Seems to work OK.  Check out http://www.seiner.com and click on the
> lizardcam and snakecam.  They're a bit shaky since we're still moving
> thins around.
>
> As for EXIF, I don't need it, so I don't use it....
>
(Continue reading)

yan | 1 Feb 17:08
Favicon

Re: FLV quality and EXIF preservation


> I noticed your lizardcam and snakecam take a couple seconds to buffer
> the video before playing it.  How did you get them to do that?  Is it
> a metadata issue?
>

It must be a property of the server-side player and the client-side
player.  I use <http://www.jeroenwijering.com/?item=JW_FLV_Player> which
has a huge number of options.  Look at the source for those popup windows
and you'll see how I call the flv player.

The snakecam is a bit boring since the snake is mostly nocturnal and my
lights are stuck in Idaho due to snowslides blocking the road.  No telling
when they'll get here - last I heard it's coming down at the rate of a
foot of snow per day....  I'm going skiing this weekend.  :-)

--Yan
Grant | 1 Feb 17:16
Picon

Re: FLV quality and EXIF preservation

> > I noticed your lizardcam and snakecam take a couple seconds to buffer
> > the video before playing it.  How did you get them to do that?  Is it
> > a metadata issue?
> >
>
> It must be a property of the server-side player and the client-side
> player.  I use <http://www.jeroenwijering.com/?item=JW_FLV_Player> which
> has a huge number of options.  Look at the source for those popup windows
> and you'll see how I call the flv player.
>
> The snakecam is a bit boring since the snake is mostly nocturnal and my
> lights are stuck in Idaho due to snowslides blocking the road.  No telling
> when they'll get here - last I heard it's coming down at the rate of a
> foot of snow per day....  I'm going skiing this weekend.  :-)

Right on, thanks Yan.

- Grant
Josh Millstein | 1 Feb 17:47

Converting MOV to FLV and having audio / video sync problems

Hello,

I have been using ffmpeg for a year or so now and just recently have been
having problems with converting movs to flvs.  The audio video sync is
messed up on some of the files (mov) that are uploaded.  I tried to convert
these files with the video exporter in CS3 and they work pretty good, just
the ffmpeg conversion is giving me that bad result.  I ran a few different
tests on the same input trying to get a nicely sunk flv.  Here is what I
ran.  Can somebody let me know if there is a nice 'will work consistently'
way to do this, or check out my calls to ffmpeg and let me know if I'm doing
something stupid.

ffmpeg -i ./Ordal_Oscar.mov -s 400x300 -qscale 4 -acodec libmp3lame -ar
44100 -r 15 ./testOut.flv

ffmpeg -i ./Ordal_Oscar.mov -s 400x300 -qscale 4 -acodec libmp3lame -ar
44100 ./testOutNoFILMRATE.flv

ffmpeg -i ./Ordal_Oscar.mov -s 400x300 -acodec libmp3lame -ar 44100 -r 15
./testOutNOQSCALE.flv

ffmpeg -i ./Ordal_Oscar.mov -s 400x300 ./testOutNOANYTHING.flv

Thanks,

Josh
--

-- 
wolf <at> wolffebrothers.com
785-832-9154
(Continue reading)


Gmane