如何在wordpress上传并播放视频

      • 视频来源 :  yy直播间录像
      • 第一次上传, 失败,播放时只有声音没图像
      • Google后发现 :

        此答案来自 : https://stackoverflow.com/questions/21586128/html5-video-of-type-video-mp4-playing-audio-only
      • 既然声音可以播,那就只能是vedio格式的问题, 用KMplayer 播放原视频,  in “media information ” , 可以看到

     

视频格式是 h.263

          •  尝试下载 Pavtube video converter 解决, 但是, 发现转换后的文件从20M变为100M+
          • 最后,用格式工厂, 选择菜单 “To MP4” , 输出配置选 h.264 , 问题解决。
          • 总结:   a) 录像原始格式是h.263 是yy公司故意的,不想让人很容易的分享视频到网页

        b) 柚又真漂亮

Different between functions.php and plugin

A WordPress Plugin:

  • Executes only when individually activated via the Plugins panel.
  • Applies to all themes.
  • Requires specific unique Header text.
  • Is stored in wp-content/plugins, usually in a subdirectory.

A functions file:

  • Executes only when in the currently activated theme’s directory.
  • Applies only to that theme. If the Theme is changed, the functionality is unused.
  • Requires no unique Header text.
  • Is stored with each Theme in the Theme’s subdirectory in wp-content/themes.

 

From : https://codex.wordpress.org/Functions_File_Explained

how to change linux pid_max on centos

check current pid_max :

 

what is this value ‘s range :    This value can also be written using the same file, however the value can only be extended up to a theoretical maximum of 32768 for 32 bit systems or 4194304 for 64 bit:

 

how to write into :   (because my linux is 64 bits , check it by :  uname -a)

 

but , if only change this file ,  value will restored after reboot !

 

so , still need change this file /etc/sysctl.conf   and add this line :

 

then , the value will persistant change even after reboot .

 

reference :  https://unix.stackexchange.com/questions/394774/do-i-need-to-reboot-linux-server-after-changing-pid-max

how to enable highlight PHP code in centos 6 i686 OS and nano version 2.0.9

  • create file  by

  • paste these code to php.nanorc

the code come from  :

https://github.com/scopatz/nanorc/blob/master/php.nanorc

  •  then :

add this line :