Audio/Video/Image/Text/ISO Convert

Nautilus Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

50
Score 81.9%
Description:

Right-click on a file, and this script will decide what conversions are appropriate, ask some questions about what you want, and execute the proper command and options to convert it into something else.

Multimedia: change formats, bitrate, framerate, size, aspect ratio, and more. Also strip audio.
Audio: change formats, bitrate, volume, and more.
Multimedia and Audio: your most-used sets of options can be stored for future use.
Images: change formats, size, jpg compression, rotate, equalize, and more.
Documents: change formats, text-to-speech, text-to-jpg, and more.
Convert multi-image files, like pdf or animated gif, into a series of frames,
pdf to gif creates animaged gif, animated gif to pdf creates multi-page pdf.
Convert various "CD Images" into standard .iso files.

[li]Comments welcome, suggestions invited, votes appreciated.[/li]

There's a lot of description here, but you don't need any of it to make this work.
Just download and extract. Then do one or more of these with the file "avconvert":
(1) move (or copy or link) it to ~/.gnome2/nautilus-scripts
(2) move (or copy or link) it to somewhere in $PATH (eg /usr/local/bin)
..(obviously don't move it twice :-)
(3) do #2, then add it as a nautilus-action (The Command "Parameters" must be "space-separated list of selected filenames", and "Working Directory" must be "first base directory". On Fedora, these are %F and %d)
(4) add it to Gnome panel/launch-bar (drag/drop or right-click panel Add/Custom-Application)

...Depending on 1, 2, 3, and 4 above (you can do any combination of these), you can now:
(1) right-click on selected icon(s) and choose the script
(2) from command line: avconvert filename (quote name(s) with spaces, multiple files OK)
(3) right-click on selected icon(s) and choose "Avconvert"
(4) click the icon to launch -or- drag-and-drop file(s) on the icon

To repeat, you can do as many of these as you want. For example: move the file to ~/.gnome2/natuilus-scripts, then link that to /usr/local/bin, then add it as a nautilus-action, then add it to the gnome-panel.


Much more than a quick shortcut to a common command, this shell script is over 2000 lines of code!

[li]If you feel inclined not to vote "good", tell me why - I'm still actively developing this.
If you like it and you're not registered, take the time to sign up and vote....
After all, I took the time to write this and give it away! :-) :-)

If this has become a tool you use regularly, PLEASE consider a small donation
A lot of time and effort has gone into bringing this to the "free" world


[/li]

The first run will create some files in ~/.config/avconvert. The files "avconvert", "avconvert.lang", and "avconvert.ffopts.custom" may be hand-edited. A default file will be recreated if any file is missing.

When using Key-In-Options during audio or video conversion, your ffmpeg options can be saved into the menu for future use. When your Key-In options end in a comment (as in "# my conversion"), a line will be automatically added to the 'custom' section of the ffmpeg options menu.

There's a progress indicator during conversions. In most cases, it estimates that the result file will grow to the size of the source file. This is not always the case because depending on the conversion the result may be larger or smaller than the original, so it may only reach 25-30% and be finished or quickly rise to 98% and hover there depending on your conversion. Be patient - behind the scenes, the progress window stays up as long as the result file is growing.

AUDIO: Converts between various formats (see below).

VIDEO: Converts between various formats. Can also produce audio-only from a video source. Video size can be scaled by specifying a new width - the new height is calculated based on aspect ratio. A video can also be letter-boxed by choosing the aspect ratio of your display device - calculation automatically determines whether to pad on top/bottom or left/right. Videos can also be rotated to compensate for the type of recorder used (this feature is the only one that relies on mencoder). NOTE REGARDING ROTATION - mencoder has some codec limitations, and depending on the source or destination file type, rotation may fail. This will be detected and reported, but without automatically fixing it. The best course of action is to convert the source first, perhaps to AVI, then use THAT file as the source for your rotation and other changes.

AUDIO AND VIDEO: Can adjust audio volume, sample rate, bitrate. In fact, you can do anything ffmpeg is capable of. Options in default menus offer common operations, but a special KEY-IN function lets you test your own and store them in your own custom file. Further, there's a file of user-submitted options (downloaded separately).

VIDEO FRAMES: Converts an input video into a series of frames in either jpg or png format. The capture rate can range from 1 to 60 seconds between frames, or 'all'.

VIDEO MERGE: If you have selected multiple AVI video files, you'll be given the option of merging them. Other video formats will need to be converted to AVI first. Pre-converting is also recommended if AVI files of differing video or audio quality are to be merged. The final AVI can of course then be converted to the format of your choice.

IMAGES: Convert between various formats. Optionally set resolution for output. If outputting jpg, optionally set quality. A single conversion can specify multiple output types and multiple resolutions.

ISO IMAGES: Why should "images" be limited to "pictures"? Generate an ISO file from source files in the following formats: b5i, bin/cue, csi, daa, mdf, nrg, pdi, uif.

IMAGE SPECIAL CASES: Converting an animated gif to a format other than gif will produce a separate file for each frame in the source. Converting a pdf to an format other than pdf does the same thing. In both cases the "progress indicator" will suggest that there was an error, but this is only because the files created are not named in accordance with what it expects. Be patient if the source contains many frames, and do not click Cancel to the progress window. Also, conversion of a .psd (or similar) which contains layers will generate multiple images in some formats (eg jpg), or an animation (eg gif), so you may want to flatten them first.

TEXT to TEXT: Various conversions between TXT, RTF, HTML, M$Office and OpenOffice, with more being added.

TEXT to SOUND: Produces an audio file from a .txt file. Choose language, gender, pitch and speed.

TEXT to IMAGE: Produces an image of your .txt file. Choose the output image size, font size, colors, border, and font. Text is automatically rewrapped as needed, based on the requested image width and font size. After wrapping, if the text will not fit on a single image vertically, multiple image pages will be generated.

GENERAL:
- The source file is not overwritten. The destination file is named for the source with a new extension.
- An image conversion will also insert resolution into the destination name.
- If any conversion would produce the source filename (eg changing image jpg quality only, or audio bitrate only, or same conversion twice), "new" is inserted into destination name or user is prompted to supply a name.

If you are missing any packages or plug-ins that it relies on, it will try to help. Help and notes are within the script at the very bottom.

REQUIRES:
xterm . . . . . . . . used to inform user if zenity not installed, and to auto-fix zenity defaults
zenity . . . . . . . . for all dialogs
ffmpeg . . . . . . . everything video and audio
imagemagick . . image and text-to-image
bc . . . . . . . . . . . . to do math calculations

CODECS (more is always better):
amrwb
faac
faad2
ffmpeg-libs
gpac
gstreamer-ffmpeg
gstreamer-plugins-*
xmms2-avcodec
xmms2-wma

OPTIONAL:
transcode . . . . . for merging avi
translate/libtranslate . language translation
curl . . . . . . . . . . language translation
links/elinks . . . . language translation
nautilus-actions . add directly to context menu
kdegraphics . . . GUI colors in text-to-image
espeak . . . . . . . text to audio
faac . . . . . . . . . required for m4a audio
faad2 . . . . . . . . mpeg-2 and mpeg-4
antiword . . . . . . M$Office to txt and rtf
unrtf . . . . . . . . . rtf to txt and html
odt2txt . . . . . . . OpenOffice to txt and xml
txt2tags . . . . . . txt to html
libavcodec-unstripped-52 . avi to .mp4
AcetoneISO . . . disk images b5i/cdi/mdf/nrg/pdi to ISO.
nrg2iso, daa2iso, cdd2iso, uif2iso, bchunk . more disk images to ISO
mencoder . . . . . to rotate videos

Upon startup, "ffmpeg" and "file" are both executed against the source file, and the information gathered is displayed in the initial windows. This is helpful in deciding what choices to make, especially if the source file happens to be of an 'unknown' type. If the script cannot figure out what to do with a file, it will let you specify whether to treat it as audio, video, image, or text.

The destination is chosen from a list of common and appropriate file extensions. If you want something that's not listed, you can click OTHER and type in any extension that is appropriate for the input file type and conversion being done.

For a typical system (eg, mine :-) conversions for the following image, audio and video formats...

Image formats supported by convert (ImageMagick)
-- Readable:
A ART AVI AVS B BMP C CAPTION CIN CMYK CMYKA CR2 CRW CUR CUT DCM DCR DCX DFONT DNG DPX EPDF EPI EPS EPSF EPSI EPT EPT2 EPT3 FAX FITS FRACTAL FTS G G3 GIF GIF87 GRADIENT GRAY ICB ICO ICON IPL JNG JP2 JPC JPEG JPG JPX K LABEL M M2V MAP MAT MIFF MNG MONO MPC MPEG MPG MRW MSL MSVG MTV MVG NEF NULL O ORF OTB OTF PAL PALM PAM PATTERN PBM PCD PCDS PCL PCT PCX PDB PDF PEF PFA PFB PFM PGM PGX PICON PICT PIX PJPEG PLASMA PNG PNG24 PNG32 PNG8 PNM PPM PS PSD PTIF PWP R RAF RAS RGB RGBA RGBO RLA RLE SCR SCT SFW SGI STEGANO SUN SVG SVGZ TEXT TGA TIFF TILE TIM TTC TTF TXT UYVY VDA VICAR VID VIFF VST WBMP WMF WMZ WPG X X3F XBM XC XCF XPM XV XWD Y YCbCr YCbCrA YUV
-- Writable:
A ART AVS B BMP BMP2 BMP3 C CIN CIP CLIP CMYK CMYKA CUR DCX DPX EPDF EPI EPS EPS2 EPS3 EPSF EPSI EPT EPT2 EPT3 FAX FITS FTS G G3 GIF GIF87 GRAY HISTOGRAM HTM HTML ICB ICO ICON INFO IPL JNG JP2 JPC JPEG JPG JPX K M M2V MAP MAT MATTE MIFF MNG MONO MPC MPEG MPG MSL MSVG MTV MVG NULL O OTB PAL PALM PAM PBM PCD PCDS PCL PCT PCX PDB PDF PFM PGM PICON PICT PJPEG PNG PNG24 PNG32 PNG8 PNM PPM PREVIEW PS PS2 PS3 PSD PTIF R RAS RGB RGBA RGBO SGI SHTML SUN SVG SVGZ TEXT TGA THUMBNAIL TIFF TXT UIL UYVY VDA VICAR VID VIFF VST WBMP X XBM XPM XV XWD Y YCbCr YCbCrA YUV
--NOTE that "readable" or "writable" do not necessarily imply "useful" :-Q

Audio/Video formats supported by ffmpeg
-- Read/Write:
3g2 3gp 4xm MTV RoQ aac ac3 adts aiff alaw amr apc ape asf asf_stream au avi avm2 avs bethsoftvid c93 crc daud dsicin dts dv dv1394 dvd dxa ea ea_cdata ffm film_cpk flac flic flv framecrc gif gxf h261 h263 h264 idcin image2 image2pipe ingenient ipmovie libdc1394 lmlm4 m4v matroska mjpeg mm mmf mov mov,mp4,m4a,3gp,3g2,mj2 mp2 mp3 mp4 mpc mpc8 mpeg mpeg1video mpeg2video mpegts mpegtsraw mpegvideo mpjpeg mulaw mxf nsv null nut nuv ogg oss psp psxstr pva rawvideo redir rm rtp rtsp s16be s16le s8 sdp shn siff smk sol svcd swf thp tiertexseq tta txd u16be u16le u8 vc1 vc1test vcd video4linux video4linux2 vmd vob voc wav wc3movie wsaud wsvqa wv x11grab yuv4mpegpipe
Last changelog:

Final notes... 2 years ago

[ READ ME!! ] After processing, the last part of the output from the actual conversion program used is displayed to confirm proper operation or to help diagnose any problems. If there are problems, you can view the complete output: in /tmp, list the files with "ls -lrt" which will show the newest at the bottom. The files that capture conversion output are named as follows: conversion-program.NNNNN where NNNNN is the PID of the process that ran. For example, you might see "ffmpeg.8512" or "antiword.405". Just view the file and look for the first error listed, which is probably the culprit.

=====

0.56 It is now possible to replace originals during a conversion IF:
1 - converting images
2 - converting into the source folder
3 - converting to only one file type
4 - converting to only one resolution
If these conditions are all true, you will be prompted before the conversion begins. If you choose YES:
1 - originals are replaced with the converted files
2 - the new files will have a different extension if appropriate
3 - the new file names will not have the resolution inserted

0.60 You are invited to submit your own custom option sets, which will be added to a "user submissions" config file that will be posted here and available for download!

0.61 Now recognizes .vob files - just mount your DVD and rip away!

0.65 When a keyed-in option is used in audio or video conversion, if you add a "comment" (a # followed by text), then that option set will be automatically added to your ~/.config/avconvert/avconvert.ffopts.custom file for future use

0.90 Merging multiple AVI files. If all the files you select are AVI, a new prompt will offer to merge them to a single AVI. All the source files should be of the same size/bitrate/etc (you may want to pre-convert them to ensure this).

0.93 New "veryquiet" option to completely turn off progress popups. To enable this after upgrading to 0.93, go to the directory ~/.config/avconvert and either remove the file "avconvert" (the next run will create a new one), or edit that file and add the line "veryquiet=y".

0.94 Translations work once again (if you have them turned off, just remove ~/.config/avconvert/avconvert.lang to reset). Various minor fixes as well, like an adjustment for a change in how Zenity works.

0.95 Google no longer offers the translation API as a free service. Changed things to use the built-in "libtranslate" function, which automatically references multiple such services. It's a little slower, but works.

0.97 Adjustments to detecting libtranslate. Also fixed a bug that, when converting multiple multimedia files, destination folder is asked for in each loop.

0.98 Recognizes when only VOB file(s) are selected and offers to rip DVD to an AVI on the Desktop.

0.99 Added SVG file type to image conversions. Due to a change in ffmpeg output when analyzing a video, rewrote the parsing of this output (still compatible with older ffmpeg versions).

0.999 For Arch Linux, added detection and use of package translate-shell. In Audio/Video section, small changes to acomodate latest ffmpeg command-line args.

C

marc41

10 years ago

Hi, Rob

>> So in the script I changed acodec-mp3 to acodec-libmp3lame

AH - Now I understand. I would suggest that instead of making this change in avconvert.ffopts.video that you do it in avconvert.ffopts.custom. That latter file will not be overwritten by future upgrades. It's interesting that on my Fedora system the library name is indeed libmp3lame. I will check into this further...

As for the aspect ratio and side padding, that is a very new feature. I may have done some math wrong. The avconvert message you included is actually just the last part of the file /tmp/ffmpeg.10503 on your system. The first part of that file includes the actual ffmpeg command line that was executed, which will include the -padleft and -padright parameters. Please send that to me so I can see what went wrong.

Thanks for your help with this!

-- Marc

Report

rob2687

10 years ago

Here is the command line execution:

ffmpeg -y -i XYZ.mp4 -acodec libmp3lame -padleft -96 -padright -96 -aspect 1.5 -threads 2 /home/robert/Desktop/1.mp4

Report

C

marc41

10 years ago

FIXED IT!

How did I miss this??? After completing ffmpeg aspect ratio calculations for top/bottom, the code was falling into the calculation for left/right. This was due to using the "test" command on floats where it actually requires integers.

Easy to correct once I saw it happen. Thanks for your help!!! Get version 0.68

-- Marc

Report

iumbs

10 years ago

This script used to work for me until I updated it! Now, after I set all the options, the converting dialogue (it says: "waiting for ffmpeg to begin writing...") dissapears and nothing happens.

I don't think it's a dependency problem - as I said, it used to work before the update.

Any suggestion? Help me, I can't live without this script! Thanks :)

Report

C

marc41

10 years ago

OOPS!!!!! YOU ARE CORRECT, THERE IS A PROBLEM

Corrected in 0.67

Oddly, after making substantial changes to enhance the way the ffmpeg command options are stored and assembled, there was an error when ffmpeg needed no options at all!

SORRY!

-- Marc

Report

iumbs

10 years ago

Unfortunately, I still have a problem.
I use Avconvert mostly for ripping off audio from YouTube videos. So .flv to .mp3.

Now the final .mp3 file appears, but when I open it, Totem says there's no data stream. It appens also in .avi to .mp3.

I've tried the new script in other convertions (.avi to .flv; .png to .jpg; .pdf to .jpg) and it worked fine...

What do you think?

Report

C

marc41

10 years ago

Hi -- are you using Ubuntu? Someone else just sent a comment that there seems to be a naming difference.

When you get to the ffmpeg options list, you will see one "acodec-mp3". I have been told that some systems may need "acodec-libmp3lame".

Try your conversion again, and choose the "key in options" instead of selecting from the list. Use that to key in:

-acodec libmp3lame

and see if that works. Please let me know what happens!!

This seems to be a difference in ffmpeg, not in the libraries. On my sywstem (Fedora), the library is libmp3lame but it is referred to as just 'mp3'.

-- Marc

Report

C

marc41

10 years ago

Fedora is happy referring to this as libmp3lamne as well. So I'm posting a new version. get 0.69

Report

iumbs

10 years ago

Damn, 0.69 doesn't fix anything.

If I perform a "normal conversion", leaving unchanged all the default ffmpeg options, the resulting .mp3 file still has no data stream.

On the other side, if I change the into "acodec-libmp3lame", the final .mp3 file doesn't even appear!

I'm truly sad :(
Anyway, thanks for your support and patience!

PS: Yes, I'm using Ubuntu 9.04!

Report

C

marc41

10 years ago

Resolved with codecs...

Report

C

marc41

10 years ago

>> If I perform a "normal conversion", leaving unchanged all the default ffmpeg options, the resulting .mp3 file still has no data stream.

Is the resulting mp3 file empty?

>> On the other side, if I change the into "acodec-libmp3lame", the final .mp3 file doesn't even appear!

Do you have the mp3 library installed? Go to /tmp and look at the ffmpeg result file.

You will see a section like this showing the libraries and codecs that ffmpeg found:
generic -fasynchronous-unwind-tables -I/usr/include/openjpeg --extra-version
rpmfusion --enable-bzlib --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir

The general rule is "install everything you can" :-)

Does this help?

Report

C

marc41

10 years ago

>> If I perform a "normal conversion", leaving unchanged all the default ffmpeg options, the resulting .mp3 file still has no data stream.

Is the resulting mp3 file empty?

>> On the other side, if I change the into "acodec-libmp3lame", the final .mp3 file doesn't even appear!

Do you have the mp3 library installed? Go to /tmp and look at the ffmpeg result file.

You will see a section like this showing the libraries and codecs that ffmpeg found:
generic -fasynchronous-unwind-tables -I/usr/include/openjpeg --extra-version
rpmfusion --enable-bzlib --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir

The general rule is "install everything you can" :-)

Does this help?

Report

C

marc41

10 years ago

>> If I perform a "normal conversion", leaving unchanged all the default ffmpeg options, the resulting .mp3 file still has no data stream.

Is the resulting mp3 file empty?

>> On the other side, if I change the into "acodec-libmp3lame", the final .mp3 file doesn't even appear!

Do you have the mp3 library installed? Go to /tmp and look at the ffmpeg result file.

You will see a section like this showing the libraries and codecs that ffmpeg found:
generic -fasynchronous-unwind-tables -I/usr/include/openjpeg --extra-version
rpmfusion --enable-bzlib --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir

The general rule is "install everything you can" :-)

Does this help?

Report

C

marc41

10 years ago

OK... The message you're getting tells us that ffmpeg never wrote to the destination file. There are two "progress windows". The first one, which you're seeing now, usually disappears quickly. It waits for up to 20 seconds for the destination file to exist with a non-zero size. It is then replaced by a second window that watches the file grow.

So, the first thing would be to check the output from ffmpeg. The script captures this and writes a file in /tmp for each run. In /tmp:

ls -lrt ffmpeg*

Your most recent run will be the last file listed. View that file and look for the complaint. It could relate to the source, the destination, or the combination of options.

Let me know what you find.

-- Marc

Report

iumbs

10 years ago

This script used to work for me until I updated it! Now, after I set all the options, the converting dialogue (it says: "waiting for ffmpeg to begin writing...") dissapears and nothing happens.

I don't think it's a dependency problem - as I said, it used to work before the update.

Any suggestion? Help me, I can't live without this script! Thanks :)

Report

Sciron

10 years ago

Nice update, thank you very much for your consistent efforts. :)

Report

C

marc41

10 years ago

Thanks a lot!

I'm still having fun adding and adjusting features, and it's nice to hear that you folks out there are still having fun using it!

-- Marc

Report

RavisPohan

10 years ago

Hi. Thanks for this script, I don't know how I managed without it.

I use it mainly to convert from xcf to pdf format. That worked perfectly until recently, but since I upgraded to Ubuntu 9.10 the PDF output files have been massive (A4-Page 22 Mb or so)- under 9.04 it was fine. I assume that I have missed installing something or something like that, but I have no idea what. Do you know what might cause this?

Report

C

marc41

10 years ago

Hi --

Interesting... Just tried this here: Converted a 340K jpg to pdf, resulting file was 347K. Opened that same jpg in gimp and saved as xcf, the result file was 766K. Then used avconvert to turn that xcf into pdf. The result was 2.9MB.

Oddly, if I open those two pdf files in avconvert and look at the initial screen, the summary shows the smaller file to be:

PDF document, version 1.3, 442x884 16-bit Bilevel DirectClass 48.4kb 0.020u 0:02

and the larger file:
PDF document, version 1.4, 546x1092 16-bit Bilevel DirectClass 73.6kb

This information is gotten from the "file" command.

I did a little reading, and it seems that PDF through 1.3 produced opaque image elements, while 1.4 and newer adds transparency. I am guessing that ImageMagick is deciding which version of PDf is more appropriate for a given conversion, and perhaps as of some recent release of either gimp or ImageMagick, it has changed from using 1.3 to 1.4 for those images.

I'd like to know the results of the "file" command (or avconvert's first dialog) on one of your older/smaller xcf->pdf files. Did that conversion produce a PDF of version 1.3 or of 1.4?

-- Marc

Report

RavisPohan

10 years ago

Hi, thanks for replying so quickly. It says that they're 1.4...

Report

C

marc41

10 years ago

Hello again. This is interesting...

Starting with a 334K jpg again:

Load to Gimp and re-save as xcf = 795K
Convert the xcf to jpg (qual=100) = 408K
Convert the xcf to png = 432K

Convert 795K xcf to pdf = 2.9 MB
Convert xcf to jpg to pdf = 427KB
Convert xcf to png to pdf = 359KB

As I had found before, ImageMagick would convert the original jpg to pdf version 1.3 but it would convert the xcf to pdf version 1.4

Here's what I found today:

After converting the xcf to a jpg and a png, ImnageMagick converts those jpg/png files to pdf version 1.4

So it seems that loading a jpg to Gimp and saving as xcf adds something to the file that triggers pdf 1.4

Whatever it is that gets added stays in the file even if it is then converted to jpg or png! I suspect it has something to do with either transparency or layers since those are the features added to 1.4. However, since jpg and png do NOT support those features, I had expected ImageMagick to create pdf version 1.3 in my jpg->xcf->jpg->pdf test.

Despite using 1.4 though, the file sizes were much smaller (though a little larger than converting the original jpg to pdf 1.3). I suspect that whatever Gimp added, which then got into the jpg/png files, triggered 1.4 but since it did not contain any actual transparency or layers, the 1.4 file was much smaller.

Does this sound right to you? It's very odd. I think ImageMagick is trying to preserve the best possible image for you despite the very large file size.

Based on these tests, here is my suggestion: if you are willing to possibly lose some image information (transparency) then convert your xcf to png, then convert png to pdf.

What do you think?

[Perhaps xcf is not the only file type that will behave this way. A psd and others might do the same thing. I wonder if my script should offer to "flatten" images by creating a temporary png file as one of the options?]

-- Marc

Report

C

marc41

10 years ago

Hi --

Interesting... Just tried this here: Converted a 340K jpg to pdf, resulting file was 347K. Opened that same jpg in gimp and saved as xcf, the result file was 766K. Then used avconvert to turn that xcf into pdf. The result was 2.9MB.

Oddly, if I open those two pdf files in avconvert and look at the initial screen, the summary shows the smaller file to be:

PDF document, version 1.3, 442x884 16-bit Bilevel DirectClass 48.4kb 0.020u 0:02

and the larger file:
PDF document, version 1.4, 546x1092 16-bit Bilevel DirectClass 73.6kb

This information is gotten from the "file" command.

I did a little reading, and it seems that PDF through 1.3 produced opaque image elements, while 1.4 and newer adds transparency. I am guessing that ImageMagick is deciding which version of PDf is more appropriate for a given conversion, and perhaps as of some recent release of either gimp or ImageMagick, it has changed from using 1.3 to 1.4 for those images.

I'd like to know the results of the "file" command (or avconvert's first dialog) on one of your older/smaller xcf->pdf files. Did that conversion produce a PDF of version 1.3 or of 1.4?

-- Marc

Report

seraphyn

10 years ago

instead $HOME for the configs?
This means ~/.config/avconvert/.
http://ploum.frimouvy.org/?207-modify-your-application-to-use-xdg-folders

Greetings Seraphyn

Report

C

marc41

10 years ago

I have made the change. Any existing ~/.avconvert* files will automatically be moved to ~/.config/avconvert/*

This will be included in the next release.

-- Marc

Report

seraphyn

10 years ago

Great Thanks :D
Seraphyn

Report

Final notes... 2 years ago

[ READ ME!! ] After processing, the last part of the output from the actual conversion program used is displayed to confirm proper operation or to help diagnose any problems. If there are problems, you can view the complete output: in /tmp, list the files with "ls -lrt" which will show the newest at the bottom. The files that capture conversion output are named as follows: conversion-program.NNNNN where NNNNN is the PID of the process that ran. For example, you might see "ffmpeg.8512" or "antiword.405". Just view the file and look for the first error listed, which is probably the culprit.

=====

0.56 It is now possible to replace originals during a conversion IF:
1 - converting images
2 - converting into the source folder
3 - converting to only one file type
4 - converting to only one resolution
If these conditions are all true, you will be prompted before the conversion begins. If you choose YES:
1 - originals are replaced with the converted files
2 - the new files will have a different extension if appropriate
3 - the new file names will not have the resolution inserted

0.60 You are invited to submit your own custom option sets, which will be added to a "user submissions" config file that will be posted here and available for download!

0.61 Now recognizes .vob files - just mount your DVD and rip away!

0.65 When a keyed-in option is used in audio or video conversion, if you add a "comment" (a # followed by text), then that option set will be automatically added to your ~/.config/avconvert/avconvert.ffopts.custom file for future use

0.90 Merging multiple AVI files. If all the files you select are AVI, a new prompt will offer to merge them to a single AVI. All the source files should be of the same size/bitrate/etc (you may want to pre-convert them to ensure this).

0.93 New "veryquiet" option to completely turn off progress popups. To enable this after upgrading to 0.93, go to the directory ~/.config/avconvert and either remove the file "avconvert" (the next run will create a new one), or edit that file and add the line "veryquiet=y".

0.94 Translations work once again (if you have them turned off, just remove ~/.config/avconvert/avconvert.lang to reset). Various minor fixes as well, like an adjustment for a change in how Zenity works.

0.95 Google no longer offers the translation API as a free service. Changed things to use the built-in "libtranslate" function, which automatically references multiple such services. It's a little slower, but works.

0.97 Adjustments to detecting libtranslate. Also fixed a bug that, when converting multiple multimedia files, destination folder is asked for in each loop.

0.98 Recognizes when only VOB file(s) are selected and offers to rip DVD to an AVI on the Desktop.

0.99 Added SVG file type to image conversions. Due to a change in ffmpeg output when analyzing a video, rewrote the parsing of this output (still compatible with older ffmpeg versions).

0.999 For Arch Linux, added detection and use of package translate-shell. In Audio/Video section, small changes to acomodate latest ffmpeg command-line args.

12345678910
335
product-maker amorpher Dec 29 2016 9 excellent
product-maker kermith13 Jun 21 2013 3 bad
product-maker I4C Feb 19 2013 9 excellent
product-maker fraxunil2 Jan 28 2013 3 bad
product-maker MacWomble Aug 25 2012 9 excellent
product-maker kerron Aug 17 2012 9 excellent
product-maker sakasa Aug 14 2012 9 excellent
product-maker GossetInofensiu May 05 2012 3 bad
product-maker sadi Feb 06 2012 9 excellent
product-maker florinkobe Jan 11 2012 9 excellent
product-maker Drakon Jan 08 2012 9 excellent
product-maker KYRN Jan 03 2012 9 excellent
product-maker jasbutut Oct 24 2011 9 excellent
product-maker herver Oct 04 2011 9 excellent
product-maker LucasE Sep 12 2011 9 excellent
product-maker nikore90 Sep 06 2011 9 excellent
product-maker mdh3ll Aug 30 2011 9 excellent
product-maker Broker Jul 06 2011 9 excellent
product-maker sandrshe Jun 20 2011 9 excellent
product-maker wombalton Jun 20 2011 9 excellent
product-maker habbab Jun 20 2011 9 excellent
product-maker jaywink May 27 2011 9 excellent
product-maker kolesky May 05 2011 9 excellent
product-maker zookalicious May 04 2011 9 excellent
product-maker marecord Apr 30 2011 9 excellent
product-maker gracca Apr 29 2011 9 excellent
product-maker Karmicbastler Apr 28 2011 9 excellent
product-maker marcalbero Mar 11 2011 9 excellent
product-maker elkooder Mar 07 2011 9 excellent
product-maker zsolt Jan 08 2011 9 excellent
product-maker sunflower Jan 08 2011 9 excellent
product-maker Xanf Jan 08 2011 9 excellent
product-maker RedAcid Jan 05 2011 9 excellent
product-maker likimoki Jan 02 2011 9 excellent
product-maker legluondunet Jan 02 2011 9 excellent
product-maker acinic Nov 23 2010 9 excellent
product-maker xypepper Nov 10 2010 9 excellent
product-maker Keyblover Oct 31 2010 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
sakasa
Aug 14 2012
sadi
Feb 06 2012
KYRN
Jan 03 2012
Broker
Jul 29 2011
elkooder
Jul 17 2011
jaywink
May 27 2011
Gnom-IK
May 01 2011
mdh3ll
Apr 29 2011
Karmicbastler
Apr 28 2011
gericom
Dec 15 2010
HATRED
Dec 15 2010
shamanphenix
Dec 12 2010
ptzero
Nov 30 2010
acinic
Nov 23 2010
Keyblover
Oct 31 2010
likimoki
Jul 15 2010
Sclegnrbs
May 28 2010
erar123
Mar 24 2010
Brutus180
Mar 08 2010
vagrale13
Jan 26 2010
Janhouse
Jan 02 2010
CzDavid
Dec 15 2009
magellan13
Dec 15 2009
humbug
Dec 03 2009
seraphyn
Oct 23 2009
hilarion
Oct 21 2009
prodigo_double
Sep 25 2009
faelbluhm
Sep 15 2009
Sciron
Sep 09 2009
Beyecixramd
Sep 04 2009
CITguy
Sep 01 2009
pnoyz
Aug 26 2009
shankru85
Aug 24 2009
domore
Aug 24 2009
kangoor123
Jul 13 2009
szamot83
Jul 09 2009
SorinN
Jun 24 2009
Guano
Jun 23 2009
themis
Jun 06 2009
z-vet
May 19 2009
jimmyjh
May 15 2009
Alcoholika
May 13 2009
grekpg
May 10 2009
MrPantucci
May 02 2009
Mar4
Apr 11 2009
sergeant
Mar 25 2009
youngbu75
Mar 24 2009
dilomo
Mar 23 2009
Dicson12
Mar 20 2009
wombalton
Feb 05 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.999
updated Jan 05 2017
added Nov 03 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 11
System Tags addon