Prisoner106 Supercuts by numbers

In a continued attempted to find meaning in Prisoner106 I am continuing to analyse the first reel of the surveillance footage by various means.

I had previously downloaded Videogrep a tool for making supercut videos from video and subtitle (.srt) files.

First I had to find a subtitle file for the video. As usual with these things google is helpful. Adding the date of the video, 1967 and eng to the search helped. I could not find one for the dvds I had acquired, but got one for a cd set.

The first run through of the tool

python videogrep.py --input ~/Desktop/the\ prisoner/the-prisoner-ep-1.m4v --search 'six'
Threw a bunch of errors that I could not understand. I headed over to the other confusing village that is github to look for clues. I did a bit of googling too. Eventually I decided just to download a fork of videogrep,habi/videogrep and see what happens. As I had all the dependencies installed I just ran the new version. This did give me a video, but confusingly nothing matched, the timings were out.

It looks like the STR file I had did not match the DVD. I’ve had this problem in the past and usually failed to fix it. But I gave Subtitle ReSync Basic from squixz.com a try and seemed to match things up.
Back to videogrep which ran through its ‘stuff’ and spat out a video, it did seem a bit short so I looked at the output:

[+] Search term 'six' was found in 3 places.
[+] Creating clips.
547.155 to 549.109: Woman Is your number six?
1429.498 to 1432.741:   Please go to number six - adjustment is needed.
2195.285 to 2198.724:   - Yours is six. - I'm not a number. I'm a person.

Opening the srt file in a text editor I just replaced all the occurrences of Six with six, I should have used the regEx for six or Six or case insensitive, which I’ve done before but I’ve forgotten how and my Internet connection is currently very slow.

I figured out the case for the second supercut:
python videogrep.py --input /Users/john/Desktop/the\ prisoner\ rips/the-prisoner-ep-1.srt --search 'number|Number' -p 1000 the -p flag pads the segments (in miliseconds)

I don’t think my SRT files is properly matched with the video, hopefully I’ll be able to find or make a better match from some subsequent reels.

Meanwhile some image analysis is getting results into the mind of number 6:

image-0881

The Village 106

I’ve resigned myself to Prisoner106, this looks so far like an interesting twitter account and lovely webpage. No schedule or anything else I’ve seen which give us free range to explore the village.

prisonerdvd

I decided to go all in for £17.90!

Given I want to watch this on my commute I am afraid the first thing I did was rip a few episodes to m4v files. HandBrake: Open Source Video Transcoder works well, it prompted for another install to remove drm and I just followed through with that. I don’t feel that makes me a bad person.

After watching the first episode I was compelled to knock out a few quick gifs.

patient-sing the-prisoner-ep-wobble-2rover-jim

I used the usual method, open in MPEG Streamclip. Set in and out points. Press cmd-t. Export to image sequence. Open the first image in FireWorks (CS3). Drag the other files into the FW window. Open he Frames window. Select all the layers and choose distribute to frames from the frames window menu. Mess around. Export to MP3.

Taking Command

I’ve started exploring episode 1 from the terminal, relying and developing techniques that I’ve posted about here. I am getting quite interested in the fun that can be had through random and unexpected results and the ability to generate different files & views at a cracking rate. Instead of working hard to produce a single artifact this will allow me t oexplore the

A lot of this relies on various command line applications that I’ve installed over the years in a fairly messy way. I tend to try things that, if they go wrong, leave me googling like mad.

I am just going to note what I’ve played with so far and not give details of installing the software for now. Much can be installed on a mac via Homebrew.

FFmpeg

FFmpeg

A complete, cross-platform solution to record, convert and stream audio and video.

First I split the video into images (How to extract images from a Video using FFmpeg | Linuxers helped)

ffmpeg -i the-prisoner-ep-1.m4v -r 1 -f image2 images/image-%4d.jpg
I now have 2938 jpgs to play with.

the-prisoner-files

Recently I’ve been interested in averaging images so into the image folder, make an average folder and:
ls *.jpg | xargs -n 10 sh -c 'convert "$0" "$@" -average average/"$0" '
Which gives me 294 files, each an average of 10 of the original jpgs.

I googled most of that code, the average command is part of ImageMagick.

To my mind these look rather lovely losing the clean 60’s lines of the original for something rather more dreamy and dark:

 

Duplicate the folder move, in the terminal into the new one and:
sips --resampleWidth 240 *.jpg Gives some thumbnails:
Averages which I’ll perhaps figure out what to do with later.

Next up I moved on to supercuts and gifboard, but I’ll leave the reporting of that to another post.

Update: adding tags AnimatedGIFAssignments & AnimatedGIFAssignments1744 for the new ds106 Assignments: Animating #Prisoner106

The Postman’s Noir Cat

Not got much time for typing. Just finished working through this week’s demands. Strange things afoot. I am no sure how seriously to take cats in a story. But you have to do some research in this business no matter how strange. I’m not making the right connections but some things are aligning up….

noir-cat

 

And this is what I am hearing:

The audio was knocked up in a few minutes, Paul has a nice voice. The technique I used will be in a post tomorrow or the day after. I am planning a supercut tutorial too.

Schooling the Wire

Three SuperCut videos from season 4 of the wire on the words, school, schooled and schooling after a prompt from Jim Groom. Made with videogrep.py

I was surprised at how few times schooled or schooling were used.

Supercut videos are a nice way of looking at this sort of stuff but you can get a quick idea of the use of words by finding them in the subtitle (.srt) files.

For example I downloaded season 4 subtitles from The Wire S04(Season 4) english subtitles – TVsubs.net. This gives several versions of the files. I found before that the DVDRip.TOPAZ.en.srt ones work best for me. I’ve put them in the same folder as my wire episodes and renamed them to match these files.

I open the terminal and type cd then drag the folder from the finder into the terminal window and hit return. This moves me into the folder.

I then grep -e 'school ' *.srt which outputs a list of the episodes with school in the subtitles and the line:

The Wire Season 4 Episode 01 - Boys of Summer.srt:for some back-to-school stuff.
The Wire Season 4 Episode 01 - Boys of Summer.srt:back-to-school stuff for?
The Wire Season 4 Episode 01 - Boys of Summer.srt:When school start, I'll be selling it
The Wire Season 4 Episode 02 - Soft Eyes.srt:for your school clothes,
The Wire Season 4 Episode 02 - Soft Eyes.srt:your school shit, man.
The Wire Season 4 Episode 02 - Soft Eyes.srt:I can't wait until school starts.
The Wire Season 4 Episode 02 - Soft Eyes.srt:of school coming up, right?
The Wire Season 4 Episode 02 - Soft Eyes.srt:- Y'all need school clothes and shit?
The Wire Season 4 Episode 02 - Soft Eyes.srt:to buy school clothes with.
The Wire Season 4 Episode 02 - Soft Eyes.srt:to school some.
The Wire Season 4 Episode 02 - Soft Eyes.srt:to that school lookin'
The Wire Season 4 Episode 03 - Home Rooms.srt:do you want to go to school for?
The Wire Season 4 Episode 04 - Refugees.srt:For school or out the business,
The Wire Season 4 Episode 04 - Refugees.srt:to start out a school year,
The Wire Season 4 Episode 04 - Refugees.srt:school on Friday,
The Wire Season 4 Episode 04 - Refugees.srt:school you, brother.
The Wire Season 4 Episode 05 - Alliances.srt:ain't in school tomorrow morning,
The Wire Season 4 Episode 05 - Alliances.srt:take him in, school him,
The Wire Season 4 Episode 06 - Margin of Error.srt:- High-school biology.
The Wire Season 4 Episode 06 - Margin of Error.srt:Ain't no school today.
The Wire Season 4 Episode 07 - Unto Others.srt:Does the school have
The Wire Season 4 Episode 07 - Unto Others.srt:creep out of school after lunch.
The Wire Season 4 Episode 07 - Unto Others.srt:He's got to be at school in the morning.
The Wire Season 4 Episode 08 - Corner Boys.srt:the word around school is
The Wire Season 4 Episode 08 - Corner Boys.srt:the school or not.
The Wire Season 4 Episode 09 - Know Your Place.srt:after school lets out--
The Wire Season 4 Episode 09 - Know Your Place.srt:to the school social worker.
The Wire Season 4 Episode 10 - Misgivings.srt:I'll get the school police.
The Wire Season 4 Episode 10 - Misgivings.srt:of the school year,
The Wire Season 4 Episode 11 - A New Day.srt:front of the school today,
The Wire Season 4 Episode 11 - A New Day.srt:at school 45,
The Wire Season 4 Episode 11 - A New Day.srt:school 52, and school 58
The Wire Season 4 Episode 11 - A New Day.srt:- The school audit.
The Wire Season 4 Episode 12 - That's Got His Own.srt:when I look at the school budget.
The Wire Season 4 Episode 12 - That's Got His Own.srt:for the school budget.
The Wire Season 4 Episode 12 - That's Got His Own.srt:with the school board itself.
The Wire Season 4 Episode 12 - That's Got His Own.srt:is on the school system.
The Wire Season 4 Episode 12 - That's Got His Own.srt:As president of the school board,
The Wire Season 4 Episode 12 - That's Got His Own.srt:not the school board,
The Wire Season 4 Episode 12 - That's Got His Own.srt:- to go see the school superintendent.
The Wire Season 4 Episode 12 - That's Got His Own.srt:the Baltimore school system's
The Wire Season 4 Episode 12 - That's Got His Own.srt:middle school no more.
The Wire Season 4 Episode 12 - That's Got His Own.srt:no school closures.
The Wire Season 4 Episode 12 - That's Got His Own.srt:over the school board
The Wire Season 4 Episode 13 - Final Grades.srt:It knocks the school deficit
The Wire Season 4 Episode 13 - Final Grades.srt:your school system."
The Wire Season 4 Episode 13 - Final Grades.srt:I went to school here

Where as schooling:


01 - Boys of Summer.srt:So... he was schooling me.
07 - Unto Others.srt:Don't be schooling us now.
08 - Corner Boys.srt:we schooling them.

Only has 3 mentions as does schooled


01 - Boys of Summer.srt:You laughing. I've been schooled, dog.
09 - Know Your Place.srt:You schooled me good.
10 - Misgivings.srt:- You schooled them well.

If you just want the number of mentions:
grep -e 'school ' *.srt | wc -l
outputs 45.

I am sure lots of ds106 students can thing of some other useful and interesting ways to use this.

all in the game

Wire Characters Season 1

My last couple of posts have been about using and setting up videogrep.py.

Videogrep is a python script that searches through dialog in videos and then cuts together a new video based on what it finds. Basically, it’s a command-line “supercut” generator.

I’ve been thinking about how to use it, especially since Jim Groom gave it a rousing reception( Wiring Supercuts & The Game Supercut ).

I’ve always liked the suspect board on the wire, where the detectives pin up pictures of suspects in a mindmap fashion, and wondered if I could make a board with Supercut videos of the characters. Turns out I can: Wire Characters Season 1.

A man must have a code

The Wire Season 1 Episode 07   one Arrest

First thing I had to do was make the supercuts, I just used the method described in the previous post, with one wrinkle. Some of the characters are refered to by more than one name, some times Kima is Greggs, I wanted to catch all of the references. It turns out that the default search for videogrep is a regular expression. Now I don’t know much (anything) about regEx, but a quick google game me the pipe character as OR, so:

python ../videogrep.py -i /Users/john/Movies/The\ Wire/Season\ 1 -s 'Kima|Greggs' -o Kima.mp4

Gets clips with either Kima or Greggs in the subtitles.

I then convert the mp4 files with miro video converter, using iphone as the setting, this lets me hear the clips which lose sound on my system. I open the output movies with QuickTime Pro find a still and hit copy. Switch to Fireworks and paste into a new document, save as a jpge with the same name as the video apart from the file extension.

I’ve now got a folder full of movies and images and just need a html file to display them.

I wanted to do a few things with the display of the videos, I wanted them to be is some sort of disarray as if pinned on, not all lined up. I also was making this in between all of the supercutting. This lead me to put the videos on the page with Javascript rather than hard coding all the tags. If you are really interested you can view the code on the page, I’ll just blog a few concepts here. I did hardcode an array of the names, without the file extensions and a matching one with the character names. It was them easy to loop through these arrays creating video elements and populating them with the video source and the jpg images as posters.

The CSS gives the div wrapping the video a white background and a drop shadow, some javascript rotates the divs (JavaScript Rotate | KaisarCode) and randomised the margins between them and the white border width.

I also used the javascript to scale down the video to fit more across the page and css to set the page width to 1600 pixels (side scroll I am afraid).

when it’s not your turn

I also missed a few things out.

  • The files are big, converting them with miro made them bigger, I guess I could use ffmpeg to do a better job of that, I could also scale them down to the size they are displayed.
  • The videos do not play in Firefox on a mac, firefox does not support the video format in the video tag. I had a very quick try using mediaelement.js to add flash for firefox but it looked like it would be too much work to display properly. I could also convert all the files to ogg for firefox, I might try that in combonation with scaleing them down a bit at a later date.

Update: I’ve run all the videos first throught te commandline ffmpg to downsize them to 360×240 and then ffmpeg2theora to create ogg versions.

Dope on the damn table

So while some of this has been for self education around javascript and css there are a few ds106 style things that spring to mind from the exercise.

The supercuts get the parts of the video where a character is mentions, sometimes this is never when they are on screen. I had to use other parts of the movie to get posters for some characters. The supercuts let you focus on the character from other characters points of view and the POV of the writers and directors. Some characters I love and feel are important are not refered to much by name, the video file sizes gives a view of this, Ellis Carver’s video is tiny (I love how his character in season 1 hints of his growth during the wire as a whole).

Although I’ve now watched most of season 1 (third time round) I’ve struggled to watch with a critical eye, or even an eye to a gif, the programme is too absorbing and emotionally involving. It has reinforced the series as my favourite tv. I am especially noticing the parts when charcters show complexity beyond normal tv. Kima, presented very positivly, leads the charge to kick and beat a youth that hits the rather usless police Pogue (or Mahone). The emotion showed by the character at the end of episode 10 and the beginning of 11 is viceral, rewatching brings back the shock from the first viewing in a suprisingly powerful way.

Watching the supercuts allows you to step back a bit, pulls information about a character together in a suprising way letting you see the character and how their story is told in new light.