Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#7575 closed defect (invalid)

Mythweb flashplayer (flowplayer) does not display correct aspect in fullscreen

Reported by: justin.johnson3@… Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: Plugin - MythWeb Version: 0.22
Severity: medium Keywords:
Cc: Ticket locked: no


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/ 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');
    $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;

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:

                    "<?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)

stream_flv.diff (1.1 KB) - added by justin.johnson3@… 11 years ago.
detail.php.diff (877 bytes) - added by justin.johnson3@… 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by anonymous

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!

Changed 11 years ago by justin.johnson3@…

Attachment: stream_flv.diff added

Changed 11 years ago by justin.johnson3@…

Attachment: detail.php.diff added

comment:2 Changed 11 years ago by justin.johnson3@…

This actually seems to be fixed in the latest version of ffmpeg

comment:3 Changed 11 years ago by robertm

Resolution: invalid
Status: newclosed

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 10 years ago by anonymous

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.

Note: See TracTickets for help on using tickets.