如何使用FFMPEG提取无损图像序列并将其通过管道传输到mozjpeg的cjpeg?

我知道可以用imagemagick降低它,但是mozjpeg产生的图像要小得多。

我希望视频的所有帧都可以通过mozjpeg提取并转换为JPEG。

我尝试过的事情:

$ ind = 1
$ ffmpeg -hide_banner -ss 00:00:10 -i IN.webm -t 00:00:02 -r 24 -c:v bmp -f image2pipe pipe:1 | \
    cjpeg - workDir/$((ind++)).jpeg

错误消息:

av_interleaved_write_frame(): Broken pipe time=00:00:00.00 bitrate=N/A speed=   0x    

Error writing trailer of pipe:1: Broken pipe

frame=    1 fps=0.0 q=-0.0 Lsize=    6075kB time=00:00:00.04 bitrate=1194394.4kbits/s speed=0.0765x    

video:6075kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

Conversion failed!

keith1985 回答:如何使用FFMPEG提取无损图像序列并将其通过管道传输到mozjpeg的cjpeg?

cjpeg接受stdin管道输入,但一次似乎不接受多个输入。

输出图像,然后与ffmpeg -ss 00:00:10 -i IN.webm -t 00:00:02 %04d.bmp for f in *.bmp; do cjpeg -quality 75 -outfile "workDir/${f%.bmp}.jpg" "$f"; done 循环:

-r 24

不需要-r:如果强制使用与输入不匹配的任意帧速率,则使用该选项可能会导致丢帧或重复帧。省略ffmpeg var today = new Date(); var curr_date = today.getDate(); var curr_month = today.getMonth() + 1; var curr_year = today.getFullYear(); var todayMan = curr_month + '/' + curr_date + '/' curr_year class Bsall extends React.Component { constructor(props) { super(props) this.state = { items: [],columnDefs: [ {headerName: "Supplier Status",field: "supplier_status",sortable: true,filter: true},{headerName: "Survey Exp",field: "survey_exp",filter: true,cellStyle: params => { if (params.value < todayMan + 5) { return {'background-color': 'red'}} }},将输出所有帧。

本文链接:https://www.f2er.com/3145055.html

大家都在问