Changeset 26288 for gs3-extensions

Show
Ignore:
Timestamp:
05.10.2012 04:22:03 (7 years ago)
Author:
davidb
Message:

Plugin changed so it now also generates '.ogg' audio files (useful for Firefox playing audio with HTML5 <audio> element

Location:
gs3-extensions/audioDB/trunk/src/perllib/plugins
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gs3-extensions/audioDB/trunk/src/perllib/plugins/AudioDBPlugin.pm

    r26275 r26288  
    144144    # if filename ext not .wav convert (optionally cached) to wav 
    145145 
    146     my $wav_filename; 
    147146 
    148147    my ($input_ext) = ($filename_full_path =~ m/\.(.*?)$/); 
     
    150149 
    151150 
     151    my $wav_filename; 
    152152    if ($input_ext ne "wav") {   
    153153    $wav_filename = $self->convert_audio_format($filename_full_path,"wav"); 
     
    157157    } 
    158158    $doc_obj->associate_file($wav_filename, "doc.wav", "audio/wav", $top_section); 
     159 
     160    my $ogg_filename; 
     161    if ($input_ext ne "ogg") {   
     162    $ogg_filename = $self->convert_audio_format($filename_full_path,"ogg", "-acodec libvorbis"); 
     163    # $ogg_filename = $self->convert_audio_format($filename_full_path,"ogg", "-acodec libvorbis -ab 160000"); 
     164    } 
     165    else { 
     166    $ogg_filename = $filename_full_path; 
     167    } 
     168    $doc_obj->associate_file($ogg_filename, "doc.ogg", "audio/ogg", $top_section); 
     169 
    159170 
    160171    if ($self->{'enable_streaming'} ne "disabled") { 
  • gs3-extensions/audioDB/trunk/src/perllib/plugins/FFTExtractor.pm

    r26275 r26288  
    106106 
    107107    # Setup and run the ffmpeg command 
    108     my $ffmpeg_cmd = "ffmpeg -y $convert_options"; 
    109     $ffmpeg_cmd .= " -i \"$native_source_file_path\""; 
     108    my $ffmpeg_cmd = "ffmpeg -y"; 
     109    $ffmpeg_cmd .= " -i \"$native_source_file_path\" $convert_options"; 
    110110    $ffmpeg_cmd .= " \"$native_target_file_path\""; 
    111111