PSP transcode working

    I've been having troubles getting PSP transcoding working with Mythtv for use on my TOWER Software memorial PSP. All it needed was this diff:

      Index: export/ffmpeg.pm
      ===================================================================
      --- export/ffmpeg.pm    (revision 242)
      +++ export/ffmpeg.pm    (working copy)
      @@ -70,11 +70,11 @@
           # Audio only?
               $self->{'audioonly'} = $audioonly;
           # Gather the supported codecs
      -        my $data      = `$ffmpeg -formats 2>/dev/null`;
      +        my $data      = `$ffmpeg -formats 2>&1`;
               my ($formats) = $data =~ /(?:^|\n\s*)File\sformats:\s*\n(.+?\n)\s*\n/s;
               my ($codecs)  = $data =~ /(?:^|\n\s*)Codecs:\s*\n(.+?\n)\s*\n/s;
               if ($formats) {
      -            while ($formats =~ /^\s(..)\s(\S+)\s*$/mg) {
      +            while ($formats =~ /^\s(.{2})\s(\S+).*$/mg) {
                       $self->{'formats'}{$2} = $1;
                   }
               }
      @@ -286,7 +286,7 @@
               push @tmpfiles, "/tmp/fifodir_$$", "/tmp/fifodir_$$/audout", "/tmp/fifodir_$$/vidout";
       
           # Execute ffmpeg
      -        print "Starting ffmpeg.\n" unless ($DEBUG);
      +        print "Starting ffmpeg: $ffmpeg\n" unless ($DEBUG);
               ($ffmpeg_pid, $ffmpeg_h) = fork_command("$ffmpeg 2>&1");
               $children{$ffmpeg_pid} = 'ffmpeg' if ($ffmpeg_pid);
       
      Index: export/ffmpeg/PSP.pm
      ===================================================================
      --- export/ffmpeg/PSP.pm        (revision 242)
      +++ export/ffmpeg/PSP.pm        (working copy)
      @@ -170,7 +170,8 @@
               $self->{'ffmpeg_xtra'}  = ' -b ' . $self->{'v_bitrate'}
                                        .' -bufsize 65535'
                                        .' -ab 32 -acodec aac'
      -                                 ." -f psp -title $safe_title";
      +                                 ." -f psp -title $safe_title"
      +                                 .' -ar 24000';
           # Execute the parent method
               $self->SUPER::export($episode, '.MP4');
       
      Index: nuv_export/ui.pm
      ===================================================================
      --- nuv_export/ui.pm    (revision 242)
      +++ nuv_export/ui.pm    (working copy)
      @@ -380,6 +380,7 @@
                   $count++;
                   $query .= (' ' x (3 - length($count)))."$count. ".$exporter->{'name'};
                   $query .= ' (disabled)' unless ($exporter->{'enabled'});
      +            $query .= "\n\t\tErrors: @{$exporter->{'errors'}}\n" unless ($exporter->{'enabled'});
                   $query .= "\n";
               }
               $query .= "\n  q. Quit\n\nChoose a function: ";
      


    Nothing to it really. Oh, although the progress counter is still wrong, but I will work on that later. Now all I need to do is submit the diff...

    Tags for this post: blog toys psp mythtv transcode nuvexport
    Related posts: Updated nuvexport patch; Procrastination; Build your own cables; Transcoding using MythTV and the PSP; How to transcode video for the Nokia N800; UMD a failure?

posted at: 12:03 | path: /diary/toys | permanent link to this entry