Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    2

    Unanswered: Arrange List of Timecode

    I'm trying to write a script that will take a very long list of timecode numbers, in the format xx:xx:xx:xx, and arrange them in groups that equal a certain number.

    I work at a TV station, and we air clips of people who are serving in the military away from home saying hello to their friends and family. We have a lot of clips, each of varying legth. Right now we're going through the proccess of logging how long each clip is.

    I have a little expeirience with shell scripting, but this is beyond my abilities.

    I want to be able to feed the script a list of timecode, and arrange them in groups that are close to 15 seconds. The order doesn't matter, just that they fit in a 15 second commercial.

    If someone wants to write a script, that'd be great, but otherwise I just need to be pointed in the right direction with what commands I need to learn about.

    Thanks for your time.

    Colin
    Just in case, timecode is formatted hh:mm:ss:ff Hour:Minute:second:frame and there are 30 frames per second

  2. #2
    Join Date
    Apr 2004
    Location
    Boston, MA
    Posts
    325
    sounds like a noble cause

    how about proving a sample hypothetical imput and desired output?
    vlad
    +-----------------------+
    | #include <disclaimer.h> |
    +-----------------------+

  3. #3
    Join Date
    Nov 2004
    Posts
    2
    Well the guy in charge of doing this has already started dividing up the clips, so writing this script probobly won't help right now. I still think it'd be cool to have around if someone feels like scripting something.

    heres an example of what type of input/output I was thinking of.

    input... a file containing a list such as...

    00:00:05:24
    00:00:03:15
    00:00:06:03
    00:00:02:29

    Output... groupings of numbers whos combined total is less than or equal to 00:00:15:00. Basicly The script would report the most efficient way to group the smaller clips into 15 second spots.

    XX:XX:XX:XX
    XX:XX:XX:XX
    XX:XX:XX:XX

    XX:XX:XX:XX
    XX:XX:XX:XX

    XX:XX:XX:XX
    XX:XX:XX:XX
    XX:XX:XX:XX
    XX:XX:XX:XX

    where each grouping is as close to 15 seconds as possible without going over.


    I think one of the most tricky parts of the sript would be the fact that the last two digets are frames... so the last two digets are /30, and the rest are /60. 30 frames per second, 60 seconds per minute.. ect.

    so Like I was saying, at this point its just something I'd like to figure out. I don't mind if somoen wants to write it out, cause I could disect it and see how to do it, but otherwise if pointed in the right direction, I'm just trying to learn.

    Thanks in advance for any input.

    Colin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •