小编Suj*_*eet的帖子

为什么有些MP4视频在下载整个文件之前不会开始流式传输?

我正在开发一个应用程序,用户上传视频并使用jwplayer,jplayer,flowplayer等将其播放回浏览器.有些视频立即播放,而其他视频则等到整个视频文件下载完毕.

我正在使用ffmpeg将视频转换为mp4格式.

以下是我尝试的其中一个视频文件的一些详细信息.

General
Complete name                    : 429183132058337290450_AutoFF.mp4
Format                           : MPEG-4
Format profile                   : Base Media
Codec ID                         : isom
File size                        : 10.2 MiB
Duration                         : 24s 333ms
Overall bit rate                 : 3 501 Kbps

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 3 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 24s 333ms
Bit rate mode …
Run Code Online (Sandbox Code Playgroud)

php video encode ffmpeg

8
推荐指数
2
解决办法
8058
查看次数

如何在javascript中创建sqlite数据库?

如何在JavaScript中使用sqlite创建数据库?

sqlite

7
推荐指数
1
解决办法
1万
查看次数

如何将h2o模板引擎与codeigniter集成

我有问题在codeigniter中集成h2o php模板引擎.

任何建议都会非常值得赞赏.

php codeigniter

5
推荐指数
1
解决办法
726
查看次数

得到flv视频长度

虽然我试图得到一个flv视频文件的长度我得到0秒,因为它只发生在一些视频,否则我的功能工作正常.

下面是我的代码.

<?php
function mbmGetFLVDuration($file){
    // read file
  if (file_exists($file)){
    $handle = fopen($file, "r");
    $contents = fread($handle, filesize($file));
    fclose($handle);
    //
    if (strlen($contents) > 3){
      if (substr($contents,0,3) == "FLV"){
        $taglen = hexdec(bin2hex(substr($contents,strlen($contents)-3)));
        if (strlen($contents) > $taglen){
          $duration = hexdec(bin2hex(substr($contents,strlen($contents)-$taglen,3)))  ;
          return $duration;
        }
      }
    }
  }
}
// not working video file
$result = ceil(mbmGetFLVDuration('not_working_copy.flv')/1000);
// working video file
//$result = ceil(mbmGetFLVDuration('working_copy.flv')/1000);
echo date('H:i:s',mktime(0,0,$result))
?>
Run Code Online (Sandbox Code Playgroud)

我在下面的链接中附加了工作和不工作的flv视频:

工作视频:http: //blog.developeronhire.com/wp-content/uploads/downloads/2011/06/working_copy.flv

不工作的视频:http: //blog.developeronhire.com/wp-content/uploads/downloads/2011/06/not_working_copy.flv

任何想法将不胜感激.

谢谢

php video flv

5
推荐指数
1
解决办法
5556
查看次数

如何在Codeigniter中生成条形码图像?

如何使用CodeIgniter打印条形码图像?

我是否必须制作自定义库或帮助程序才能生成条形码图像?有没有人知道在CodeIgniter中生成条形码图像的任何库或助手?

php codeigniter barcode

3
推荐指数
1
解决办法
1万
查看次数

如何获取页面的所有锚标签并添加类?

如何获取页面的所有锚标记并将一个类添加到mailto(例如mailto:example@example.com),将另一个类添加到web链接(例如http://example.com)?

预期产量:

<a href="mailto:example@example.com" class="class1">
<a href="http://example.com" class="class2">
Run Code Online (Sandbox Code Playgroud)

javascript php anchor jquery

2
推荐指数
1
解决办法
2318
查看次数

标签 统计

php ×5

codeigniter ×2

video ×2

anchor ×1

barcode ×1

encode ×1

ffmpeg ×1

flv ×1

javascript ×1

jquery ×1

sqlite ×1