试图将.mov转换为.mp4。在stackoverflow上尝试了各种建议代码,但似乎无济于事。
`...muxer does not support non seekable output [48] => Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument [49] => Error initializing output stream 0:0 -- [50] => Conversion failed! ) 1`
我尝试了各种编解码器属性,例如ac3,aac,libvo_aacenc
exec('
/usr/local/bin/ffmpeg -y -i https://***.***.com/assets/regions/region-1/input.mov' .
' -c:a ac3 '
. 'https://***.***.com/assets/regions/region-1/output.mp4'
. ' 2>&1', $out, $res);
$modx->log(modX::LOG_LEVEL_ERROR, print_r($out));
$modx->log(modX::LOG_LEVEL_ERROR, $res);
return true;
答案 0 :(得分:0)
这是我的自定义批次,可以通过保留文件创建日期将我的mov无损地转换为mp4:
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
for /d %%D in (*) do (
for %%B in ("%%D\*.mov") do (
echo %%B
if not exist "%%B.mp4" (
ECHO Last-Modified Date : %%~tB
ffmpeg -y -i "%%B" -vcodec copy -acodec copy "%%D\%%~nB.mp4"
powershell -Command "& { (Get-ChildItem %%D\%%~nB.mp4).LastWriteTime = (Get-ChildItem %%B).LastWriteTime ;}"
)
)
)