DQ NO.1 - dragon quest fans club

 找回密碼
 加入成為夥伴
搜索
熱搜: 活動 交友 discuz
查看: 3934|回復: 0

[ASP] classic asp 產生影片截圖 使用ffmpeg

[複製鏈接]
發表於 2015-5-1 14:47:06 | 顯示全部樓層 |閱讀模式
主旨:使用classic asp 透過ffmpeg.exe產生影片截圖

說明:本文可在Server端使用ffmpeg.exe 對Server上的影片產生截圖

測試平台:Windows 7 + IIS 7.5,使用classic asp

調用工具:ffmpeg.exe 本文使用64bit  Latest Zeranoe FFmpeg Build Version: git-02001ad (2015-05-01)

ffmpeg下載位置:http://ffmpeg.zeranoe.com/builds/

ffmpeg下載後,將壓縮包中的ffmpeg.exe擺放到指定位置 (本範例中為 "C:\Video\ ")

  1. executeFFmpeg=        "C:\Video\ffmpeg.exe"                        'ffmpeg.exe的位置
  2. VideoPath        =        "C:\Video\123.mp4"                                '影片位置
  3. VideoCoverPath  =        "C:\Video\Cover.jpg"                '要輸出截圖的位置及檔名

  4. '設定截圖command,本command設定 截取第20秒的畫面
  5. cmd =executeFFmpeg & " -i """ & VideoPath        &        """ -ss 00:00:20.000  -vframes 1 -q:v 1   """ & VideoCoverPath &        """"

  6. set wShell = server.createobject("Wscript.Shell")                '設定wShell 為 Wscript.Shell 物件
  7. wShell.run cmd                                '讓wShell 執行cmd截圖命令
複製代碼

您需要登錄後才可以回帖 登錄 | 加入成為夥伴

本版積分規則

Archiver|手機版|ぱふぱふ屋|DQ NO.1

GMT+8, 2024-4-25 06:06 , Processed in 0.024455 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回復 返回頂部 返回列表