Tuesday, July 24, 2007

Grabbing frame from video

This is in continuation of my earlier post where I wanted to pick a color from an Image. Only this time, I wanted to grab a frame from a mpeg2 video and save it as a file so I could submit it to a photo contest. I got a couple of software none of which worked. I then decided to take matters in my own hand and use the Screenshot program in java that I had to take a snapshot of the video while it was paused. There's usually a slight blurring and I was okay with that.
To my amazement, the results were astounding like straight out of a Stephen King novel. First I played my video using Windows media player. Then I paused it at the frame I wanted. Then I ran my Screenshot program to save the frame to a PNG file. So far so good. Now that I had saved the frame I wanted, I let the video play till the end. Then when I checked the saved image guess what I found. The image stored was the last frame from the video and not the frame I wanted to save. It was as if the image got updated by itself after the java program had saved it and exited. How could this possibly be.
I wasn't ready to give up just yet. The last frame got saved to the file since the video kept running till the end. What if I didn't run the video after the file was saved and left it in pause mode. So I tried this out and I got my frame in a image. The picture was still inside of the WMP in the image which I planned to correct using the 'crop' tool of my image editing tool. Again, when I loaded the image into the ImageEditor, the results were frustrating to say the least. The 'crop' function wouldn't work. It was as if the image had a mind of its own and wouldn't respond to my effort to scroll the image. The picture inside the WMP itself would remain stationary while the rest of the picture scrolled. In the end, I decided to make the best use of what I had and just cropped the portion of the image I wanted AND was visible, and saved as a new image. So I had the picture I wanted or so I thought. I closed my ImageEditor and also WMP which was still paused. I was ready to upload the image I had saved to my website. I wanted to check the image before I uploaded it and when I opened it, I was amazed at what I found.

"The image was pitch dark and there was nothing but a black rectangle where earlier there was the picture of a marble structure."

Is there a scientific explanation that has to do with codecs and proprietary video formats or should I treat this as something out of a Stephen King novel.

15 comments:

paulo said...

I already saw WMP become a dark area when my teacher tried to output a video into a projector. My guess i DRM. Oh btw, did you thought to try nestedvm as in:
http://www.jroller.com/dk/entry/java_media_a_new_perspective
as a altenative for translating native codecs to java?

Anonymous said...

talking to toddlers -
the action machine -
thebadbreathreport -
the bad breath report -
thedietsolutionprogram -
the diet solution program -
the rich jerk -
tonsil stones remedies -
top secret fat loss secret -
turbo cash generator -
turbulence training -
twitter online system -
uncle sams money -
underground hypnosis -
vincedelmontefitness -
vince del monte fitness -
warp speed fat loss -
water 4 gas -
wedding speech 4u -
wp goldmine -
wrap candy -
xsite pro -
zygor guides -
37 days to clean credit -
advanced defrag -
adware alert -
adware bot -
affiliate prophet -
affiliate video brander -
anti spyware -
art of approaching -
atomic blogging -
auction classified cash -
automated cash formula -

Anonymous said...

bbq book -
bloggers pay check -
blogging in action -
body building revealed -
burnthefat -
burn the fat -
carb rotation diet -
cheat your way thin -
chopper tattoo -
cleanup the profits -
cold sore freedom in 3 days -
commission blueprint -
conversationalhypnosis -
conversational hypnosis -
cure for bruxism -
declutter fast -
driver checker -
earth4energy -
earth 4 energy -
easy member pro -
easy tv soft -
eatstopeat -
eat stop eat -
fap turbo -
fatburningfurnace -
fat burning furnace -
fatloss4idiots -
final sync -
final uninstaller -
fitness model program -
fit yummy yummy -
flatten your abs -
forex ambush -
governmentregistry -

Anonymous said...

government registry -
healthy urban kitchen -
homebrew installer -
homemadeenergy -
home made energy -
instant article wizard -
jamo rama -
joyful tomato -
lose man boobs -
lower body make over -
maternityacupressure -
maternity acupressure -
maverick money makers -
meet your sweet -
muscle gaining secrets -
muscle gain truth -
natural cancer treatments -
niche review templates -
nyhms warcraft guides -
pappa pc -
pc booster -
pc optimizer pro -
pc secret formula -
pda flix -
privacy control -
publicrecordspro -
public records pro -
push button ecover -
reg defense -
reg genie -
registry easy -
registry genius -
registry smart -
registry winner -

Anonymous said...

registry winner download -
reverse mobile -
richard mackenzie direct -
rocket japanese -
rotator cuff training -
save my marriage today -
secrets book -
silent sales machine -
silver lotto -
spyware cease -
super affiliate handbook -
the 11 forgotten laws -
thebadbreathreport -
the bad breath report -
thedietsolutionprogram -
the diet solution program -
the power pause -
tmj help -
tonsil stones remedies -
top secret fat loss secret -
turbulence training -
twitter rockstar -
uncle sams money -
underground hypnosis -
vincedelmontefitness -
vince del monte fitness -
warcraft millionaire -
warcraft wealth -
warp speed fat loss -
webcomp analyst -
wedding speech 4u -
win back love -
your software website -
zox pro -

Anonymous said...

zygor guides -
500 love making tips -
acid alkaline diet -
acne no more -
advanced defrag -
adware alert -
adware bot -
affiliate elite -
anti spyware -
anti spyware bot -
article bully -
art of approaching -
auto pilot profits -
bbq book -
blogging in action -
body building revealed -
burnthefat -
burn the fat -
carb rotation diet -
chopper tattoo -
conversationalhypnosis -
conversational hypnosis -
cure for tinnitus -
debt free in three -
driver checker -
duplicate file cleaner -
earth4energy -
earth 4 energy -
easy member pro -
easy tv soft -
eatstopeat -
eat stop eat -
end your tinnitus -
fap winner -

Anonymous said...

fat burning furnace -
fatloss4idiots -
fat loss 4 idiots -
final sync -
final uninstaller -
firewall gold -
fitness model program -
fit yummy yummy -
flatten your abs -
forex auto money -
forex auto pilot -
forex confidante -
game tester guide -
governmentregistry -
government registry -
healthy urban kitchen -
higher faster sports -
homebrew installer -
homemadeenergy -
home made energy -
i am big brother -
instant profit machine -
i want a teaching job -
joyful tomato -
lose man boobs -
lower body make over -
macro virus -
magic of making up -
make money taking surveys -
malware bot -
maternityacupressure -
maternity acupressure -
meet your sweet -
moles warts removal -

Anonymous said...

money siphon system -
muscle gaining secrets -
my airfare secrets -
my miracle loans -
Auto Content Cash -
Banner Ad Blueprint -
Copy Paste Systems -
Every Other Day Diet -
Farm Ville Secrets -
Plugin To Green Profits -
Rapid Mass Traffic -
Tinnitus Miracle -
Tweetomatic Profiteer -
Woodworking 4 Home -
24 Hour Internet Business -
Blogging To The Bank -
Burn The Fat -
Earth 4 Energy -
Fap Turbo -
Fat Burning Furnace -
Fat Loss 4 Idiots -
Foex Auto Money -
Hemorrhoid Miracle -
Legit Online Jobs -
Magic Of Making Up -
Magni Work -
Micro Niche Finder -
Plr Article Software -
Pregnancy Miracle -
Software Submitter Pro -
The Affiliate Code -
The Diet Solution Program -
Truth About Abs -
Zygor Guides -

Anonymous said...

my out of control teen -
natural cancer treatments -
ovarian cyst cures -
pc optimizer pro -
piano for all -
prevent sweating -
privacy control -
publicrecordspro -
public records pro -
pvp bible -
quick article pro -
quit smoking today -
reg defense -
reg genie -
registry easy -
registry genius -
registry smart -
registry winner -
registry winner download -
reg tool -
relationship headquarters -
reverse mobile -
richard mackenzie direct -
rocket japanese -
rotator cuff training -
satellite tv pc master -
secrets book -
spy no more -
spyware cease -
survey scout -
the bad breath report -
thedietsolutionprogram -
the diet solution program -
the guru assassin -

Anonymous said...

the power pause -
tmj help -
tonsil stones remedies -
turbulence training -
two minute profits -
vincedelmontefitness -
vince del monte fitness -
warp speed fat loss -
web traffic machines -
wedding speech 4u -
wind plans -
xp repair pro -
your fun business -
zygor guides -
500 love making tips -
acid alkaline diet -
acne no more -
advanced defrag -
anti spyware bot -
art of approaching -
banish tinnitus -
beat eczema -
blood pressure normalized -
burnthefat -
burn the fat -
conversationalhypnosis -
conversational hypnosis -
cpa arbitrage -
creative date ideas -
debt free in three -
digital background -
dirty talking guide -
discus fish secrets -
duplicate file cleaner -

Anonymous said...

酒店經紀 酒店打工 酒店工作 酒店上班 酒店兼差 酒店兼職 打工兼差 打工兼職 台北酒店 酒店應徵 禮服酒店 酒店 經紀 打工 兼差

Anonymous said...

California auto insurance quotes and information at http://california-autoinsurance.com.

Anonymous said...

buy valium purchase valium online - generic roche valium

Anonymous said...

buy tramadol with paypal purchase tramadol - can you buy tramadol onlinelegally

Anonymous said...

Buy Tramadol Online tramadol online pharmacy - buy tramadol with paypal