Opened 14 years ago
Closed 14 years ago
Last modified 14 years ago
#7575 closed defect (invalid)
Mythweb flashplayer (flowplayer) does not display correct aspect in fullscreen
Reported by: | Owned by: | Rob Smith | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | Plugin - MythWeb | Version: | 0.22 |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
When watching a recording in fullscreen, the video simply fills the available space, rather than displaying in the proper aspect ratio. I'm not sure how to make a patch since I've never submitted a ticket before, but the way to fix it is to change /mythweb/modules/stream/stream_flv.pl thusly:
# auto-detect height based on aspect ratio $sh = $dbh->prepare('SELECT data FROM recordedmarkup WHERE chanid=? AND starttime=FROM_UNIXTIME(?) AND data IS NOT NULL ORDER BY data DESC'); $sh->execute($chanid,$starttime); $x = $sh->fetchrow_array; $y = $sh->fetchrow_array if ($x); $width = round_even($width); if ($x && $y) { $height = round_even($width * ($y/$x)); $aspect = $x/$y; } else { $height = round_even($width * 3/4); $aspect = 4/3; } $sh->finish();
And later:
my $ffmpeg_command = $ffmpeg .' -y' .' -i '.shell_escape($filename) .' -s '.shell_escape("${width}x${height}") .' -g 30' .' -r 24' .' -f flv' .' -aspect '.shell_escape($aspect) .' -deinterlace' .' -ac 2' .' -ar 11025' .' -ab '.shell_escape("${abitrate}k") .' -b '.shell_escape("${vbitrate}k") .' /dev/stdout 2>/dev/null |';
The detail.php template also needs to change /mythweb/modules/tv/tmpl/default/detail.php:
flowplayer( "player", "<?php echo root_url ?>tv/flowplayer-3.1.5.swf", { playlist: [ // this first PNG clip works as a splash image { url: '<?php echo $program->thumb_url($flv_w,0) ?>', scaling: 'orig' }, // Then we have the video { url: "<?php echo video_url($program, 'flv'); ?>", duration: <?php echo $program->length ?>, autoPlay: false, // Would be nice to auto-buffer, but we don't want to // waste bandwidth and CPU on the remote machine. autoBuffering: false, scaling: 'fit' } ]} );
My apologies for the lack of an actual patch, but this is a pretty easy fix.
Attachments (2)
Change History (6)
comment:1 Changed 14 years ago by
Changed 14 years ago by
Attachment: | stream_flv.diff added |
---|
Changed 14 years ago by
Attachment: | detail.php.diff added |
---|
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing as a) reporter no longer experiencing issue, and b) flash player is not considered a supported feature (please re-read the red warning box when enabling the feature).
comment:4 Changed 14 years ago by
I don't know if this is related, however, flash playback with recent updates for mythbuntu 10.04 has flash playback not working anymore. In such that the aspect ratios are all incorrect. HD playback is dramatically squished from the sides and SD recordings are dramatically squished from the top and bottom making video un-viewable full screen or not. I attempted to implement the above code with no luck. This auto hight thing definitely needs to be polished.
To make a patch file:
If you modified the file where you checked out MythTV using SVN, type
SVN diff > some_file_name.diff
If you modified it elsewhere
diff -c old_file your_new_file > some_file_name.diff
the old_file must be what's currently in Trunk/Head? otherwise it won't apply correctly.
Good luck!