Bitcoin Forum
May 28, 2024, 04:09:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 [46] 47 48 49 »
901  Economy / Services / Re: [3 BTC] Help me covert some images to a movie on: April 23, 2012, 01:26:39 PM
No problem. Take your time. If you have problem, just reply here or send me a PM.

Thank you!
902  Economy / Services / Re: [3 BTC] Help me covert some images to a movie on: April 22, 2012, 07:02:15 PM
Oh cool, that you actually want to pay me something! My address is:

1Q3DhCvgcgMKtQJGQMPZGLZaueWaTps7wh

Ok, back to your questions...

You'll most likely use the bash shell. That shell is not simply a terminal, but it also contains a pretty much complete programming language, so you can write (shell) scripts with it!

The line:

for f in *pbm ; do convert -quality 100 $f `basename $f pbm`jpg; done

is such a (small) script.

The shell expands *pbm to the list of pbm file in your directory, so it evaluates to

0.pbm 1.pbm 2.pbm ...

The 'for' commands lets you loop over this list of filenames, so the variable f becomes one of the filenames in each iteration. During the first loop iteration f is 0.pbm, then it's 1.pbm etc.

The 'do' part simply describes what to do in each loop iteration. So we call a program called 'convert', which is part of the imagemagick package and converts image files. So in the first iteration, we call

convert -quality 100 0.pbm 0.jpg

, because $f simply means 'the value of f' , which is 0.pbm at the time. `<command>` is a construct to run a command and use it's return value. So basename is just a program to
a) remove a path from a filename and
b) remove a suffix from the filename.
So "basename 0.pbm pbm" is just a way to remove the pbm suffix from the filename. Then we add jpg to the filename and 0.pbm becomes 0.jpg.

So this whole line is just a short way to execute
convert -quality 100 0.pbm 0.jpg
convert -quality 100 1.pbm 1.jpg
etc...
So we convert each pbm file with quality 100 (no quality loss) to a jpg file.

So you should have the files
0.jpg 1.jpg 2.jpg ...
in your directory and you could use them as the input of ffmpeg or mencoder to create a movie from them.

PS: if you don't know what a command like 'convert' does, just type 'man convert' and you'll get a manual for this program. Use 'q' to leave the manual.

So, you your jpg files now as the input to ffmpeg:

ffmpeg -r 30 -b 1800 -i *.jpg output.mp4

, which calls ffmpeg with *.jpg (all the images) as the input (the part after -i is the input), a framerate of 30 fps (-r 30 means rate 30), a bitrateof 1800 kbit / second and and outputfile named 'output.mp4'.

The %02d was actually an error by me, since it means '2 digits', but this wouldn't match for your first files 0.pbm, but only for 00.pbm, 01.pbm etc.

Does this help you a bit further?

You could also send me the files, if you want, so I could create the video, but I thought you want to learn bash...

Ciao,
Andreas
903  Economy / Services / Re: [3 BTC] Help me covert some images to a movie on: April 21, 2012, 07:12:16 PM
http://electron.mit.edu/~gsteele/ffmpeg/

tells you quite exactly what to do. Convert the file to jpg and then encode them to a movie.

for f in *pbm ; do convert -quality 100 $f `basename $f pbm`jpg; done

should loop over your files and convert them to jpegs.

You could then try mencoder or ffmpeg to create the movie:

mencoder mf://*.jpg -mf w=800:h=600:fps=30:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi

ffmpeg -r 30 -b 1800 -i %02d.jpg output.mp4

The best parameters for the output (resolution, bitrate) depend on your input files obviously (the resolution of the images or how move movement you have in your movie).

h264 might be the best encoder for HD quality these days, so I'd consider it, if you want HD quality.
904  Bitcoin / Development & Technical Discussion / Re: XML standard to store trades, order etc? on: April 21, 2012, 11:47:13 AM
Thanks! So far I just made up my own schema. If another format turns out to be widely accepted, I can change the format later.
905  Bitcoin / Development & Technical Discussion / XML standard to store trades, order etc? on: April 20, 2012, 03:52:20 PM
Hi!

I fetch the mtgox data in an app and would like to store them, so I don't have to fetch them completely again. Is there a standard XML format to store trades and orders?

TIA,
Andreas
906  Bitcoin / Mining support / Re: [HELP] Ubuntu 10.10 Nvidia on: April 19, 2012, 11:42:37 AM
It seems, there are no OpenCL drivers for this card, so all the popular GPU miners won't work.
907  Other / Beginners & Help / Re: Newbies Hangout on: April 05, 2012, 02:44:31 PM
Welcome!
908  Local / Trading und Spekulation / Bitcoins in der Bild erwähnt on: April 05, 2012, 01:07:59 PM
http://www.bild.de/geld/wirtschaft/wirtschaftsticker/wichtige-meldungen-aus-der-wirtschaft-23509676.bild.html

Warum hab ich da kein gutes Gefühl bei...? *gruebel*
909  Other / Beginners & Help / Re: Newbies Hangout on: April 05, 2012, 12:29:15 PM
A SHA256 isn't hard to compute, its just that you have to do a ton of them to verify a block Wink

If you know a simple way to compute a sha256, please let me know, so I can finally mine with my GeForce 7. So far it takes to many instructions for a shader... Sad

Ciao,
Andreas
910  Other / Beginners & Help / Re: Newbies Hangout on: April 03, 2012, 05:25:06 PM
A hash value is just a number, that identifies a block of data somehow. Example: if you have 10 bytes, you could just add all those byte without carry and get a 1 byte hash value for those 10 bytes. You could than add an additional condition to this hash value, like 'must be < 10' and try to find all blocks, that have such a hash value. The hash rate would be the number of blocks you could check per second, if their hash value fulfills this condition.

The sha256 hash value is much more complicated to compute, so you need quite some computing power to check a reasonable number of bitcoin blocks per second.
911  Economy / Services / Re: [WWFB] Java Applications Programmer on: April 01, 2012, 03:11:09 PM
I also interested in any stats on Java development.
912  Other / Beginners & Help / Re: Newbies Hangout on: March 28, 2012, 06:58:12 AM
Welcome!
913  Bitcoin / Bitcoin Technical Support / Re: MtGox API on: March 25, 2012, 01:03:53 AM
The ruby code seems to use the 0 API?
914  Bitcoin / Bitcoin Technical Support / Re: MtGox API on: March 24, 2012, 05:11:57 PM
Is there more info available on format of the returned json data? I.e. the structure of the open orders.

TIA,
Andreas
915  Local / Trading und Spekulation / Re: Help! (post in english, sorry ...) on: March 17, 2012, 06:20:09 PM
fleurop.de delivers flowers to any location in Germany.
916  Bitcoin / Bitcoin Technical Support / Re: Suggestion - API subforum on: March 11, 2012, 02:46:50 PM
Like the mtgox API? Currently most of the stuff is under trading, I guess. But there are a few technical questions, that don't really git there in my eyes, so an API subforum would be cool...
917  Alternate cryptocurrencies / Altcoin Discussion / Re: The Litecoin Development Club on: February 29, 2012, 06:36:11 PM
Hi!

I kinda want an R-Type game (top down shooter) with upgrades purchaseable for LTC...might be a bit easier for me to code than the farmville thing.

I've thought about that concept: buying upgrades with LTC in the game.

Would help pay game author and contribute game rewards for the players as well.

Buy 20 missiles for 1 LTC to kill level-end enemy, or so.
918  Economy / Trading Discussion / Re: javascript/node.js trading library for bitfloor and mtgox on: February 29, 2012, 04:22:23 PM
Thanks for your reply! Maybe the 10s delay is not really an issue and I should continue work on the Java API. Thanks for the encouragement!
919  Economy / Trading Discussion / Re: javascript/node.js trading library for bitfloor and mtgox on: February 29, 2012, 12:15:04 AM
Looks nice! I wrote some early Java code for the mtgox json API, since I'm also interested in tradebots. But the problem is the delay in the mtgox json api, so my concern is, that a bot would simply react much too late to be efficient?
920  Economy / Trading Discussion / Re: MtGox Streaming API is Broken on: February 26, 2012, 08:09:02 PM
Wouldn't it be easier to get the json server update more often?  How quick is enough 'real time'?
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 [46] 47 48 49 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!