Search found 29 matches
- 2014-07-25T23:11:04-07:00
- Forum: Developers
- Topic: stream -extract without reading entire file from disk?
- Replies: 2
- Views: 3899
Re: stream -extract without reading entire file from disk?
Email says someone responded to this thread but I see no response. Perhaps forum emails are confused. In any case, I think I'm butting up against the old "P vs NP problem", as my programmer friend told me, in this case. So, no worries! This is what happens when someone who hasn't studied computer ...
- 2014-07-12T17:50:41-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
That's okay, I know this is pretty deep in the weeds in terms of a very specialized (and unfriendly to more common approaches) task. Thanks for helping!
- 2014-07-12T16:19:35-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
I'm saying that "16.6MB MPC source images cropped with convert -crop" was slower than "6.2MB PPM source images cropped with stream -extract".
- 2014-07-12T16:15:57-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Was it faster than starting with PPM or PNG or whatever your original format was for the same code? It should be. That was the point of MPC. No, because it required reading more data from disk. Maybe my installation of ImageMagick is busted, or maybe OS X's I/O code doesn't allow whatever IM needs ...
- 2014-07-12T15:28:40-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Yes, I had pre-converted them. But no, it was not faster—it was slower, since it was having to read more data in. Unless using convert -crop to load them is incorrect, and there's some other operation I should be using that's more efficient. The thing is, I'm not loading one image over and over: I'm ...
- 2014-07-12T13:30:47-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
No dice—using convert -crop (and outputting to miff on stdout) on a bunch of MPC files just results in reading them completely off the disk as well.
- 2014-07-12T11:57:10-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Yes, and I am currently using PPM—it seems to still need to read the entire input file off the disk in order to stream-extract from a given position though. It's the "lots of disk space and I/O" that I'm trying to fight—unless MPC allows for "paging in" only the portion identified by crop (without ha ...
- 2014-07-12T11:31:22-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Yeah, that's outdated code at this point. Currently my test script looks like this: #!/bin/bash # ImageMagick Tests for mbarcode.sh mkdir -p tempcrops echo -e "Dumping PPMs..." ffmpeg -an -sn -i ${1} -r 0.25 -vf "transpose=1" -pix_fmt rgb24 -f image2 -vcodec ppm tempcrops/f_%05d.ppm &> /dev/null ...
- 2014-07-12T10:39:36-07:00
- Forum: Developers
- Topic: stream -extract without reading entire file from disk?
- Replies: 2
- Views: 3899
stream -extract without reading entire file from disk?
I myself am not a developer (far from it!), but I was hoping a developer in this forum might be able to answer my question. tl;dr version: Is there any way to stream -extract a row of pixels from an input image without having to read the entire input image off the disk? I'm currently trying to do ...
- 2014-07-11T16:53:58-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Well, never mind. After running the script for a while, I noticed it'd slowed down considerably (19s per barcode by the time it was into the mid-40s, when I re-launched it after a tweak), and my "data read" stat in Activity Monitor had climbed into the "200GB" range. Clearly reading specific columns ...
- 2014-07-11T12:54:51-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-07-11 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules Delegates: bzlib djvu fftw fontconfig freetype gslib jng jpeg lcms ltdl lzma png ps tiff webp x xml zlib On OS X 10.10 Yosemite DP3. That ...
- 2014-07-11T11:43:30-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Hmm. Now I have a new, mysterious problem. Here's the code I came up with (basically resembles your pseudo code from earlier, snibgo): #!/bin/bash # ImageMagick Tests for mbarcode.sh FILES=($(find "${1}" -type f | egrep -i "\.jpg$" | sort)) i=1 echo -e "Dumping MIFFs..." for f in ${FILES[*]}; do ...
- 2014-07-09T20:10:48-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Is there a way to get tile cropping to output to many different files, rather than just one, as I surmised in my next previous post? If that was the case, I could: 1) Read in a single frame 2) Blast out each column to its own "bucket" 3) Close that frame 4) Read in the next frame 5) Blast out each ...
- 2014-07-09T19:53:45-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
I am confused. I thought you were only extracting one column from the image (after resizing). Are you trying to get every column of each resized image. In a word, yes. Lemme try to break it down. The first thing I do is dump out a number of frames from the source video. Basically I give ffmpeg a ...
- 2014-07-09T19:10:12-07:00
- Forum: Users
- Topic: Speed up “movie barcode” generation w/ IM
- Replies: 64
- Views: 25954
Re: Speed up “movie barcode” generation w/ IM
Ooh, what about this, then? Is there some way to read ONE frame in, then throw out each one of its columns into one file per column? And then, read the next frame in, and do the same thing—except instead of making their own files, appending them to the proper files from the previous iteration? ...