Streaming slide show with audio

Discussion in 'Digital Video' started by fcohen, Apr 24, 2007.

  1. fcohen macrumors newbie

    Joined:
    Apr 24, 2007
    #1
    I'm seeking advice on the best way to create a streaming slide show that contains my voice narration? I put together a KeyNote slide deck to introduce my new open-source test tool. The deck has about 45 slides. I would like to let users watch the slide deck and hear my narration.

    I have the following:
    PowerBook G4 running Mac OS X 10.4.91
    1 Gbyte RAM, external Firewire drive with 400 Gb
    Quicktime Player Pro 7
    Keynote 3.0.2

    I used the Quicktime Player to create a .mov file with the slides and my narration. That worked easy enough. I used File->Open Image Sequence... and imported the 45 slides from PNG format. The slides are 720x540 pixels, each one is about 88 K.

    I recorded my voice using the Quicktime Player and used the Edit->Add To Movie command. I then used Edit->Add To Selection And Scale to add the slides.

    The resulting .mov file is about 10.5 Mbytes and it runs about 53 minutes.

    The problem I'm having is turning this into a streaming movie and video Podcast.

    Quicktime Player takes about 7 hours to encode the movie into H.264 format. It looks like it is going to take multiple hours to export to MPEG-4 format. So, the first problem is "how can I export in a format that doesn't take so long to encode?"

    Second problem, "what format should I use to be playable on the largest number of users?"

    Any help is most appreciated.

    -Frank Cohen
    http://www.pushtotest.com
     
  2. Mydriasis macrumors 6502

    Mydriasis

    Joined:
    Mar 17, 2005
    #2
    You basically already answered your own questions...:)

    first: all video encoding takes long! Thats just the way it is. (H.264 will take longer that MPEG-4 but the results wont be as good)

    second: MPEG-4 will probably be most compatible.
     
  3. fcohen thread starter macrumors newbie

    Joined:
    Apr 24, 2007
    #3
    Thanks for confirming what I feared.

    One other question, what format should I be making this file available in so the most people can view it? What are the advantages of AVI, versus MPEG 4 for example?

    -Frank
     
  4. fcohen thread starter macrumors newbie

    Joined:
    Apr 24, 2007
    #4
    Flash seems to be the solution

    I found a great little utility called SWF 'n Slide from http://www.verticalmoon.com for Mac OS X. It is a simple slide show editor that outputs to Flash SWF files.

    I didn't originally want to go this route, but it appears to be a good choice. The SWF file size is around 1.5 Mbytes for a 3 slide deck with about 4 minutes of AIF encoded audio.

    It just seems that MPEG4 and AVI is a solution for videos, and I am looking for a solution to slide shows.

    Any comments?

    -Frank
     
  5. Mydriasis macrumors 6502

    Mydriasis

    Joined:
    Mar 17, 2005
    #5
    98% of all computers hooked up to the internet have a flash player. So flash is the most compatible, then comes windows media player and then QuickTime.

    MPEG-4 can be played by both WMP and QT.

    I personally use QT for all video downloads (I'm a mac fan) and flash for stuff I only want people to see on the site.
     
  6. fcohen thread starter macrumors newbie

    Joined:
    Apr 24, 2007
    #6
    Flash works, but is difficult to get there

    I found and developed a solution for creating a slide show with an audio narration. I created the slides using Apple Keynote. Getting it onto the Web was a huge effort.

    I found a bunch of problems:

    Keynote exports to AIFF and MPEG4. The slide deck has 53 slides! When export to PNG files, all of the PNG files are only 3 Bytes. The AIFF file export creates a 200 Mbyte file.

    Keynote can play an audio recording BUT it has to be a single audio file. I might be a good public speaker but not good enough to get an hour long presentation to sound good in one take! :) There was no way to record an individual file for a single slide and then add them all to the slide deck.

    Keynote lets you add audio files to each slide BUT it does not automatically wait until the audio file completes playing and then move to the next slide.

    PowerPoint has the exact same problems.

    I couldn't bring myself to pay $600+ to Adobe for CS3 Flash editor. Instead I paid $70 for SWF n' Slide Pro to create a Flash (SWF) file. The resulting SWF file is only 15 Mbytes. SWF n' Slide Pro also automatically adds Previous/Next navigation buttons, which is really handy for such a big slide deck.

    Of course, SWF n' Slide Pro isn't without its own issues. For example, I can define the length of time for each slide deck but I can't have SWF n' Slide determine the length of the audio file and set the slide duration automatically. For 53 slides, that's a lot of work.

    I found that SWF n' Slide Pro files are XML files. It was pretty easy to write a Jython script that looks at the PNG files of the slide deck, matches them to the recorded audio files, and outputs an SWF n' Slide Pro file. Below is the Jython script.

    To see the final results:
    http://downloads.pushtotest.com/tm5/IntroToPushToTestRelease5.swf

    Thanks.

    -Frank

    --

    Code:
    '''
    Builds slide show with audio narration
    by creating a SWF n' Roll XML document
    SWF n' Roll is a Flash slide show creator
    utility from [url]http://www.verticalmoon.com[/url]
    
    This script is from Frank Cohen of PushToTest
    [url]http://www.pushtotest.com[/url]
    Use at your own risk.
    '''
    
    src_directory = "/Users/frankcohen/Frank/PushToTest/Salesbook/The Kit/The Kit 2007/TM 5 Sales Deck/gen-sns/"
    slide_directory = "slides"
    audio_directory = "MP3"
    dest_filename = "slides.sns"
    
    result = []
    
    import os
    from javax.sound.sampled import AudioSystem
    from java.io import File
    
    def copyfile( source ):
        ''' Copy the file contents to the result dictionary '''
    
        srcfile = open( source, 'r' )
    
        lines = srcfile.readlines()
        
        for line in lines:
            result.append( line.rstrip() )
    
    def audiolength( filename ):
        ''' Return the number of seconds of the length of the audio file '''
        
        file =  File( filename )
        audioInputStream = AudioSystem.getAudioInputStream( file )
        milliseconds = (long)((audioInputStream.getFrameLength() * 1000) / audioInputStream.getFormat().getFrameRate());
        return milliseconds + 2000
    
    print "generate-sns started"
            
    copyfile( src_directory + "files/header.txt" )
    
    for i in range( len( os.listdir( src_directory + "/" + slide_directory ) ) -1 ):
        j = i+1
        copyfile( src_directory + "files/slide-head.txt" )
        k = '%03d' % j
        result.append( src_directory + slide_directory + "/slide." + str( k ) + ".png" )
        copyfile( src_directory + "files/slide-duration.txt" )
        
        result.append( str( audiolength( src_directory +  audio_directory + "/slide" + str( j ) + ".aif" ) ) )
        
        copyfile( src_directory + "files/slide-middle.txt" )
        result.append( src_directory + audio_directory + "/slide" + str( j ) + ".aif" )
        copyfile( src_directory + "files/slide-tail.txt" )
    
    copyfile( src_directory + "files/tail.txt" )
    
    print "creating new destination file"
    
    output = open( src_directory + dest_filename, 'w+' ) 
    output.writelines( result )    
    output.close()
    
    print "done"
     

Share This Page