Opened 15 years ago
Closed 14 years ago
#6774 closed defect (fixed)
Perl Bindings do not Recognize H264
Reported by: | Owned by: | beirdo | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | Bindings - Perl | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
Perl bindings in Recordings.pm that gather file information do not currently recognize H264 files recorded off the HD-PVR, causing any program using them to receive uninitialized values.
Attachments (3)
Change History (16)
comment:1 Changed 15 years ago by
comment:3 Changed 15 years ago by
Yes. It displays the current height and width, but it changes the value of ID_DEMUXER from mpegts to lavf so that the section:
if ($info{'mpeg_stream_type'} && $info{'mpeg_stream_type'} !~ /mpeg/) {
die "Stream type '$info{'mpeg_stream_type'}' is not an mpeg, and will\n"
."not work with this program.\n";
}
No longer works. But putting in a check to confirm the stream type/demuxer as lavf should fix that.
comment:4 Changed 15 years ago by
Also, this...
($info{'video_type'}) = $data =~ m/VIDEO:\s*(MPEG[12])/m;
Expression doesn't account for VIDEO type H264 either.
Changed 15 years ago by
Patch to Allow Bindings to Recognize H264 and Correct Width Height Issues
comment:5 Changed 15 years ago by
I've submitted a patch above. I'm not fluent in perl, but the above modifications allow a fallback to the alternate DEMUXER for the height and width if the width = 0 and they modify the expression to allow VIDEO H264 or VIDEO: MPEG2, thus eliminating the problems and allowing programs, including Nuvexport(which was my goal), to stop throwing exceptions.
comment:6 Changed 15 years ago by
I made a mistake. The line should be:
if (!defined($info{'width'}))
As opposed to width==0. Of course, changing the expression would make it work again, but this seemed to be better.
comment:8 Changed 15 years ago by
Milestone: | 0.22 → unknown |
---|
comment:9 Changed 14 years ago by
I opened a new ticket that need to use '-demuxer lavf' but in my case it's for audio_sample_rate and audio_channels. Tickets: #7898
It would be nice to detect when to use '-demuxer'.
comment:10 Changed 14 years ago by
This is also pertinent to nuvexport which has the same heuristics in the detection code.
comment:11 Changed 14 years ago by
Actually, nuvexport uses the Perl Bindings. So, it is pertinent to nuvexport because nuvexport depends on the bindings
comment:12 Changed 14 years ago by
Owner: | changed from xris to beirdo |
---|---|
Status: | new → assigned |
comment:13 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The problem is attributable to the ID_VIDEO_WIDTH and ID_VIDEO_HEIGHT parameters. The Perl bindings uses mplayer to pull these parameters to determine the size of the file. They are set to zero on these files.