Opened 10 years ago

Closed 10 years ago

#7670 closed defect (duplicate)

nuvexport fails with h264 mpegts files due to Recording.pm failure

Reported by: daveh@… Owned by: Rob Smith
Priority: major Milestone: 0.22
Component: Bindings - Perl Version: unknown
Severity: medium Keywords: Recording.pm mpegts h264 nuvexport
Cc: Ticket locked: no

Description

Recording.pm uses mplayer identify functionality to find ID_VIDEO_WIDTH and ID_VIDEO_HEIGHT. Unfortunately these are set to zero for mpegts and so width and height is left unidentified.

I have temporarily fixed with the following patch but not sure how reliable this will be for all files and mplayer versions:

--- orig/Recording.pm	2009-10-14 19:01:22.000000000 -0400
+++ Recording.pm	2009-11-27 18:19:15.000000000 -0500
@@ -310,8 +310,8 @@
         my $data = `$program -v -v -v -v -nolirc -nojoystick -vo null -ao null -frames 1 -identify '$file' 2>/dev/null`;
         study $data;
         ($info{'video_type'})            = $data =~ m/^VIDEO:\s*(MPEG[12])/m;
-        ($info{'width'})                 = $data =~ m/^ID_VIDEO_WIDTH=0*([1-9]\d*)/m;
-        ($info{'height'})                = $data =~ m/^ID_VIDEO_HEIGHT=0*([1-9]\d*)/m;
+        ($info{'width'})                 = $data =~ m/^VO: \[null\] ([1-9]\d*)x/m;
+        ($info{'height'})                = $data =~ m/^VO: \[null\] [1-9]\d*x([1-9]\d*)/m;
         ($info{'fps'})                   = $data =~ m/^ID_VIDEO_FPS=0*([1-9]\d*(?:\.\d+)?)/m;
         ($info{'audio_sample_rate'})     = $data =~ m/^ID_AUDIO_RATE=0*([1-9]\d*)/m;
         ($info{'audio_bitrate'})         = $data =~ m/^ID_AUDIO_BITRATE=0*([1-9]\d*)/m;

Change History (2)

comment:1 Changed 10 years ago by sphery

dup of #6774

comment:2 Changed 10 years ago by sphery

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.