Sunday, December 19, 2010

Chunks of text :)

So i been googling, and not finding... i want chunks of text that are x number of KB exactly in size, for a visual of "how big" something is. Maybe I suck at googling, but i cannot find this, so I will make it myself.

First i will show in binary, then in regular text.
One bit:


Unicode text (standard)

Two bits:


Unicode text (standard)

Eight bits (one byte:)


Unicode text (standard)

Monday, August 2, 2010

Search & Win

Thursday, July 1, 2010

Listening to music...

So I'm sitting here listening to this nnntiiss song from daft punk, and it ocours to me that the setup im using is the most complicated ive ever heard of... So you see my roomate moved out today, and took his awesome 300 watt sterio with him, so i was stuck using my psp through the front line in in the tv. This the psp was streaming wifi shoutcast radio techno channel.. but thats not where its complicated, whats complicated is where the psp is getting its wifi from. I have a pppoe router from Bell canada that has a wifi antenna on it, so i change the router user and pass to a cusom one. Then i enable the pppoe server on my pfsence router, an embedded distro of free bsd, and run a cord from the bell modem to my gigabit switch. This then has a 30 foot ethernet cord through two walls onto the pfsense box, and a short cord to the cogeco modem. The cogeco box then converts to coaxial and runs the same 30 feet back to my coax port in the living room.... Not sure if i have heard of a more complicated setup...

Tuesday, June 29, 2010

How to concatenate files from Dos cmd

To combine multiple files, e.g. concatenate them...

copy /b file1+file2 dest


copy /b 00001.mts+00002.mts+00003.mts combined.mts

Copies the mts files into one file, combined.mts

If this, like i am using is for combining video streams, you can then easily remux with ffmpeg, to fix the broken indexes.

ffmpeg -i combined.mts -acodec copy -vcodec copy -scodec copy combined_indexfixed.mp4

How to pipe from ffmpeg to ffmpeg in windows or linux

Its quite interesting to look at time lapse videos.. but how do you make them? It is fairly easy with ffmpeg, but the standard method is to create fifty bazillion images from the source video, then re-encode that to whatever... thats quite troublesome and takes dozens of GB of space, especially when using HD video, and... what about all the wasted cpu cycles from compressing the png/jpg frames? (i know you can use bmp, see above about the DOZENS OF GB, or 5.5 MB/frame for 1920x1080)

Surely there must be a better way to do this, in linux you can easily pipe from one program to another, but no one seems to know how to do that with ffmpeg in windows.

So... I just spend the last...6? hours trying to figure this out... couldn't find it anywhere in Google, so as i always forget stuff, I thought, why not post it on a blog or something... perhaps it will save time for someone else...


This exact syntax works with both linux and windows consoles.
Using this command somehow suppresses the ffmpeg check that sees if the output target file exists, so it will overwrite without asking anything.
-deinterlace is deprecated, instead use

-filter:v yadif 

(much better quality)

c:\>ffmpeg -i "source_video" -r 2 -deinterlace -f image2pipe -vcodec ppm - | ffmpeg -r 29.97 -f image2pipe -vcodec ppm -i - -vcodec libx264 -fpre libx264-superfast.ffpreset -fpre libx264-main.ffpreset -threads 0 -crf 24 -s 1920x1080 -y test.mkv

What this does, is tell ffmpeg to take 2 frames per sec from the source vid, then pipe that to the next ffmpeg and, with the settings i use, re-encode that to x.264

The bare command, if you wanted to specify your options like bitrate, other codec etc would be:

C:\>ffmpeg -i "src_vid" -f image2pipe -vcodec ppm - | ffmpeg -f image2pipe -vcodec ppm -i - -vcodec
(whatever you want after this e.g. xvid, etc etc...)

At the moment im working on a 4 hr time lapse of the clouds and sunrise... should be good :)

Edit 2012/06/01

I made another video using this method:

Edit 2012/06/18

Yet another, added notes section above :)
This one was done on linux:

$ ffmpeg -i 00070.MTS -r .5 -filter:v yadif -f image2pipe -vcodec ppm - | ffmpeg -r 29.97 -f image2pipe -vcodec ppm -i - -vcodec libx264 -crf 24 -s 1920x1080 -y /home/vm/Videos/ice1.mkv

There were 3 parts, as my camera splits into 2 GB files, after they were sped up, avidemux was used to combine them.