Jump to content

benlyboy

New Members
  • Posts

    2
  • Joined

  • Last visited

benlyboy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i guess a real question might be, how would i rewrite this section of the code so as to work with php7? foreach (split (':', getenv ('PATH').':/usr/local/bin:/usr/bin') as $path) { if (file_exists ($path."/ffmpeg")) { $ffmpeg = $path."/ffmpeg"; break;
  2. Hi there... First up let me say, I know nothing about coding in php. done a little with python and java script in the past. But i have a problem the need someone that knows what they are dong to fix. So i figure why not ask for help here. I’m a big fan if mythtv and have used it for almost ten years along with mythweb, but one of the feature I liked a embedded player, that let you watch your recordings while away from home had stopped working. because. I like this feature I went looking for the problem and found a couple of things. First the code is looking for a file named ffmpeg that I believe is called actually called mythffmpeg. (easy fix) The second thing is that after doing some research I have found that the Split() statement/command was removed from php 7.0.0 so I think this whole file would need to be rewritten.( very not easy) Posted this in the hope that someone might like to show me how to update this file to work on php 7 even after fixing this file it may not work as there may be other problems in other files but hay its worth a go... thanks <form class="form" method="post" action="<?php echo form_action ?>"> <div class="x-notice" style="width: 45em; text-align: left"> <?php echo t('info: flvplayer') ?> </div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <th><?php echo t('Enable Video Playback') ?>:</th> <td><input class="radio" type="checkbox" name="flvplayer" title="<?php echo t('Enable Flash Video player for recordings.') ?>" <?php $ffmpeg = ''; foreach (split (':', getenv ('PATH').':/usr/local/bin:/usr/bin') as $path) { if (file_exists ($path."/ffmpeg")) { $ffmpeg = $path."/ffmpeg"; break; } elseif (php_uname ('s') == 'Darwin' && file_exists ($path."/ffmpeg.app")) { $ffmpeg = $path."/ffmpeg".app; break; } } $ffmpeg_output = shell_exec ("$ffmpeg -formats 2>&1"); $has_mp3_support = preg_match('/E\s+mp3/', $ffmpeg_output); if (!$has_mp3_support) echo ' DISABLED'; if (setting('WebFLV_on')) echo ' CHECKED'; echo '>'; if (!$has_mp3_support) echo ' '.t('ffmpeg with MP3 support not detected'); ?></td> </tr><tr> <th valign="top"><?php echo t('Width') ?>:</th> <td><input type="text" name="width" size="5" title="<?php echo t('FLV Width') ?>" value="<?php echo intVal(_or(setting('WebFLV_w'), 320)) ?>" /> <br> <?php echo t('(height is calculated automatically from the recording aspect ratio)') ?> </td> </tr><tr> <th><?php echo t('Video Bitrate') ?>:</th> <td><input type="text" name="vbitrate" size="5" title="<?php echo t('Video Bitrate') ?>" value="<?php echo html_entities(_or(setting('WebFLV_vb'), 256)) ?>" /> kbps</td> </tr><tr> <th><?php echo t('Audio Bitrate') ?>:</th> <td><input type="text" name="abitrate" size="5" title="<?php echo t('Audio Bitrate') ?>" value="<?php echo html_entities(_or(setting('WebFLV_ab'), 64)) ?>" /> kbps</td> </tr><tr> <td align="right"><input type="reset" class="submit" value="<?php echo t('Reset') ?>"></td> <td align="center"><input type="submit" class="submit" name="save" value="<?php echo t('Save') ?>"></td> </tr> </table> </form>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.