Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
23rd September 2011, 12:22 | #1 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
[FFmpeg] image conversions - batch file
My intention is to make a handy batch file for encoding images. Mainly I will be converting from jpeg to png, so I run a few tests. What I found out is that first, jpeg decoding is wrong, I think because it relies on mjpeg for decoding which is chroma subsampled. And second: the target png weights much more than say, saving from avspmod or photoshop.
I would like to know how to do this on ffmpeg or maybe some kind of avs2png, ultimately I want to right click on an image and run the batch file.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 26th September 2011 at 16:32. |
23rd September 2011, 17:38 | #3 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
I dont care as long as I can convert a jpg to png, through avisynth or directly fed. I just thought that variable input would be more difficult through avisynth...
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
23rd September 2011, 18:07 | #4 | Link |
brontosaurusrex
Join Date: Oct 2001
Posts: 2,392
|
a bit of overkill, but how about
http://www.imagemagick.org/script/co...processing.php convert file.jpg file.png (is the basic syntax) (imagemagick runs on mac, win, linux, so anything learned on desktops can be than easily used on for example linux servers) p.s. my quick test shows that default png compression is better than the one found in gimp, unless there is some sort of chroma bug... p.s.2. png compression is slow and demanding on full HD pictures
__________________
certain other member |
23rd September 2011, 18:10 | #5 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
I didn't know imagemagick had a command line tool. I will try that, in expect I dont need to install anything.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
23rd September 2011, 18:16 | #7 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
I used the portable version and it works, compression to png is alongside PS, avspmod, etc. But yes, its overkill, I hoped to make it work on ffmpeg...
pd: maybe the encoder avspmod internally uses for conversion
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 23rd September 2011 at 18:20. |
25th September 2011, 14:36 | #8 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
Code:
@echo off c:\path\to\ffmpeg -i "%~1" -vcodec png "%~dpn1.png"
__________________
my repositories |
25th September 2011, 18:31 | #9 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Thanks chikuzen, that was my first option, but jpeg decoding seems wrong, and png compression is... unusual. Maybe there is some option in ffmpeg we are missing.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
Tags |
batch, ffmpeg, jpeg, png |
Thread Tools | Search this Thread |
Display Modes | |
|
|