FYI, I have proposed the attached patch (against Debian source) upstream.
Regards, -- Theppitak Karoonboonyanan http://linux.thai.net/~thep/
Index: imagination-3.0/src/export.c =================================================================== --- imagination-3.0.orig/src/export.c +++ imagination-3.0/src/export.c @@ -214,7 +214,7 @@ img_prepare_audio( img_window_struct *im while( gtk_tree_model_iter_next( model, &iter ) ); } - /* If no audio is present, simply update ffmpeg command line with -an */ + /* If no audio is present, simply update avconv command line with -an */ if( i == 0 ) { /* Replace audio place holder */ @@ -274,7 +274,7 @@ img_prepare_audio( img_window_struct *im * img_start_export: * @img: global img_wndow_struct structure * - * This function performs the last export step - spawns ffmpeg and initiates the + * This function performs the last export step - spawns avconv and initiates the * export progress indicators. * * Return value: Always returns FALSE, since we want it to be removed from main @@ -453,11 +453,11 @@ img_stop_export( img_window_struct *img /* Do any additional tasks */ if( img->export_is_running > 3 ) { - kill( img->ffmpeg_export, SIGINT ); + kill( img->avconv_export, SIGINT ); g_source_remove( img->source_id ); close(img->file_desc); - g_spawn_close_pid( img->ffmpeg_export ); + g_spawn_close_pid( img->avconv_export ); /* Destroy images that were used */ cairo_surface_destroy( img->image1 ); @@ -510,7 +510,7 @@ img_stop_export( img_window_struct *img img->fifo = NULL; } - /* Free ffmpeg cmd line */ + /* Free avconv cmd line */ g_free( img->export_cmd_line ); /* Indicate that export is not running any more */ @@ -647,7 +647,7 @@ img_run_encoder( img_window_struct *img ret = g_spawn_async_with_pipes( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, &img->ffmpeg_export, + NULL, NULL, &img->avconv_export, &img->file_desc, NULL, /* print to standard_output */ NULL, /* print to standard_error */ @@ -858,7 +858,7 @@ img_export_still( img_window_struct *img * img_export_pause_unpause: * @img: * - * Temporarily disconnect export functions. This doesn't stop ffmpeg!!! + * Temporarily disconnect export functions. This doesn't stop avconv!!! */ static void img_export_pause_unpause( GtkToggleButton *button, @@ -1140,14 +1140,14 @@ img_export_frame_to_ppm( cairo_surface_t * img_get_exporters function. * * Each exporter function receives pointer to main img_window_struct structure, - * from which it calculates appropriate ffmpeg export string. + * from which it calculates appropriate avconv export string. * * Structure, passed in as a parameter, should be treated like read-only * information source. Exceptions to this rule are export_fps and * export_cmd_line fields. Those fields MUST be set to appropriate value. * - * For example, if we spawn ffmpeg with "-r 25" in it's cmd line, export_fps - * should be set to 25. This will ensure that ffmpeg will receive proper amount + * For example, if we spawn avconv with "-r 25" in it's cmd line, export_fps + * should be set to 25. This will ensure that avconv will receive proper amount * of data to fill the video with frames. * * String should be newly allocated using g_strdup(_printf)? functions, since @@ -1172,8 +1172,8 @@ void img_exporter_vob( img_window_struct GtkWidget *hbox; GtkWidget *radio1, *radio2; - /* ffmpeg test */ - gchar *ffmpeg_test_result; + /* avconv test */ + gchar *avconv_test_result; gchar **argv; gint argc; @@ -1235,16 +1235,16 @@ void img_exporter_vob( img_window_struct aspect_ratio = "16:9"; - /* Check if ffmpeg is compiled with avfilter setdar */ - img_message(img, FALSE, "Testing ffmpeg abilities with \"ffmpeg -filters\" ... "); + /* Check if avconv is compiled with avfilter setdar */ + img_message(img, FALSE, "Testing avconv abilities with \"avconv -filters\" ... "); - g_shell_parse_argv("ffmpeg -filters", &argc, &argv, NULL); + g_shell_parse_argv("avconv -filters", &argc, &argv, NULL); g_spawn_sync(NULL, argv, NULL, G_SPAWN_STDERR_TO_DEV_NULL|G_SPAWN_SEARCH_PATH, NULL, NULL, - &ffmpeg_test_result, NULL, + &avconv_test_result, NULL, NULL, NULL); - if (NULL != ffmpeg_test_result && NULL != g_strrstr(ffmpeg_test_result, "setdar")) + if (NULL != avconv_test_result && NULL != g_strrstr(avconv_test_result, "setdar")) { img_message(img, FALSE, "setdar found!\n"); aspect_ratio_cmd = "-vf setdar="; @@ -1257,7 +1257,7 @@ void img_exporter_vob( img_window_struct } g_strfreev( argv ); - cmd_line = g_strdup_printf( "ffmpeg -f image2pipe -vcodec ppm -r %.0f " + cmd_line = g_strdup_printf( "avconv -f image2pipe -vcodec ppm -r %.0f " "-i pipe: <#AUDIO#> -y " "-bf 2 -target %s-dvd -s %dx%d %s%s \"%s\"", img->export_fps, @@ -1398,7 +1398,7 @@ img_exporter_ogv( img_window_struct *img return; } - /* User is serious, so we better prepare ffmpeg command line;) */ + /* User is serious, so we better prepare avconv command line;) */ img->export_is_running = 1; img->export_fps = 30; filename = gtk_entry_get_text( entry ); @@ -1448,9 +1448,9 @@ img_exporter_ogv( img_window_struct *img break; } - cmd_line = g_strdup_printf( "ffmpeg -f image2pipe -vcodec ppm -r %.0f " + cmd_line = g_strdup_printf( "avconv -f image2pipe -vcodec ppm -r %.0f " "-i pipe: <#AUDIO#> -f ogg -aspect %s -s %dx%d " - "-vcodec libtheora -b %dk -acodec libvorbis " + "-vcodec libtheora -b:v %dk -acodec libvorbis " "-y \"%s\"", img->export_fps, aspect_ratio, width, height, qualities[i], filename ); @@ -1582,12 +1582,12 @@ img_exporter_flv( img_window_struct *img return; } - /* User is serious, so we better prepare ffmpeg command line;) */ + /* User is serious, so we better prepare avconv command line;) */ img->export_is_running = 1; img->export_fps = 30; filename = gtk_entry_get_text( entry ); - /* The -aspect parameter for FLV format seems to be ignored by ffmpeg */ + /* The -aspect parameter for FLV format seems to be ignored by avconv */ if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( radio1 ) ) ) { switch(gtk_combo_box_get_active(GTK_COMBO_BOX(video_size_combo)) ) @@ -1655,7 +1655,7 @@ img_exporter_flv( img_window_struct *img break; } - cmd_line = g_strdup_printf( "ffmpeg -f image2pipe -vcodec ppm -r %.0f " + cmd_line = g_strdup_printf( "avconv -f image2pipe -vcodec ppm -r %.0f " "-i pipe: <#AUDIO#> -f flv -s %dx%d " "-vcodec flv -b %dk -acodec libmp3lame -ab 56000 " "-ar 22050 -ac 1 -y \"%s\"", @@ -1738,7 +1738,7 @@ img_exporter_3gp( img_window_struct *img return; } - /* User is serious, so we better prepare ffmpeg command line;) */ + /* User is serious, so we better prepare avconv command line;) */ img->export_is_running = 1; img->export_fps = 25; filename = gtk_entry_get_text( entry ); @@ -1767,9 +1767,9 @@ img_exporter_3gp( img_window_struct *img break; } - cmd_line = g_strdup_printf( "ffmpeg -f image2pipe -vcodec ppm -r %.0f " + cmd_line = g_strdup_printf( "avconv -f image2pipe -vcodec ppm -r %.0f " "-i pipe: <#AUDIO#> -f 3gp -s %dx%d " - "-vcodec h263 -acodec libfaac -b 192k -ab 32k " + "-vcodec h263 -acodec aac -strict experimental -b 192k -ab 32k " "-ar 8000 -ac 1 -y \"%s\"", img->export_fps, width, height, filename ); Index: imagination-3.0/src/imagination.h =================================================================== --- imagination-3.0.orig/src/imagination.h +++ imagination-3.0/src/imagination.h @@ -360,7 +360,7 @@ struct _img_window_struct . free cmd_line . free audio_file 4 - exporting video (post-spawn) - . kill ffmpeg + . kill avconv . free cmd_line . free audio_file */ @@ -370,10 +370,10 @@ struct _img_window_struct GtkWidget *export_label; GtkWidget *export_dialog; gdouble export_fps; /* Frame rate for exported video */ - gchar *export_cmd_line; /* ffmpeg spawn cmd line */ + gchar *export_cmd_line; /* avconv spawn cmd line */ guint export_slide; /* Number of slide being exported */ GSourceFunc export_idle_func; /* Stored procedure for pause */ - GPid ffmpeg_export; /* ffmpeg's process id */ + GPid avconv_export; /* avconv's process id */ /* Sox thread related variables */ gint sox_flags; /* Thread controls: