Author Topic: Convert DNG to JPG with command line ?  (Read 10508 times)

remizik

  • New to the forum
  • *
  • Posts: 30
Convert DNG to JPG with command line ?
« on: March 31, 2016, 10:47:57 AM »
Hi all,

i'm trying to automatise the process from MLV files to JPG files
here's my workflow so far

I have this in a folder


I put my MLV files in the "_MLVs" folder, and then run the "BATCH_mlv2dng.bat" batch


This extracts all the DNG images from the MLV files and put them in the "DNG_output" folder


and from there I start manual work :
- batch process images in photoshop to convert the DNG to JPG
- import the JPG in a video software (virtualdub/premiere pro/etc ..) to make the final video

I'd like to automatise the DNG to JPG part too.
Do you know if a simple executable exists ? like mlv_dump.exe

thanks for your help :)

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Convert DNG to JPG with command line ?
« Reply #1 on: March 31, 2016, 12:53:17 PM »
dcraw

remizik

  • New to the forum
  • *
  • Posts: 30
Re: Convert DNG to JPG with command line ?
« Reply #2 on: March 31, 2016, 03:12:32 PM »
thanks :)
but i was only able to extract to TIFF or PPM.

any JPG or PNG solution ?

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Convert DNG to JPG with command line ?
« Reply #3 on: March 31, 2016, 04:05:08 PM »
google is your friend

What's wrong with tiff? For that matter what's wrong with DNG? Most editors now-a-days will open (c)DNG sequences directly. mlv_dump's DNGs won't open in Premiere (it's very particular), but DNGs from MLVFS or raw2cdng will. After Effects (which uses ACR, and can use mlv_dump DNGs) and Resolve can also open DNG sequences, there are probably others too. Also, MLV Producer can read, edit, and export to standard video formats.

remizik

  • New to the forum
  • *
  • Posts: 30
Re: Convert DNG to JPG with command line ?
« Reply #4 on: March 31, 2016, 04:14:50 PM »
i googled a lot, couldn't find any command based DNG to JPG/PNG converter.
I assemble the pictures with virtualdub for now.
checking MLVFS & MLV Producer, thanks

edit : MLV Producer looks interesting, but for now I can't achieve the same quality result as my workflow in the 1st post. I will continue trying it a bit more :)

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Convert DNG to JPG with command line ?
« Reply #5 on: March 31, 2016, 07:50:58 PM »
Imagemagick can work with dcraw to create JPG from DNG but you're losing a lot of quality going that route.

http://www.imagemagick.org/Usage/formats/#crw

Are you looking for a way to make quick proxy files for editing? I'd recommend MLP but you're on a PC. If you have Premiere you probably also have Media Encoder. I just tried Media Encoder with both mlv_dump and MLVFS generated DNG files and as dmilligan pointed out, the mlv_dump DNG files don't work. I also got an error message with Media Encoder but the exported movie file seemed to be fine.

So: MLV -> MLVFS -> Media Encoder -> MOV
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

remizik

  • New to the forum
  • *
  • Posts: 30
Re: Convert DNG to JPG with command line ?
« Reply #6 on: March 31, 2016, 10:46:09 PM »
i just wanted to do a batch that takes MLV and get PNG or JPGs at the end.
I'm doing this so far : MLVs > mlv_dump to DNGs > photoshop image processor DNG to JPG > assemble the JPG in virtualdub or Adobe Premiere

so the part in bold is what i'd like to automatise :)

I don't lose that much quality between DNG and JPGs (i set the max quality in photoshop when processing), they look very clean.

i tried DCRAW but I get a lost of dark/red/purple dots (dead pixels I assume) that I don't get with photoshop ... so, too bad :(

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3401
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Convert DNG to JPG with command line ?
« Reply #7 on: March 31, 2016, 10:56:52 PM »
Try color grading them in JPEG's and then apply the same on DNG's ... Tell me they look the same. I bet not.

Unless you do the dirty work in between.
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8120
Re: Convert DNG to JPG with command line ?
« Reply #8 on: March 31, 2016, 11:00:01 PM »

remizik

  • New to the forum
  • *
  • Posts: 30
Re: Convert DNG to JPG with command line ?
« Reply #9 on: March 31, 2016, 11:31:35 PM »
yes indeed it won't be the same :D this all automatise thing is for lazy testing mostly

for important footage i'll do the manual work in between with photoshop/lightroom

@Walter Schulz : yes thank you for the lmgtfy ... but as I said before, that's what I'm already doing.

I found a way to go from DNG to JPG in my batch using dcraw-9.26-ms-64-bit.exe -c -q 3 -a -w -H 5 -b 5 xxxxx.dng, but I need to fix the dead pixels now (found info there : http://www.dl-c.com/board/viewtopic.php?f=4&t=686)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7195
Re: Convert DNG to JPG with command line ?
« Reply #10 on: April 01, 2016, 12:03:00 AM »
What camera are you using? Is it only a few pixels or the focus pixel kind that fills the whole sensor? Thinking eos m, 650D, 100D and so on.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Convert DNG to JPG with command line ?
« Reply #11 on: April 01, 2016, 03:07:24 AM »
Well if those are focus pixels that are showing up then MLVFS is going to be a better choice because it will remove them automatically. So if you're just making JPG image sequences and not movie files then the Media Encoder workflow works even better. It already has an output option that will probably work for you, though you can modify it any way you want.


I just tried it and it works great over here.


If you are going through Premiere you can of course do your color grading there but eventually it is probably going to go through Media Encoder anyway if you want to batch process.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

remizik

  • New to the forum
  • *
  • Posts: 30
Re: Convert DNG to JPG with command line ?
« Reply #12 on: April 01, 2016, 08:41:36 AM »
@Danne : I'm using a 60D, only a few pixels

here's an example, both processed from the same DNG file




Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7195
Re: Convert DNG to JPG with command line ?
« Reply #13 on: April 01, 2016, 09:09:15 AM »
Easiest way would be for you to find the coordinates of your pixels and put them in a pixel list. Put this in dcraw command line and the pixels should go away. Here is an example of pixel files in eos 100D. Now there,s a lot of them in that camera. dfort created these list with some workflow in image_magick if I remember correctly. You should have maybe 3-5 coordinates.
I used rawtherapee I think once for my 5D mark III but photoshop and maybe gimp should work too for finding coordinates.
https://drive.google.com/file/d/0B4tCJMlOYfirYllYZGhHWUxiU00/view?usp=sharing

In dcraw something like this
Code: [Select]
dcraw -P [your_dead_pixel_list]

remizik

  • New to the forum
  • *
  • Posts: 30
Re: Convert DNG to JPG with command line ?
« Reply #14 on: April 01, 2016, 09:10:23 AM »
yes i know, i posted the link yesterday (see above), I plan to try that today :)

thanks

edit : sh*t, I have a lot of dead pixels :'( http://i.imgur.com/678Wqfa.jpg

megapolis

  • Freshman
  • **
  • Posts: 87
Re: Convert DNG to JPG with command line ?
« Reply #15 on: May 21, 2018, 01:22:12 PM »
Now DNG to JPG converter is a part of Fast CinemaDNG Processor software which is working on NVIDIA GPU. These are main options for MLV converter:
http://www.fastcinemadng.com/info/mlv/mlv-converter.html

1. MLV to TIFF/JPG
2. MLV to movie (to MP4 via external FFmpeg)
3. MLV crop, project trimming, transcoding to DNG/CinemaDNG
4. MLV crop, project trimming, transcoding to CinemaDNG RAW

To get the best performance for MLV to JPG/TIFF transform, it's a good idea to utilize fast SSD, because quite often total performance is limited by SSD write time.