Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Simon Jolle sjolle

Hi Debian users

I am running a forum with small video clips (from YouTube and others). I
convert those Macromedia Flash videos with:

$ mencoder example.flv -ovc xvid -xvidencopts bitrate=1000:autoaspect
-vf pp=lb -oac mp3lame -lameopts fast:preset=standard -o example.avi

I use mencoder RPM from Dag Wieers

1) Its very generic command line to convert videos. What would you
improve? The size is much bigger than the original FLV :(

2) Is there a real open source format what I should prefer? Can you say
something about its quality?

3) Whats the most painless format for exchanging videos with Win, Mac
and Linux users?

cheers
Simon





signature.asc
Description: OpenPGP digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Pol Hallen
> $ mencoder example.flv -ovc xvid -xvidencopts bitrate=1000:autoaspect
> -vf pp=lb -oac mp3lame -lameopts fast:preset=standard -o example.avi

> 1) Its very generic command line to convert videos. What would you
> improve? 
What's improve? Only the file size or also the quality?

> The size is much bigger than the original FLV :( 
Sure! U do the coding at 1000kb/s
I remember that flv files (from youtube) are about 550Kb/s

try: ffmpeg -i file.flv to view the code

and try something like: ffmpeg -i source.flv -b 500k -vcodec mpeg4 -vtag 
divx -acodec mp3 -ar 8000k -ab 64k destination.avi

and check size/quality

> 2) Is there a real open source format what I should prefer? Can you say
> something about its quality?
Consider: are your file done for internet stream or local stream? and choose 
what you prefer :-)

> 3) Whats the most painless format for exchanging videos with Win, Mac
> and Linux users?
mhmh.. xvid/divx/mp3/ogg

Pol


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Carl Fink
On Sat, Jun 28, 2008 at 01:28:47PM +0200, Simon Jolle sjolle wrote:

> I am running a forum with small video clips (from YouTube and others). I
> convert those Macromedia Flash videos with:

Under US law, you may want to think about copyright issues.  I don't know
about any other country's laws.
 
> $ mencoder example.flv -ovc xvid -xvidencopts bitrate=1000:autoaspect
> -vf pp=lb -oac mp3lame -lameopts fast:preset=standard -o example.avi
> 
> I use mencoder RPM from Dag Wieers

There's a Debian packaged mencoder at debian-multimedia.org.  Just add that
repository to your sources.list.
 
> 1) Its very generic command line to convert videos. What would you
> improve? The size is much bigger than the original FLV :(

It's going to be.  The AVI container format isn't suitable for the very
smallest file size, and you're setting a high bit rate.
 
> 2) Is there a real open source format what I should prefer? Can you say
> something about its quality?

Ogg Theora springs to mind.  It's totally free (no patents, no nothing). 
Quality is good, but ...

> 3) Whats the most painless format for exchanging videos with Win, Mac
> and Linux users?

AVI works, actually.  Windows Media Video (WMV) is not open, but it's
playable on all three with the right software.  MP4 can be played on all
with the right software and will give you excellent compression.  Actually,
FLV is a good choice for web streaming.  You can play them locally, if you
can convince your users to install VLC or something.

BTW, I convert FLV to AVI with this command line:

ffmpeg -i filename.flv -sameq filename.avi

You can automate this with:

for i in *.flv ; do ffmpeg -i {} -sameq `basename {} flv`.avi ; done

Using "-sameq" gives you the same bit rates as the original file.  If
desired, you can specify codecs as well, but the default MPEG4 ASP and MP2
works for me.  (If size is an issue, force MP3 compression.)
-- 
Carl Fink   [EMAIL PROTECTED] 

Read my blog at blog.nitpicking.com.  Reviews!  Observations!
Stupid mistakes you can correct!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Jochen Schulz
Simon Jolle sjolle:
> 
> 1) Its very generic command line to convert videos. What would you
> improve? The size is much bigger than the original FLV :(

Why do you convert in the first place? Re-encoding files with a lossy
codec can only degrade their quality, no matter what bitrate you are
using.

> 2) Is there a real open source format what I should prefer? Can you say
> something about its quality?

AFAIK the only "real open source format" is Ogg Theora. Which codec
yields the best quality depends a little bit on the bitrate you are
using. H.264 is generally a good choice, though. You can use ffmpeg
(from debian-multimedia.org) for this, too.

J.
-- 
After the millenium I would tell lies only to those who deserved them.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Simon Jolle sjolle

On 06/28/2008 01:59 PM, Pol Hallen wrote:

What's improve? Only the file size or also the quality?


IMHO the quality of the original FLV is the same as my converted AVI. So
I only need to improve file size


Sure! U do the coding at 1000kb/s
I remember that flv files (from youtube) are about 550Kb/s



try: ffmpeg -i file.flv to view the code


thank you. Really good input!

Most clips even have much lower bitrate

$ ffmpeg -i example.flv
[...]
Seems stream 0 codec frame rate differs from container frame rate:
1000.00 (1000/1) -> 29.92 (359/12)
Input #0, flv, from 'example.flv':
  Duration: 00:01:03.5, start: 0.00, bitrate: 56 kb/s
  Stream #0.0: Video: flv, yuv420p, 320x240, 29.92 fps(r)
  Stream #0.1: Audio: mp3, 22050 Hz, mono, 56 kb/s
Must supply at least one output file

and try something like: ffmpeg -i source.flv -b 500k -vcodec mpeg4 -vtag 
divx -acodec mp3 -ar 8000k -ab 64k destination.avi


and check size/quality


$ ffmpeg -i example.flv -b 500k -vcodec mpeg4 -vtag divx -acodec mp3 -ar
8000k -ab 64k example.avi

$ du -sh example.*
4.4Mexample.avi
2.5Mexample.flv

With the size I am happy. But the quality is much worse (often it is
jumping to the next frame)

Consider: are your file done for internet stream or local stream? and choose 
what you prefer :-)


Not for streaming. Just let other users downloading and archiving.

cheers
Simon







signature.asc
Description: OpenPGP digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Simon Jolle sjolle

On 06/28/2008 08:28 PM, Jochen Schulz wrote:

Why do you convert in the first place? Re-encoding files with a lossy
codec can only degrade their quality, no matter what bitrate you are
using.


I know that re-encoding degrades the quality. But my eyes don't see the
difference :-)

I already described in other posting that I am not a fanboy of Adobe's
proprietary products, pricing policy, etc


AFAIK the only "real open source format" is Ogg Theora. Which codec
yields the best quality depends a little bit on the bitrate you are
using. H.264 is generally a good choice, though. You can use ffmpeg
(from debian-multimedia.org) for this, too.


How accepted is Ogg Theora in Non-Geek environments? Are the most
desktop and devics (Game Consoles, DVR, etc) users by default able to
play Ogg Theora?

cheers
Simon






signature.asc
Description: OpenPGP digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Simon Jolle sjolle

On 06/28/2008 04:36 PM, Carl Fink wrote:

Under US law, you may want to think about copyright issues.  I don't know
about any other country's laws.


Good input.


There's a Debian packaged mencoder at debian-multimedia.org.  Just add that
repository to your sources.list.


thanks.


It's going to be.  The AVI container format isn't suitable for the very
smallest file size, and you're setting a high bit rate.


Ogg Theora springs to mind.  It's totally free (no patents, no nothing). 
Quality is good, but ...


Not the right codec for Mac and Windows users (software not available)?


AVI works, actually.  Windows Media Video (WMV) is not open, but it's
playable on all three with the right software.  MP4 can be played on all
with the right software and will give you excellent compression.  Actually,
FLV is a good choice for web streaming.  You can play them locally, if you
can convince your users to install VLC or something.


I don't wish to use FLV because its a proprietary format developed and
maintained by one company. I don't wish to support closed formats.
Streaming is not a requirement for me.

It means AVI is the best choice for out-of-the-box playing on all
platforms and devices?


BTW, I convert FLV to AVI with this command line:

ffmpeg -i filename.flv -sameq filename.avi

You can automate this with:

for i in *.flv ; do ffmpeg -i {} -sameq `basename {} flv`.avi ; done

Using "-sameq" gives you the same bit rates as the original file.  If
desired, you can specify codecs as well, but the default MPEG4 ASP and MP2
works for me.  (If size is an issue, force MP3 compression.)


With your command line options the size problem still exists:

$ du -sk test*
10072   test.avi
2464test.flv
10104   test_mp3.avi

cheers
Simon





signature.asc
Description: OpenPGP digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Jochen Schulz
Simon Jolle sjolle:
> On 06/28/2008 08:28 PM, Jochen Schulz wrote:
>> Why do you convert in the first place? Re-encoding files with a lossy
>> codec can only degrade their quality, no matter what bitrate you are
>> using.
> 
> I know that re-encoding degrades the quality. But my eyes don't see the
> difference :-)

But only because you choose to use a bitrate larger than the original
file. :)

> How accepted is Ogg Theora in Non-Geek environments?

Not at all. It is even quite uncommon in non-geek environments.

> Are the most desktop and devics (Game Consoles, DVR, etc) users by
> default able to play Ogg Theora?

Probably not. But by default you can't play many formats on most Windows
machines anyway. I advise Windows users to install VLC every time they
have trouble playing videos.

J.
-- 
I am no longer prepared to give you the benefit of the doubt.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Jochen Schulz
Simon Jolle sjolle:
> 
> It means AVI is the best choice for out-of-the-box playing on all
> platforms and devices?

AVI is only a container for audio and video content. It can contain
video encoded in many formats (MPEG2, MPEG4, H.264 etc). Just because a
player knows the container format doesn't mean it can decode the
content.

BTW, AVI is obsolete. MP4 (a container format defined in the MPEG4
standard) appears to become the new standard.

So what you're aiming for is to find the right combination of container,
video codec and audio codec. My suggestion would be to use H.264 video
and AAC audio in an MP4 container. If you choose the right settings,
these files should be playable on video iPods and PS3s (and any computer
with current software).

>> BTW, I convert FLV to AVI with this command line:
>> 
>>  ffmpeg -i filename.flv -sameq filename.avi

This converts to MPEG4 (ffmpeg's default choice, at least on my system)
in an AVI container which is a bad combination:
http://en.wikipedia.org/wiki/AVI#Continued_use

J.
-- 
I cannot comprehend the idea of chemical and biological weapons.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Jochen Schulz
Jochen Schulz:
> Simon Jolle sjolle:
> 
>> How accepted is Ogg Theora in Non-Geek environments?
> 
> Not at all. It is even quite uncommon in non-geek environments.

Of course I meant to write "even quite uncommon on geek environments".

J.
-- 
When I am at nightclubs I enjoy looking at other people and assessing
their imagined problems.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Carl Fink
On Sun, Jun 29, 2008 at 12:15:15AM +0200, Jochen Schulz wrote:

Quoting me, but with attribution removed.

> >> BTW, I convert FLV to AVI with this command line:
> >> 
> >>ffmpeg -i filename.flv -sameq filename.avi
> 
> This converts to MPEG4 (ffmpeg's default choice, at least on my system)
> in an AVI container which is a bad combination:
> http://en.wikipedia.org/wiki/AVI#Continued_use

Aside from ideological purity, it makes little difference.  Using MP4 makes
the file something like 1% smaller, and with several players harder to seek
in.  I'm sure there's a way to tweak the MP4 to be more open to seeking, but
Good Enough is good enough for me.
-- 
Carl Fink   [EMAIL PROTECTED] 

Read my blog at blog.nitpicking.com.  Reviews!  Observations!
Stupid mistakes you can correct!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-28 Thread Paul Johnson
On Sat, 2008-06-28 at 13:28 +0200, Simon Jolle sjolle wrote:

> 2) Is there a real open source format what I should prefer? Can you say
> something about its quality?

Ogg is what you want.  It's probably currently best known for it's audio
layer, Vorbis, though it also has a video component called Theora.  From
my experience, Vorbis stacks up very nicely against MPEG, the latter
suffers from compression artifacts horribly at 128kbps when compared to
a similarly encoded Vorbis file, and the Vorbis file comes in smaller.

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: Open Source Video Codec and Container (alternative to Xvid)

2008-06-29 Thread Sam Kuper
Simon,

I have several points.

* For a (very) in-depth discussion of the merits of various codecs for
distributing video via the web, look for the "Theora" thread (the really
long one) in the WHATWG HTML5 mailing list archive.

* Since you're "not a fanboy of Adobe's proprietary products, pricing
policy, etc", I wonder why AVI is acceptable to you. It's not an Adobe
standard, but Microsoft's approach to licensing and pricing is certainly
closer to Adobe's than, say, Debian's.

* I was planning to say, "Your three requirements (1. distribute over www,
2. FLOSS-friendly, 3. highly cross-platform compatible) cannot be met." But
then I realised that actually they can. I'd suggest doing what Wikipedia
does: transcode your video to Ogg Theora, and make it playable on your forum
by embedding a Java applet Theora player. This meets all three requirements.

Regards,

Sam