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.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd September 2011, 12:22   #1  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 1,038
[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.

Last edited by Dogway; 26th September 2011 at 16:32.
Dogway is offline   Reply With Quote
Old 23rd September 2011, 16:52   #2  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,395
avisynth to png sequence or jpeg to png?
what exactly are you trying to do?
__________________
certain other member
smok3 is offline   Reply With Quote
Old 23rd September 2011, 17:38   #3  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 1,038
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...
Dogway is offline   Reply With Quote
Old 23rd September 2011, 18:07   #4  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,395
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
smok3 is offline   Reply With Quote
Old 23rd September 2011, 18:10   #5  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 1,038
I didn't know imagemagick had a command line tool. I will try that, in expect I dont need to install anything.
Dogway is offline   Reply With Quote
Old 23rd September 2011, 18:14   #6  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,395
you will certainly need to install imagemagick.
__________________
certain other member
smok3 is offline   Reply With Quote
Old 23rd September 2011, 18:16   #7  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 1,038
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

Last edited by Dogway; 23rd September 2011 at 18:20.
Dogway is offline   Reply With Quote
Old 25th September 2011, 14:36   #8  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 597
Code:
@echo off
c:\path\to\ffmpeg -i "%~1" -vcodec png "%~dpn1.png"
save this bat into "Send To" folder.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 25th September 2011, 18:31   #9  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 1,038
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.
Dogway is offline   Reply With Quote
Reply

Tags
batch, ffmpeg, jpeg, png

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.