Inspiration

Just trying to make the world a better place

What it does

Basically, if fully developed it would make hour long videos be the size of approximately 1 megabyte, which would be pretty pretty awesome in terms of efficiency and for places that have limited internet access

How we built it

Brainstorming with comrades, and a whole lot of Java (not really, but maybe in the full implementation)

Challenges we ran into

Had to learn Java, as well as the Android Development Studio for implementation on android devices. Also looking into compression algorithms and general ways of approaching the problem. We at first tried to deal with it through raster graphics, which after some late night discussions turned out to be a rather more difficult way of solving this than if we were to do it with vector graphics, potentially at least. So that's something to consider before moving forward further.

Accomplishments that we're proud of

Learning Java!

What we learned

How to research available tools for applying towards a problem - ie Android Development is hard.

What's next for Lecture Compression

Vector graphics and a whole lot of happy internet-ers. And find an expert at Android Development to help us with the implementation and maybe switching over to vector graphics.

Team Schwartz: Filetype and App for <1 mb lectures

For some more detail, here's our documented brainstorming sessions/gameplan.

Read in sentence header- color, font size, position, time per character, time on screen Using info from sentence header, print out text onto screen as specified Run text to speech overlay simultaneously. Would be easier to use pre-existing html or other word processing code.

Pros: Only uses text, can fit a script of up to 1 million characters (not including headers). Averages out to about 150,000 words. Average read speed is 130ish words per minute, so 1 mb would potentially give us up to 100,000 minutes of text.

Cons: Would require much more overhead in developing the script, video maker would need to specify all the info required for each header.

Requirements: A script with a fillable header field An app that can understand and translate a header, and print out the text as required.


FILE FORMAT:

NUM_SUBSECTIONS

(next bit repeats for each subsection) {

X #Y

time til next section (milliseconds)

Hex code

Text

Voice_over

}

EXAMPLE 1:

4 4 5 10000 ffffff this is the first line of the file. it keeps going for quite a while. this is the voice over. 8 5 5000 ffffff this is the second line. tis truly fine. red rover red rover 2 2 500 ffffff this is the third line, fly like a bird andover ma. 6 6 10 ffffff number four, after this thers no more hardy har har


static protected class Piece { int x; int y; long til_next; String color_hex; String text; String voice_text;

}

public static void main(String args[]) throws FileNotFoundException, InterruptedException {
    Watch_lecture lect = new Watch_lecture();
    int num_pieces;
    int i;
    File file_in = new File(args[0]);
    Scanner reader = new Scanner(file_in);
    num_pieces = reader.nextInt();
    Piece[] piece_arr = new Piece[num_pieces];
     for (i = 0; i < num_pieces; i++)
         piece_arr[i] = lect.read_piece(file_in);
     lect.print_piece(piece_arr, i, num_pieces);
}


protected Piece read_piece(File fp) throws FileNotFoundException
{
    Scanner reader = new Scanner(fp);

    Piece p = new Piece();
    p.x = reader.nextInt();
    p.y = reader.nextInt();
    p.til_next  = reader.nextLong();
    p.color_hex = reader.nextLine();
    p.text      = reader.nextLine();
    p.voice_text= reader.nextLine();
    return p;
}

protected void check_input(Piece p)
{
    assert(p.x >= 0);
    assert(p.y >= 0);
    assert(p.til_next >= 0);
}

protected void print_piece(Piece piece_arr[], int i, int max) throws InterruptedException
{
    if (i >= max)
        return;
    i++;
    //text color?
    System.out.println(piece_arr[i].text);
    //voice over?
    wait(piece_arr[i].til_next);
    print_piece(piece_arr, i, max);
    //the removal and positioning of text should be handled by
    //android layout code i believe.
}

Built With

  • android-development-studio
  • java
Share this project:
×

Updates