Commit fd69c82d authored by Jan Gerber's avatar Jan Gerber
Browse files

more files to ./src

parent 1ac4b793
Compiling from SVN
------------------
If you donwloaded ffmpeg2theora from svn you have
need automake 1.6 or later to build the configure script.
If you donwloaded ffmpeg2theora from svn you need
automake 1.8 or later to build the configure script.
To do this run ./autogen.sh
Then build as you would from a tarball.
......@@ -36,14 +36,6 @@ need root privileges for this, ie.:
sudo make install
Compiling on windows using mingw32:
---------------------------------
you have to compile libvorbis, libogg, libtheora
configure ffmpeg like this:
./configure --disable-encoder --enable-libogg --enable-vorbis --enable-theora \
--enable-pp --enable-a52 --enable-gpl
vhook suppport
--------------
......@@ -52,7 +44,6 @@ the installed shared libs. otherwise one gets errors like this:
undefined symbol: av_read_frame
this is a known limitation of vhooks in ffmpeg.
subtitles suppport
------------------
......
......@@ -8,9 +8,9 @@ EXTRA_DIST = Makefile get_ffmpeg_svn.sh \
bin_PROGRAMS = ffmpeg2theora
ffmpeg2theora_SOURCES = ffmpeg2theora.c theorautils.c subtitles.c \
ffmpeg2theora.h theorautils.h subtitles.h
ffmpeg2theora_SOURCES = src/ffmpeg2theora.c src/theorautils.c src/subtitles.c \
src/ffmpeg2theora.h src/theorautils.h src/subtitles.h
ffmpeg2theora_LDFLAGS = -L$(prefix)/lib @XIPH_LIBS@ @KATE_LIBS@ @FFMPEG_LIBS@
ffmpeg2theora_CFLAGS = @XIPH_CFLAGS@ @KATE_CFLAGS@ @FFMPEG_CFLAGS@
ffmpeg2theora_CFLAGS = -I./src @XIPH_CFLAGS@ @KATE_CFLAGS@ @FFMPEG_CFLAGS@
man_MANS = ffmpeg2theora.1
......@@ -6,7 +6,6 @@ the binary. the idea is to provide ffmpeg2theora as a binary
along sites like v2v.cc to enable as many people as possible
to encode video clips with the same settings.
usage right now:
./ffmpeg2theora clip.avi
will produce clip.ogv
......
......@@ -22,7 +22,6 @@ env.Append(CCFLAGS=[
'-DPACKAGE_VERSION=\\"%s\\"' %pkg_version,
'-DPACKAGE_STRING=\\"%s-%s\\"' %(pkg_name, pkg_version),
'-DPACKAGE=\\"%s\\"' % pkg_name,
'-DVERSION=\\"%s\\"' %pkg_version,
])
#if env['CC'] == 'gcc':
# env.Append(CCFLAGS=["-g", "-O2", "-Wall"])
......@@ -81,13 +80,13 @@ if conf.CheckPKG(KATE_LIBS):
env.Append(CCFLAGS=['-DHAVE_KATE', '-DHAVE_OGGKATE'])
else:
print """
Could not find %s.
update PKG_CONFIG_PATH to point to ffmpeg's source folder
or run ./get_libkate.sh (for more information see INSTALL)
""" % KATE_LIBS
Could not find libkate. Subtitles support will be disabled.
You can also run ./get_libkate.sh (for more information see INSTALL)
or update PKG_CONFIG_PATH to point to libkate's source folder
"""
env = conf.Finish()
# ffmpeg2theora
ffmpeg2theora = env.Copy()
ffmpeg2theora_sources = glob('*.c')
ffmpeg2theora_sources = glob('src/*.c')
ffmpeg2theora.Program('ffmpeg2theora', ffmpeg2theora_sources)
- remove global variable info
- more commandline options
- think of adding noise reduction(best would be integration of denoise3d)
- allow frame size not multiple of 16.
- add option for pixel aspect ratio
......@@ -6,12 +6,12 @@ baseurl="http://libkate.googlecode.com/files/libkate-$version.tar.gz"
which wget >& /dev/null
if [ $? -eq 0 ]
then
wget "$baseurl"
test -e "libkate-$version.tar.gz" || wget "$baseurl"
else
which curl >& /dev/null
if [ $? -eq 0 ]
then
curl "$baseurl"
test -e "libkate-$version.tar.gz" || curl "$baseurl" -o "libkate-$version.tar.gz"
else
echo "Neither wget nor curl were found, cannot download libkate"
exit 1
......
#ifndef _F2T_FFMPEG2THEORA_H_
#define _F2T_FFMPEG2THEORA_H_
#include "subtitles.h"
typedef enum {
ENC_UNSET,
ENC_UTF8,
ENC_ISO_8859_1,
} F2T_ENCODING;
typedef struct ff2theora_subtitle{
char *text;
size_t len;
double t0;
double t1;
} ff2theora_subtitle;
typedef struct ff2theora_kate_stream{
const char *filename;
size_t num_subtitles;
ff2theora_subtitle *subtitles;
size_t subtitles_count; /* total subtitles output so far */
F2T_ENCODING subtitles_encoding;
char subtitles_language[16];
char subtitles_category[16];
} ff2theora_kate_stream;
typedef struct ff2theora{
AVFormatContext *context;
int video_index;
int audio_index;
int deinterlace;
int vhook;
int audiostream;
int sample_rate;
int channels;
int disable_audio;
float audio_quality;
int audio_bitrate;
int preset;
int picture_width;
int picture_height;
double fps;
struct SwsContext *sws_colorspace_ctx; /* for image resampling/resizing */
struct SwsContext *sws_scale_ctx; /* for image resampling/resizing */
ReSampleContext *audio_resample_ctx;
ogg_int32_t aspect_numerator;
ogg_int32_t aspect_denominator;
double frame_aspect;
int pix_fmt;
int video_quality;
int video_bitrate;
int sharpness;
int keyint;
char pp_mode[255];
double force_input_fps;
int sync;
/* cropping */
int frame_topBand;
int frame_bottomBand;
int frame_leftBand;
int frame_rightBand;
int frame_width;
int frame_height;
int frame_x_offset;
int frame_y_offset;
/* In seconds */
int start_time;
int end_time;
AVRational framerate_new;
double pts_offset; /* between given input pts and calculated output pts */
int64_t frame_count; /* total video frames output so far */
int64_t sample_count; /* total audio samples output so far */
size_t n_kate_streams;
ff2theora_kate_stream *kate_streams;
// ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv
double video_gamma;
double video_bright;
double video_contr;
double video_satur;
int y_lut_used;
int uv_lut_used;
unsigned char y_lut[256];
unsigned char uv_lut[256];
}
*ff2theora;
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment