Filetype conversion

Hi

Ok, humour me with this post, I’m not a php developer, I’m an artist who programs and have been using php for almost ten years so am quite competant however I don’t often make ‘practical’ things so this may seem a bit way out - as I said humour me, it’s all for the sake of art.

I want to build a script which will translate a filetype from one format to another, practical examples of this would be those convert to pdf scripts you find online. However I want my script to be able to convert a digital video to a batch of real files in a folder of varying types (kind of like unzipping a file). These files could be .txt, .jpg, .mp3 or many other files types.

Yeah I know, I’m weird before anyone else says it.

I forsee lots of problems with this e.g.

  1. First problem is how do I initially go about encoding my files into my video to actually work as a video? Would an initial step of compressing them all into one file (to group them) and then doing the conversion of that one compressed file to a video format be the best approach? I’ve used the Zip library before in php and it works well so in my mind that would be the best way to go about this initial step but perhaps not?

  2. What is the easiest video format to generate and of course non-proprietary? I don’t know of any library that does this (sort of like Ming) as its not practical/sensible (?). I realise that the video will be blocks of colour and maybe noise - thats what I’m looking for.

These I’m sure are only the tip of the iceberg but if I can get my head around them with somebodies help it might get me started.

Looking at this:
http://www.turbulence.org/Works/arcangel/
might help with giving you an idea of what I’m trying to achieve, except I’m sort of doing the reverse and the files that come back out of the video need to work.

There was also a app for the mac a few years back which could encode, compress and send files from the computer to a camcorder (via firewire like video apps send video back to tape) for storage, can’t remember the name of it but what I’m trying to do is similar on a smaller scale.

Help, suggestions or thoughts would be greatly appreciated.

Garrett

PHP is an HTML preprocessor.
Learn flash & Action Script

You’re weird.

B’gone, programming is no world for proper artists. :smiley:

Interesting idea though…

PHP can output HTML, but it’s in no way tied to it Shrapnel_N5.

yes Shrapnel_N5, AnthonySterling is correct, if you read my post I did mention Ming, Php Zip and alluded to PDFLib, all of which output other file formats - these are just three of many formats that can be rendered out from php. Flash & Action Script would in no way be useful for this.

Well why he didn’t provide a link for rich featured PHP video editor?

AnthonySterling is wrong.
Because PHP were invented to handle text data.
And main purpose of PHP is to handle text data. There are nearly one hundred string functions in the php core. And not a single one to handle binary formats except in the third-party libraries. Yes, there are some. But they are optional and very poor-featured (just take a look at widely used GD library)

It is not question about what PHP can and what can’t. It is question about what PHP proper tool for.

ok well the nature of the original question does imply an experimental approach and pushing the limits of php so let’s agree to disagree on this point and move on.

Garrett

Well let’s move.
Correct me i I am wrong. Does all file formats look similar to you and you see no much difference between, say, zip and avi files?

Off Topic:

Did I state there was one? :rolleyes:

Shrapnel_N5, do me a favour, stop being a tool? You witter on and often provide very little substance to threads other than some rather poor attempt at wit.

I’m sure you have a lot to give as you occasionally do have the odd post which has valid/helpful content, and they’re appreciated. Let’s try to make more of those post’s huh? :wink:

Now, lets get back on track…

So, files -> video -> files is what were after here I guess.

ponders

How about, and I’m just throwing this out there, we convert all those files to a zip then transform that zip into a readable string.

Break the string up into tokens, then assign these tokens a colour.

We then, use a mapping of some sort to create images which ffmpeg could compile into a video?


<?php
$video = array(
    array(      #1 second
        'RED',
        'BLUE',
        'WHITE',
        'BLACK'
    ),
    array(      #2 second
        'WHITE',
        'BLUE',
        'RED',
        'BLACK'
    ),
    array(      #3 second
        'BLUE',
        'WHITE',
        'BLACK',
        'RED'
    )
);

The process would now be files -> zip -> string -> images -> ffmpeg -> video.

It would be easy enough to reverse the process I guess, video -> ffmpeg -> images -> string -> zip -> files…

Any thoughts, even more crazier suggestions welcomed! :smiley:

[offtopic]

stop being a tool?
but I am[/offtopic]
The final goal, as far as I understand it, is to have a flash movie.
So, why don’t we make a flash based animation already? By using proper tools for the flash animation?
There are even some PHP based libraries I believe.

And, by any means it is not the thing called “filetype conversion”.

What is the starting file type and what is the intended finishing file type?