From 8423ae38aef02cf60975a802c1e96aaab9786656 Mon Sep 17 00:00:00 2001 From: frankmilliron <34376619+frankmilliron@users.noreply.github.com> Date: Thu, 28 Dec 2017 06:58:58 -0800 Subject: [PATCH] Add files via upload --- Apple 2 GR Photoshop Actions.atn | Bin 0 -> 10573 bytes Apple II GR Photoshop Palette.aco | Bin 0 -> 744 bytes Convert Folder of Frames in Photoshop.js | 95 +++++++++++++++++++++++ Export Frames with ffmpeg.txt | 29 +++++++ 4 files changed, 124 insertions(+) create mode 100644 Apple 2 GR Photoshop Actions.atn create mode 100644 Apple II GR Photoshop Palette.aco create mode 100644 Convert Folder of Frames in Photoshop.js create mode 100644 Export Frames with ffmpeg.txt diff --git a/Apple 2 GR Photoshop Actions.atn b/Apple 2 GR Photoshop Actions.atn new file mode 100644 index 0000000000000000000000000000000000000000..08f698520d166bbdaff4d2e521eac68890969135 GIT binary patch literal 10573 zcmeHNOK;mo5FYuJq={n}O&^D%WsysPA~l**kxTXPLqaXvHB~1$6%@rtbSP3FDK$1) zAea7+{EPtU&nVh!Pd&7ko_cM+S?$p4+7K1lZGeDlh`Tep{C0L`#re205v>x@M^vE! z{sQvIqPzHP(LSzw)T4+}d=k|fKvy9b8Xvk4+E2-W6cUvHvw+XIyn70;K@GZtfg!Fw z9b=Mvv<_X1>a>B0RJqC!t&ImQNZ0(n)Aels*n{v!g9VGFzfqvMj(hvS>nd|?jj2!? z{jQD1JPY?bY47VW-Mqc`Bq*<|Zgr`5dugVxpXeK58hhce&ll0t2mTW;uw5tcHXS#O;*GG+ zdOd30?Zd4^yKzU=t+=aZX<3%F+dg!&k!NtwqbxWGEUOa@+h6?k{Hs5H_~1FC?er~6 zJNa$I;4@mo^?*3k71~C9AKvU>MG3+jqxLwsh6h&Ku@C=+UXpB#ypT_T3`hiZV;@(sh9<=)V< zopcyGsUNYSH|s-h?L?!4w1SN`#8TD}EZ(m}HL>hs#;3ZSvh&sCwIDujM^T_UDxJgR zAlObIlur4b>PdPRTD8~eh>EsP-37EXvlp6e_$=!$(VULKbvFt}UYs_g4sZ1va36~n z%i8v3?W_^(k72t-O*oH3q)IIuHPKL;hPOs~G~ga36YXzRn})kCf4b8iX@nh)pz=s9 zN%yqhR!@(DQQ4^d&UlZiwdl)M9IAb5>Z*D#i!L9r>_3&kGzqcX7>~6%c{%KugVkoh_V_U zo~>H%6xInMx4BG#sORR<8KU9a84!)TCn3sOX0*}RqhjOqe&p3k$!s({A&4?&MjJ1N zXvB4rjq+{1JR8N2y!!RDm$46SE8U|+<$lN&ojtxZ9_I^*GvbH+f{j|Ii$#^&KH@u?u1fG=Lzd+PKIg#SSdZ%*m6of4A9k&# z8E`SIu9f2x0iM(Np|E9+kJI8_Wtx?ip?J^TE{cYl5;H;q?%%@SGFt8^8! z{&M>kq&Kp{L(^E1$IYzDx zjx44D%01iP){+z9C{}`UolfP8ZV)Bxg~b{-bU2ofy#q{|NI+^qVquWNv`1lAT>dcG zVLk02hjXpUJGnI4rd`ms1{SDFL81#1U6AP4f<&t)L_wmbNVWz+k@P)&8ji0*F)m0a z4YDPOGRqV;8h4A0LdzIM5Ji`dD06c?5%FTL4h4zUFP_s!#w2xFWQ;wU#affr8Dp*Q z=J*RDx4Gmao@?X95MMos#uHO>v4R+nHv(T@OJe-q8Df0;MA-tbkH`Y;b|`xnS~6ap ziW6qMaTX`c#R)T>5XA{IKPP8Mq6RsVM9)Z41hF__hDX%vjQT<1%-O$CEB2fC(bQ#r z)Fe8e-be&;5estsKS$!jHuPr1;S|sG4Cv8aZ|n TSACU{F>`)qW5KchbB^^7vi6o| literal 0 HcmV?d00001 diff --git a/Apple II GR Photoshop Palette.aco b/Apple II GR Photoshop Palette.aco new file mode 100644 index 0000000000000000000000000000000000000000..11a9496e2704d573b9c2e581ad4df3388dba8b56 GIT binary patch literal 744 zcmY+COHRW;5JU@B5X9#QTmT8j=C>q5VnYP0AeI)`AtEFK5h0G^GbMK#Ue9=9Pg$}@ z?s9c?wY8%Y^{`n>c@bYUjh*an?+tYwpEZc*Slz6h3#_Q&T*r!EIM+0RCw0$w$_uNT ziu2&Gn|jo~&biJs(p;rp^0G^)c0{DlPQGsYTG%A)FzcJ1XBOoO-ntY|xu{ z0569((M(JFRcLv{xpV}hNR;kTtbAXXHg(H2tqYi;{zuO&YPAU-!?=Vo=Ib{)uJoBY zvpL(OtnU@v2Y6Gx<13k=uHz1TUe_>3_*&|hJV3V@nXen_kJL-5mKjK#XK?z?he2bz z$vtMV%%5h^CD P^JYHhXHuDw3)B1qbwh{@ literal 0 HcmV?d00001 diff --git a/Convert Folder of Frames in Photoshop.js b/Convert Folder of Frames in Photoshop.js new file mode 100644 index 0000000..bdc8939 --- /dev/null +++ b/Convert Folder of Frames in Photoshop.js @@ -0,0 +1,95 @@ +#target photoshop //works under Photoshop CS6 & MacOS +// Helps to restart Photoshop between script runs so that it doesn't slow down + + +var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, psSaveOpts; + + +// Select the source folder. +sourceFolder = Folder.selectDialog( 'Select the folder with PNG frame files you want to convert:', '~/Desktop' ); + +// If a valid folder is selected +if ( sourceFolder != null ) +{ + files = new Array(); + fileType = "*.png" //prompt( 'Select type of Image files to you want to process. Eg: *.png', ' ' ); + + // Get all files matching the pattern + files = sourceFolder.getFiles( fileType ); + + if ( files.length > 0 ) + { + // Get the destination to save the files + destFolder = Folder.selectDialog( 'Select the folder where you want to save the converted frames:', '~/Desktop' ); + for ( i = 0; i < files.length; i++ ) + { + sourceDoc = app.open(files[i]); // returns the document object + + + + + + +// Run Conversion Action + +//app.load(File("~/my-actions.atn")); +app.doAction("Apple II:DITHER no save","Apple 2 GR Photoshop Actions.atn"); + +//TODO convert action to javascript commands + + + + + + // Call function getNewName to get the new TIFF file's name + targetFile = getNewName(); + + // Call function getPSOptions get the PhotoshopSaveOptions for the files + TiffSaveOpts = getTiffOptions(); + + // Save as TIFF + sourceDoc.saveAs( targetFile, TiffSaveOpts ); + + sourceDoc.close(); + } + alert( 'Files are saved in ' + destFolder ); + } + else + { + alert( 'No matching files found' ); + } +} + + +function getNewName() +{ + var ext, docName, newName, saveInFile, docName; + docName = sourceDoc.name; + ext = '.tif'; // new extension for image file + newName = ""; + + saveInFile = new File( destFolder + '/' + docName ); + + + return saveInFile; +} + + +function getTiffOptions() +{ + // Create the psSaveOptions object to set the AI save options + var TiffSaveOpts = new TiffSaveOptions(); + +TiffSaveOpts.alphaChannels = false; +TiffSaveOpts.annotations = false; +TiffSaveOpts.byteOrder.MACOS; +TiffSaveOpts.embedColorProfile = false; +TiffSaveOpts.imageCompression.NONE; +TiffSaveOpts.interleaveChannels = false; +TiffSaveOpts.layers = false; +TiffSaveOpts.saveImagePyramid = false; +TiffSaveOpts.spotColors = false; +TiffSaveOpts.transparency = false; + + return TiffSaveOpts; +} diff --git a/Export Frames with ffmpeg.txt b/Export Frames with ffmpeg.txt new file mode 100644 index 0000000..08fa588 --- /dev/null +++ b/Export Frames with ffmpeg.txt @@ -0,0 +1,29 @@ + +./ffmpeg -i /path/to/video.mkv /path/to/output-%05d.png + + + +to crop a 16:9 video to 4:3 use this instead... + +./ffmpeg -i /path/to/video.mkv -filter:v 'crop=ih/3*4:ih' /path/to/output-%05d.png + + + +EXAMPLE: + +cd /Users/Frank/Desktop/Vintage\ Computers/Apple\ II/Apple\ II\ Video\ 2017/-Assets/Frame\ Exporting + +./ffmpeg -i (drop video location) (drop destination folder - delete space)/FRAME.%05d.png + +or + +./ffmpeg -i (drop video location) -filter:v 'crop=ih/3*4:ih' (drop destination folder - delete space)/FRAME.%05d.png + + + +Current render folder can process up to 7,800 frames +A 32mb prodos partition can support one large file of 16mb +1024k / 2 blocks per frame = 16,384 frames possible in a single file + + +16,384 frames at roughly 25 frames per second = 655 seconds (almost 11 minutes)