| 1 | | Quick patch of changes I made to Nuvexport's ffmpeg.pm to allow it to understand the new codecs/formats layout of ffmpeg-0.6 : |
| 2 | | |
| 3 | | |
| 4 | | --- /usr/share/nuvexport/export/ffmpeg.pm.orig 2010-01-20 04:09:23.000000000 +0800 |
| 5 | | +++ /usr/share/nuvexport/export/ffmpeg.pm 2010-11-11 17:50:59.475620429 +0800 |
| 6 | | @@ -75,6 +75,9 @@ |
| 7 | | if ($data =~ m/ffmpeg\sversion\s0.5[\-,]/si) { |
| 8 | | $self->{'ffmpeg_vers'} = '0.5'; |
| 9 | | } |
| 10 | | + elsif ($data =~ m/ffmpeg\sversion\s0.6[\-,]/si) { |
| 11 | | + $self->{'ffmpeg_vers'} = '0.6'; |
| 12 | | + } |
| 13 | | elsif ($data =~ m/ffmpeg\sversion\sSVN-r(\d+),/si) { |
| 14 | | $self->{'ffmpeg_vers'} = $1; |
| 15 | | } |
| 16 | | @@ -102,7 +105,11 @@ |
| 17 | | # Audio only? |
| 18 | | $self->{'audioonly'} = $audioonly; |
| 19 | | # Gather the supported codecs |
| 20 | | - $data = `$ffmpeg -formats 2>&1`; |
| 21 | | + if ($self->{'ffmpeg_vers'} > 0.5) { |
| 22 | | + $data = `( $ffmpeg -formats ; $ffmpeg -codecs) 2>&1`; |
| 23 | | + } else { |
| 24 | | + $data = `$ffmpeg -formats 2>&1`; |
| 25 | | + } |
| 26 | | my ($formats) = $data =~ /(?:^|\n\s*)File\sformats:\s*\n(.+?\n)\s*\n/s; |
| 27 | | my ($codecs) = $data =~ /(?:^|\n\s*)Codecs:\s*\n(.+?\n)\s*\n/s; |
| 28 | | if ($formats) { |
| | 1 | Quick patch of changes I made to Nuvexport's ffmpeg.pm to allow it to understand the new codecs/formats layout of ffmpeg-0.6. |