diff options
author | deva <deva> | 2005-05-25 15:36:05 +0000 |
---|---|---|
committer | deva <deva> | 2005-05-25 15:36:05 +0000 |
commit | d4017394ba8868e5d44b5cc01a59c100cbaf953f (patch) | |
tree | 81345aa9521c3397363b6c3afe1ef19bb860c776 | |
parent | 0e7d7464b0f87ce82fa5c48e350a2d51fcef4882 (diff) |
Added mpeg4 encoding to the encoders, controllable by the config file.R0_2_3
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | TODO | 12 | ||||
-rw-r--r-- | etc/miav.conf | 14 | ||||
-rw-r--r-- | src/mov_encoder.cc | 24 |
4 files changed, 41 insertions, 11 deletions
@@ -5,7 +5,7 @@ Changelog for MIaV May 24 2005 - MIaV version 0.2.3 --------------------------------------- New Features: - - + - Mpeg4 encoding option. Bug Fixes: - Made unfreeze close connection, when no recording is done. - Made info (error message system) work correctly. @@ -13,9 +13,8 @@ http://www.linuxmanpages.com/man3/fame_start_frame.3.php // YUV420 format specification http://encyclopedia.laborlawtalk.com/YUV_4:2:0 -- multithreded encoding -- fopen med create unique - +- open med create unique +- libFame frames have no timecodes!!! ========================================================================== @@ -88,7 +87,9 @@ MovEncoder: [x] - Test Mpeg4. (no good) [x] - Remove ffmpeg code. [ ] - Enable sound. - [x] - Find good quality settings (Best quality less than 22mb/s realtime encoded) + [x] - Find good quality settings + (Best quality less than 22mb/s realtime encoded) + [x] - Multithread encoding, for multi cpu support. Main: [ ] - Save movie signal handling. @@ -96,7 +97,8 @@ Main: [x] - Use correct filenames and paths. [x] - Check for writabilty before trying to do any writing. [x] - Create fallback, when unable to write the requested filename. - [x] - Permissions on server file writing. Files: u+wr g+r a+x - Directories: u+wrx g+rx a+rx. + [x] - Permissions on server file writing. + Files: u+wr g+r a+x - Directories: u+wrx g+rx a+rx. [ ] - Permissions on server file writing to be read from config. ========================================================================== diff --git a/etc/miav.conf b/etc/miav.conf index 8b700e7..24b1eea 100644 --- a/etc/miav.conf +++ b/etc/miav.conf @@ -21,17 +21,23 @@ server_addr = "192.168.0.10" server_port = 18120 # Where top store the files recieved by the server -server_root = "/home/miav/miav_files" +server_root = "/tmp/miav_files" # Video output controls. A sequence of I and P, where I is keyframes # which is fast to create, but uses a lot of discspace. # B uses changes since last frame, is more cpu intensive, but uses a # lot less diskspace than I frames -frame_sequence = "IIPIP" +frame_sequence = "IPPPP" # quality in % - 100% is best quality -frame_quality = 80 +frame_quality = 85 -# The number of threads started for paralel encoding on the server +# The number of threads started for parallel encoding on the server # (for multiprocessor systems) encoding_threads = 2 + +# Codec is one of the following: +# "mpeg1" For use with mpeg1 encoding. +# "mpeg4" for use with mpeg4 encoding +# default is "mpeg1" +encoding_codec = "mpeg4" diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index 0a478fc..e052893 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.25 2005/05/25 15:36:05 deva + * Added mpeg4 encoding to the encoders, controllable by the config file. + * * Revision 1.24 2005/05/22 15:49:22 deva * Added multithreaded encoding support. * @@ -205,8 +208,27 @@ MovEncoder::MovEncoder(sem_t *r_sem, static const char profilename[] = "MIaV\0"; fame_par.profile = profilename; // profile name fame_par.total_frames = 0; // total number of frames - // fame_par.stats = NULL; // No need for statistics at the moment + if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg4") == 0) { + + fprintf(stderr, "Using mpeg4 compression\n"); fflush(stderr); + fame_object_t *object; + + object = fame_get_object(fame_context, "profile/mpeg4/simple"); + if(object) fame_register(fame_context, "profile", object); + + } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { + + fprintf(stderr, "Using mpeg1 compression\n"); fflush(stderr); + fame_object_t *object; + + object = fame_get_object(fame_context, "profile/mpeg1"); + if(object) fame_register(fame_context, "profile", object); + + } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { + } else { + fprintf(stderr, "Using default (mpeg1) compression\n"); fflush(stderr); + } fame_init(fame_context, &fame_par, fame_buffer, FAME_BUFFER_SIZE); |