31 July 2010: file conversion

From Osvidwiki
Jump to: navigation, search

Transcoding: from digital camera file to digital work file

Present: Stéfan, Kobe, Wendy, Michael, Peter

During the Active Archives workshop, (http://activearchives.org/wiki/Workshop_Brussels_2010) Wendy has worked intensively on annotating some .ogv files (such as this one: http://activearchives.org/aaa/resources/15/ ) At that time .ogv seemed difficult to play back in Firefox 3.6.6, Today we tried in 3.6.8 and it seems to play fine. better than Chrome :-)

Michael gives a tip for a good publication to start on digital video & html5: http://diveintohtml5.org/video.html


conversion from NTSC VHS video to dv file:[edit]

Kobe and Wendy worked on converting a NTSC VHS to a dv file. This is an easy hack if you happen to have a camera with an AV in.

1 ntsc VHS cassette in PAL player with NTSC playback function (Neufunk VK219+)

2 scart out to three pin minijack (for videocamera)

3 into camera (in our case Canon HV40) (set the camera on play -> and choose in the menu -rec in settings ---> Av->DV --> analogue in)

4 firewire out to a firewire computer in

5 dvgrab in the terminal (or if not working: sudo dvgrab) No options means the source is captured to your home folder.

6 ctrl+c to stop the capture

7a command to cropping sides of images, and rescale to DV format and edit from start point for a certain duration:

ffmpeg -i dvgrab-002.dv -ss 14 -t 48 -cropbottom 108 -cropright 24 -croptop 6 -target pal-dv wildebeest_tvscherm.dv

7b cropping sides of images, and rescale to DV format and edit from start point for a certain duration and deinterlace for computer screen:

 ffmpeg -i dvgrab-002.dv -ss 14 -t 48 -deinterlace -cropbottom 108 -cropright 24 -croptop 6 -target pal-dv wildebeest_computerscherm.dv

dvgrab for realtime processing[edit]

Stefan Piat was here working on a script for realtime theater performance, see http://greylightprojects.org

chmoddv[edit]

ensure the permissions are good for dv grabbing...

sudo chmod +rw /dev/raw1394

grab[edit]

cd dv
dvgrab -autosplit -frames 900

transcode[edit]

ffmpeg -y -i "$1" -sameq -s 1024x768 "$1.mjpeg"

watch.py[edit]

#!/usr/bin/env python

import os, time, glob

done = {}
lastsizes = {}

while True:
    # files = os.listdir(".")
    files = glob.glob("./dv/*.dv")
    files.sort()

    for f in files:
        if not f in done:
            mname = f+".mjpeg"
            if not os.path.exists(mname):
                # transcode
                fsize = os.stat(f).st_size
                if fsize > 0 and f in lastsizes and fsize == lastsizes[f]:
                    # file is not changing! 
                    print "transcoding "+f
                    os.system('./transcode "'+f+'" 2>/dev/null >/dev/null')
                    done[f] = True
                else:
                    lastsizes[f] = fsize
    else:
        print "waiting..."

    time.sleep(0.5)

start[edit]

#!/bin/bash
./chmoddv
./grab &
./watch.py