久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='STdiV'><tr id='STdiV'><dt id='STdiV'><q id='STdiV'><span id='STdiV'><b id='STdiV'><form id='STdiV'><ins id='STdiV'></ins><ul id='STdiV'></ul><sub id='STdiV'></sub></form><legend id='STdiV'></legend><bdo id='STdiV'><pre id='STdiV'><center id='STdiV'></center></pre></bdo></b><th id='STdiV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='STdiV'><tfoot id='STdiV'></tfoot><dl id='STdiV'><fieldset id='STdiV'></fieldset></dl></div>

      <tfoot id='STdiV'></tfoot>
      <legend id='STdiV'><style id='STdiV'><dir id='STdiV'><q id='STdiV'></q></dir></style></legend>

      <small id='STdiV'></small><noframes id='STdiV'>

      • <bdo id='STdiV'></bdo><ul id='STdiV'></ul>

      1. PHP 和 FFMPEG - 執行智能視頻轉換

        PHP and FFMPEG - Performing intelligent video conversion(PHP 和 FFMPEG - 執行智能視頻轉換)
        <legend id='DV8dk'><style id='DV8dk'><dir id='DV8dk'><q id='DV8dk'></q></dir></style></legend>

        <i id='DV8dk'><tr id='DV8dk'><dt id='DV8dk'><q id='DV8dk'><span id='DV8dk'><b id='DV8dk'><form id='DV8dk'><ins id='DV8dk'></ins><ul id='DV8dk'></ul><sub id='DV8dk'></sub></form><legend id='DV8dk'></legend><bdo id='DV8dk'><pre id='DV8dk'><center id='DV8dk'></center></pre></bdo></b><th id='DV8dk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DV8dk'><tfoot id='DV8dk'></tfoot><dl id='DV8dk'><fieldset id='DV8dk'></fieldset></dl></div>
          <bdo id='DV8dk'></bdo><ul id='DV8dk'></ul>

            <tfoot id='DV8dk'></tfoot>
                    <tbody id='DV8dk'></tbody>

                  <small id='DV8dk'></small><noframes id='DV8dk'>

                  本文介紹了PHP 和 FFMPEG - 執行智能視頻轉換的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一項異常艱巨的任務要執行.本以為很容易,結果一切努力都沒有結果.

                  I have an oddly difficult task to perform. I thought it would be easy, but all my efforts have been fruitless.

                  我正在將上傳到 php 腳本的各種格式(.avi、.mpg、.wmv、.mov 等)的視頻轉換為單一的 .flv 格式.轉換效果很好,但我遇到的問題是視頻的分辨率.

                  I'm converting videos uploaded to a php script from various formats (.avi, .mpg, .wmv, .mov, etc.) to a single .flv format. The conversion is working great but what I'm having trouble with is the resolution of the videos.

                  這是我當前正在運行的命令(使用 PHP 變量):

                  This is the command I'm currently running (with PHP vars):

                  ffmpeg -i $original -ab 96k -b 700k -ar 44100 -s 640x480 -acodec mp3 $converted

                  $original 和 $converted 都包含這些文件的完整路徑.我的問題是,即使源較小,它也總是會轉換為 640x480(就像我告訴它的那樣).顯然,這是在下載視頻時浪費磁盤空間和帶寬.此外,這不考慮輸入視頻的寬高比為 4:3 以外的任何情況,如果我上傳 16:9 視頻,則會導致壓縮"轉換.

                  Both $original and $converted contain the full paths to those files. My problem is that this always converts to 640x480 (like I'm telling it to) even when the source is smaller. Obviously, this is a waste of disk space and bandwidth when the video is downloaded. Also, this doesn't account for input videos being in any aspect ratio other than 4:3, resulting in a "squished" conversion if I upload a 16:9 video.

                  我需要做三件事:

                  1. 確定原始視頻的縱橫比.
                  2. 如果不是 4:3,用黑條填充頂部和底部.
                  3. 如果原件的尺寸較大或與原件的寬度/高度相關的寬高比為 4:3(以更接近 640x480 的為準),則轉換為 640x480.

                  我已經在一些視頻上運行了 ffmpeg -i,但我沒有看到一致的格式或位置來查找原始分辨率.一旦我能夠弄清楚這一點,我知道我可以做數學"來找出正確的尺寸并指定填充以使用 -padttop、-padbottom 等來固定縱橫比.

                  I've run ffmpeg -i on a few videos, but I don't see a consistent format or location to find the original's resolution from. Once I'm able to figure that out, I know I can "do the math" to figure out the right size and specify padding to fix the aspect ratio with -padttop, -padbottom, etc.

                  推薦答案

                  這對我有用:

                  $data = 'ffmpeg output';
                  $matches = array();
                  
                  if (!preg_match('/Stream #(?:[0-9.]+)(?:.*): Video: (?P<videocodec>.*) (?P<width>[0-9]*)x(?P<height>[0-9]*)/',$data,$matches)
                     preg_match('/Could not find codec parameters (Video: (?P<videocodec>.*) (?P<width>[0-9]*)x(?P<height>[0-9]*))/',$data,$matches)
                  

                  這可能不總是有效,但它在大多數情況下都有效,這對我來說已經足夠了:)

                  This might not always work, but it works most of the times, which was good enough in my case :)

                  這篇關于PHP 和 FFMPEG - 執行智能視頻轉換的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)
                • <tfoot id='Gj54D'></tfoot>

                  <legend id='Gj54D'><style id='Gj54D'><dir id='Gj54D'><q id='Gj54D'></q></dir></style></legend>

                    • <small id='Gj54D'></small><noframes id='Gj54D'>

                      <i id='Gj54D'><tr id='Gj54D'><dt id='Gj54D'><q id='Gj54D'><span id='Gj54D'><b id='Gj54D'><form id='Gj54D'><ins id='Gj54D'></ins><ul id='Gj54D'></ul><sub id='Gj54D'></sub></form><legend id='Gj54D'></legend><bdo id='Gj54D'><pre id='Gj54D'><center id='Gj54D'></center></pre></bdo></b><th id='Gj54D'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Gj54D'><tfoot id='Gj54D'></tfoot><dl id='Gj54D'><fieldset id='Gj54D'></fieldset></dl></div>
                        <tbody id='Gj54D'></tbody>

                          • <bdo id='Gj54D'></bdo><ul id='Gj54D'></ul>
                          • 主站蜘蛛池模板: 男女搞网站 | 日韩av在线免费 | 91免费观看国产 | www.夜夜骑.com | 日本不卡一区二区三区在线观看 | 国产激情视频在线 | 一区中文字幕 | 9191在线播放| 九九精品在线 | 国产在线精品一区二区 | 日本中文字幕在线观看 | 狠狠亚洲| 一级做受毛片免费大片 | 免费能直接在线观看黄的视频 | 久久久久久国产一区二区三区 | 久久99这里只有精品 | 欧美色a v| 日韩a | 天天干b| 亚洲天堂一区 | 精品久久久久一区二区国产 | 日韩精品一区二区在线 | 国产一区久久久 | 国产精品国产三级国产aⅴ中文 | 久久久.com| 91精品午夜窝窝看片 | 久久久91精品国产一区二区三区 | 久久99视频这里只有精品 | 91精品国产99久久 | av影音资源 | 999www视频免费观看 | 欧美xxxx性xxxxx高清 | 二区三区视频 | 99在线视频观看 | 国产一区中文 | 在线一区| 国产精品伦理一区二区三区 | 日本三级黄视频 | 国产网站在线免费观看 | 国产精品波多野结衣 | 国产探花在线精品一区二区 |