Log in

View Full Version : ffmpeg2theora with derf's theora codec support


bond
23rd July 2005, 13:49
j^ has ported his ffmpeg2theora tool to be able to be used with derf's theora encoder which makes use of the full features theora offers and not only the ones which were also there in vp3 (as supported in the reference theora encoder)

the sources can be found here: ffmpeg2theora-exp (http://trac.xiph.org/cgi-bin/trac.cgi/browser/experimental/j/ffmpeg2theora-exp/) and derf's encoder (http://trac.xiph.org/cgi-bin/trac.cgi/browser/experimental/derf/theora-exp/)

anyone wanting to make a compile for testing this? :)

ak
23rd July 2005, 22:15
You can get one here: http://4nykey.nm.ru/bin/ffmpeg2theora-svn.exe

bond
23rd July 2005, 22:22
thx, but are you sure that this is with derf's encoder? did you do the compiles?

ak
23rd July 2005, 22:28
Well, yes, it says 'ffmpeg2theora-exp 0.13-svn' and oggs it produces decodable only with libtheora-exp. If I upped the right one that is :)

bond
23rd July 2005, 22:29
thanks a lot! :)

hellfred
28th July 2005, 08:31
I just cant get ffmpeg2theora to crop my clip
:stupid:
ffmpeg2theora -h states:
ffmpeg2theora-exp 0.13-svn

usage: ffmpeg2theora-exp [options] input

Output options:
--output,-o alternative output
--width, -x scale to given size
--height,-y scale to given size
--aspect define frame aspect ratio: i.e. 4:3 or 16:9
--crop[top|bottom|left|right] crop input before resizing
...
Here a list of commands that I have tried, all in vain.

::ffmpeg2theora --crop=8:8:8:8 -o out.ogg prodigy90_med.mpg
::ffmpeg2theora -croptop 32 -cropbottom 32 -cropleft 32 -cropright 32 -o out.ogg Suzuka.avi
::ffmpeg2theora -o out.ogg Suzuka.avi
::ffmpeg2theora -i Suzuka.avi -croptop 32 -cropbottom 32 -cropleft 32 -cropright 32 -o out.ogg
::ffmpeg2theora --crop 8|8|8|8 -o out.ogg Suzuka.avi > out.txt
::ffmpeg2theora --crop 8 | 8 | 8 | 8 -o out.ogg Suzuka.avi > out.txt
::ffmpeg2theora --crop [8 | 8 | 8 | 8] -o out.ogg Suzuka.avi > out.txt
::ffmpeg2theora --crop [8|8|8|8] -o out.ogg Suzuka.avi > out.txt
::ffmpeg2theora --crop=[8|8|8|8] -o out.ogg Suzuka.avi > out.txt
::ffmpeg2theora --crop=[8 | 8 | 8 | 8] -o out.ogg Suzuka.avi > out.txt
::ffmpeg2theora --crop 8:8:8:8 -o out.ogg Suzuka.avi > out.txt
ffmpeg2theora --crop=8:8:8:8 -o out.ogg Suzuka.avi > out.txt
PAUSE


E:\Rechner\Neu\Import\ffmpeg2theora>ffmpeg2theora --crop=8:8:8:8 -o out.ogg Suzu
ka.avi 1>out.txt
ffmpeg2theora: ambiguous option -- crop
Input #0, avi, from 'Suzuka.avi':
Duration: 00:24:03.8, start: 0.000000, bitrate: 1018 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x480, 23.98 fps
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Resize: 640x480
Resample: 48000Hz => 44100Hz
0:00:00.04 audio: 0kbps video: 7480kbps
The output shows ffmpegg2theora`s typical error message, if ffmepg2theora starts up at all. As one can see, the source is modolo 16, and encoding without cropping works just fine. But I want to encode some TV-captures with bad edges that need to be cutted badly.
Can anybody please enlighten me, how to set cropping values.

Hellfred

EDIT:
Googling for "ffmpeg2thora crop" brought up the solution:

ffmpeg2theora --croptop 16 --cropbottom 16 --cropright 32 --cropleft 16 -o out.ogg Suzuka.avi > out.txt

bill_baroud
28th July 2005, 08:48
how's the quality compared to "reference" theora ?

hellfred
28th July 2005, 09:44
how's the quality compared to "reference" theora ?
Sorry, that i do not know, as i never used that one. But just try yourself. Win32-binaries are available for both and the usage of ffmpeg2theora is quite simple. I have to hunt bugs right now. :)

Hellfred

bond
28th July 2005, 19:36
hellfred, i also struggled with its crop option and this is how it works:
--croptop 82 --cropbottom 78 aso :)

how's the quality compared to "reference" theora ?i would say its worse than the reference one

but derfs decoder is both faster and complete

hellfred
29th July 2005, 08:41
Yes, last night I encoded the same clip already used for testing derfs encoder with standardt ffmpeg2theora, featuring the mmx-enhanced reference encoder. Derfs encode was a little bit sharper (only set quality with -v 10 to max) but had much more block artefacts e.g. in the sky and more ringing. Source was a vob that needed to be deinterladed (-d).

PatchWorKs
29th July 2005, 09:48
Why not porting these 'enhanced' features to ffvfw ?

...FairUse (http://www.dvd-guides.com/component/option,com_simpleboard/Itemid,61/func,view/id,11493/catid,26/) is going to become the 1st DVD Backup tool that encodes by it. :eek:

dimzon
29th July 2005, 10:36
how about AviSynth support???

hellfred
30th July 2005, 08:54
Hi
I have made yet anoter test comparing the two ffmpeg2theora. This time the source was a video clip, captured with my analog tv-card. The Source has only low quality, was captured als lossless MJPEG and was being properly deinterlaced croped and resized (modolo16) before encoding. Deinterlacing was done using kerneldeint.
Again, derf showed much more blocks as the mmx-enhanced reference encoder.

Hellfred

bond
31st July 2005, 15:47
how about AviSynth support???you can feed ffmpeg2theora with .avs via akupenguin's avs2yuv tool

Why not porting these 'enhanced' features to ffvfw ffvfw is not existing anymore

and ffdshow already includes the theora reference encoder and can even output to .ogg! (yeah .ogg, not .ogm)

PatchWorKs
5th August 2005, 09:26
ffvfw is not existing anymore

What you mean ?
It's present in the last ffdshow build. :confused:

celtic_druid
5th August 2005, 10:06
Well not exactly. There is a VfW wrapper called ff_vfw, but ffvfw as a project as said doesn't exist any more... There is just ffdshow.

PatchWorKs
5th August 2005, 13:04
oh, well... you mean they merged. I know.

Sirber
18th March 2006, 15:56
you can feed ffmpeg2theora with .avs via akupenguin's avs2yuv toolAny way to feed ffmpeg2theora with .avs and have sound? :)

celtic_druid
18th March 2006, 16:15
Well I guess you could pipe from avs2wav to ffmpeg.

Sirber
18th March 2006, 17:21
Is there a way to pipe video and audio from .avs at the same time? ;)

celtic_druid
18th March 2006, 18:29
Just having a look at Mobilehackerz changes and it looks like it supports audio. Just need to apply them to ffmpeg2theora and you are set.

Sirber
18th March 2006, 18:37
to avs2yuv? I don't understand

celtic_druid
18th March 2006, 19:31
No I am talking about ffmpeg2theora supporting avs input directly.
Just build a current cvs ffmpeg with AVISynth input. I'll see about an ffmpeg2theora build.

Sirber
18th March 2006, 19:39
I'm not familiar with compiling using mingw. I'll be pretty happy if you can make a ffmpeg2theora (v0.16) build with avs input :D

celtic_druid
18th March 2006, 20:03
get_ffmpeg_cvs.sh
autogen.sh
make

http://celticdruid.no-ip.com/xvid/
Those who don't have access will have to wait for it to be mirrored.

Sirber
18th March 2006, 20:09
I can't find "ffmpeg2theora-avs.7z" in the sections nor mirrors. Where did you place it?

Thanks for your efforts! :D

celtic_druid
18th March 2006, 20:17
It is under Misc or rather will be when it gets mirrored. At the moment it is on my server, but not publically available.

Sirber
18th March 2006, 20:24
Could you please PM me a link? I'd like to try ASAP.
I wanna use it with FreeAnime :)

Sirber
18th March 2006, 20:42
C:\Projets\FreeAnime\output\ffmpeg2theora.exe -v 3 -S 2 --optimize -a -2 -H 44100 "D:\Tests\1.avs"

Doesn't work. Says:
The Vorbis encoder could not set up a mode according to
the requested quality or bitrate.

-a -1 work though.
-a -2 was working in 0.16.

About AVS, it works :D

Input #0, avs, from 'D:\Tests\1.avs':
Duration: 00:00:23.8, start: 0.000000, bitrate: 0 kb/s
Stream #0.0, 23.98 fps(r): Video: rawvideo, yuv420p, 640x480
Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Resize: 640x480
Resample: 48000Hz => 44100Hz

celtic_druid
18th March 2006, 20:47
Different libvorbisenc I guess. Not all versions do -2. Can't remember what lib I have installed. Guess I should update to the latest aotuv. Don't think it would work with lancer without some mods.

edit:
pkg-config --modversion vorbisenc returns
1.1.3svn

Sirber
18th March 2006, 20:53
That's the latest? 1.1.3

celtic_druid
18th March 2006, 20:57
Latest is 1.1.2 I believe. So yeah I had a current svn build. Think it is as simple as Xiph source not doing -2. Although didn't they merge an earlier aotuv? Think -2 has been supported since aotuv beta3 or so.

Sirber
18th March 2006, 21:05
I've seen -2 in the latest oggdropxp and -2 is avalible in belight.

Sad :(

celtic_druid
18th March 2006, 21:16
That would be the aotuv_b4.51 version of oggdrop right?

Anyway, I linked against aotuv b4.51 so -2 is now available.

Sirber
18th March 2006, 21:18
Many thanks!!! :D

same place? ;)

Sirber
18th March 2006, 21:25
Works! :D

Good work!!! :D

PatchWorKs
20th March 2006, 10:17
That would be the aotuv_b4.51 version of oggdrop right?

Check out Ogg Vorbis acceleration project (http://homepage3.nifty.com/blacksword/index_e.htm) too... :cool:

celtic_druid
20th March 2006, 10:52
Don't think it would work with lancer without some mods.

Still I might investigate.

Sirber
20th March 2006, 13:04
The website don't explain much. What is Lancer about?

pest
20th March 2006, 13:21
What is Lancer about?

sse & sse2 optimized. about 60%-90% faster.

Sirber
20th March 2006, 13:22
sse & sse2 optimations. about 60%-90% faster.That is something nice :D

Selur
29th March 2006, 12:05
does anyone know if there are plans for 2pass encoding with theora?

bond
30th March 2006, 13:06
does anyone know if there are plans for 2pass encoding with theora?ffdshow supports it already

Sirber
30th March 2006, 13:12
CLI is better than VFW. Could be cool to have it in ffmpeg2theora .

bond
30th March 2006, 13:29
there are so many things that would be cool, its that someone has to code it ;)

Sirber
30th March 2006, 13:32
not sure I could do it with php and delphi ;)

Sirber
3rd July 2006, 23:09
any way to put avisynth support in ffmpeg2theora?

celtic_druid
4th July 2006, 03:50
Read above. Already been done. I used Mobilehackerz patch, so video and audio is supported.

Sirber
4th July 2006, 12:21
seems I have ffmpeg2theora 0.16 and it dislike avs
can I have a link for your latest version please? thanks!

[edit]

found it, thanks!