thảo luận Tổng hợp, thảo luận về ffmpeg

  • Người tạo chủ đề Người tạo chủ đề eipi10
  • Ngày bắt đầu Ngày bắt đầu
Máy cùi nhưng cắm 24/24 chắc không sao:adore:
Resize xuống thì xài mấy cái GUI như HandBreak, StaxRip... cho dễ thím à, phần encode chứ chọn x264 profile slow hoặc medium gì là được, 480p Encode cũng không nặng lắm đâu. Khỏi cần phải ffmpeg chi cho khổ.
 
Resize xuống thì xài mấy cái GUI như HandBreak, StaxRip... cho dễ thím à, phần encode chứ chọn x264 profile slow hoặc medium gì là được, 480p Encode cũng không nặng lắm đâu. Khỏi cần phải ffmpeg chi cho khổ.
chủ yếu mình làm 1 loạt mấy chục cái video nên nghĩ sài bằng dòng lệnh nhanh hơn
 
Thím nào giúp với, máy dùng chip intel nhưng ko dùng được gpu quicksync trong khi OBS vẫn xài được gpu bình thường

C:\Users\Admin\Desktop>ffmpeg -i superidol.mov -c:v h264_qsv out.mp4
ffmpeg version 5.0-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg de
velopers
built with gcc 11.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32thr
eads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --e
nable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --ena
ble-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enab
le-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d
--enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable
-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-m
ediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-lib
fribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --ena
ble-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --
enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulka
n --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-
libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --
enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc -
-enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --en
able-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libfl
ite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromapr
int
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'superidol.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2022-03-10T12:22:10.000000Z
com.apple.quicktime.author: ReplayKitRecording
Duration: 00:00:20.24, start: 0.000000, bitrate: 5410 kb/s
Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709/bt709/iec61966-2-1), 888x1826, 5402 kb/s, SAR 1826:1827 DAR 296:609, 37.21 f
ps, 120 tbr, 600 tbn (default)
Metadata:
creation_time : 2022-03-10T12:22:10.000000Z
handler_name : Core Media Video
vendor_id : [0][0][0][0]
encoder : HEVC
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,fltp, 2 kb/s (default)
Metadata:
creation_time : 2022-03-10T12:22:10.000000Z
handler_name : Core Media Audio
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_qsv))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[swscaler @ 00000000056f3840] [swscaler @ 0000000005700800] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000000056f3840] [swscaler @ 0000000005738580] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000000056f3840] [swscaler @ 000000000577f040] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000000056f3840] [swscaler @ 00000000057aebc0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000000056f3840] [swscaler @ 00000000057ff500] deprecated pixel format used, make sure you did set range correctly
[h264_qsv @ 0000000002331640] Error querying encoder params: unsupported (-3)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 00000000003d5b80] Qavg: 65536.000
[aac @ 00000000003d5b80] 2 frames left in the queue on closing
Conversion failed!
 
Em toàn dùng cái này convert mỗi audio với video, cái này có gì đặc biệt so với mấy app hả các thím
 
thim thử thêm dòng này vào xem

-init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p
vẫn ko được nhỉ
Incompatible pixel format 'yuv420p' for codec 'h264_qsv', auto-selecting format
'nv12'
[swscaler @ 0000000007e34ec0] [swscaler @ 0000000007e41f80] deprecated pixel for
mat used, make sure you did set range correctly
[swscaler @ 0000000007e34ec0] [swscaler @ 0000000007e78fc0] deprecated pixel for
mat used, make sure you did set range correctly
[swscaler @ 0000000007e34ec0] [swscaler @ 0000000007ebf340] deprecated pixel for
mat used, make sure you did set range correctly
[swscaler @ 0000000007e34ec0] [swscaler @ 0000000007eee200] deprecated pixel for
mat used, make sure you did set range correctly
[swscaler @ 0000000007e34ec0] [swscaler @ 0000000007f3bbc0] deprecated pixel for
mat used, make sure you did set range correctly
[h264_qsv @ 0000000004cbf600] Error querying encoder params: unsupported (-3)
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
 
Thím thử thế này xem, trước tiên là phải biết fps video của thím là bao nhiêu đã, mình ví dụ 29.97
Bash:
ffmpeg -i input.mp4 -r 1.5*29.97 -filter:v "setpts=1/1.5*PTS" -filter:a "atempo=1.5" output.mp4
B cho m hỏi với, m muốn encode x265 10 bit mà vừa muốn giảm dung lượng nhưng ko giảm chất lượng có đc ko

via theNEXTvoz for iPhone
 
B cho m hỏi với, m muốn encode x265 10 bit mà vừa muốn giảm dung lượng nhưng ko giảm chất lượng có đc ko

via theNEXTvoz for iPhone
"ko giảm chất lượng" thì nghe khá mơ hồ, mình cũng ko biết trả lời thế nào, thím phải test thử thì mới biết. Về lý thuyết thì ffmpeg bảo CRF mặc định (28) tương đương với CRF 23 bên x264. Thím ước lượng video gốc của thím tầm CRF bao nhiêu bên x264 rồi ước lượng ngược lại bên x265.

https://trac.ffmpeg.org/wiki/Encode/H.265

Còn các thông số khác như preset và tune thì thím cứ tìm hiểu trong link đó
 
Thím thử thế này xem, trước tiên là phải biết fps video của thím là bao nhiêu đã, mình ví dụ 29.97
Bash:
ffmpeg -i input.mp4 -r 1.5*29.97 -filter:v "setpts=1/1.5*PTS" -filter:a "atempo=1.5" output.mp4
ngon lành, đa tạ thím nhìu
Mà chậm lại thì chỉ cần sửa 0.xx là được đúng không thím
j5yXsXc.gif
 

Thống kê chủ đề

Ngày tạo
eipi10,
Người trả lời cuối
htizumin2s,
Trả lời
759
Lượt xem
63.818
Quay lại
Lên đầu trang