BtbN changed the topic of #ffmpeg to: Welcome to the FFmpeg USER support channel | Development channel: #ffmpeg-devel | Bug reports: https://ffmpeg.org/bugreports.html | Wiki: https://trac.ffmpeg.org/ | This channel is publically logged | FFmpeg 7.0 is released
ttys000 has quit [Remote host closed the connection]
ttys000 has joined #ffmpeg
Haxxa has quit [Quit: Haxxa flies away.]
Muimi has joined #ffmpeg
Haxxa has joined #ffmpeg
Haxxa has quit [Remote host closed the connection]
Haxxa has joined #ffmpeg
lexano has quit [Ping timeout: 268 seconds]
HarshK23 has quit [Quit: Connection closed for inactivity]
whatsupdoc has joined #ffmpeg
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
talismanick has joined #ffmpeg
e^pi-1 has quit [Quit: WeeChat 4.2.2]
e^pi-1 has joined #ffmpeg
Muimi has joined #ffmpeg
hightower3 has joined #ffmpeg
hightower2 has quit [Ping timeout: 268 seconds]
NotFaely is now known as Faely
Icedream has quit [Quit: A lol made me boom.]
waleee has quit [Quit: WeeChat 4.1.2]
Icedream has joined #ffmpeg
w1r3d has joined #ffmpeg
noobaroo has quit [Quit: Konversation terminated!]
w1r3d has quit [Remote host closed the connection]
w1r3d has joined #ffmpeg
w1r3d has quit [Remote host closed the connection]
AbleBacon has quit [Read error: Connection reset by peer]
YuGiOhJCJ has joined #ffmpeg
lullerhaus has quit []
Kei_N has quit [Read error: Connection reset by peer]
lullerhaus has joined #ffmpeg
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
jagannatharjun has joined #ffmpeg
vvvv has quit [Read error: Connection reset by peer]
vvvv5 has joined #ffmpeg
vvvv5 has quit [Ping timeout: 245 seconds]
vvvv has joined #ffmpeg
Tano has quit [Quit: WeeChat 4.2.1]
TheSilentLink has quit [Ping timeout: 268 seconds]
TheSilentLink has joined #ffmpeg
TheSilentLink has quit [Ping timeout: 272 seconds]
ulfvonbelow has joined #ffmpeg
TheSilentLink has joined #ffmpeg
<ulfvonbelow>
I'm trying to use -f concat with inpoint and outpoint to split a file into many relatively-small chunks (ranging from around 1 to 30 seconds) and produce a permuted output file containing all those chunks, but I get a lot of warnings about "Non-monotonic DTS in output stream", and then the audio becomes out of sync with the video, but not consistently - it gets worse the more rapidly chunk transitions are passed through, and improves
<ulfvonbelow>
the longer a chunk lasts. I tried following some of the answers at https://stackoverflow.com/questions/31691943/ffmpeg-concat-produces-dts-out-of-order-errors and converting to .ts first, which seems to have resolved the desyncing, but now I get heavy artifacting on every transition. I've tried forcing key frames at all the outpoint timestamps, but it doesn't seem to change anything. Any idea what I can do to get smooth transitions
BSaboia has quit [Remote host closed the connection]
BSaboia has joined #ffmpeg
ivanich has joined #ffmpeg
ivanich has quit [Remote host closed the connection]
blb has quit [Ping timeout: 268 seconds]
blb has joined #ffmpeg
Livio has joined #ffmpeg
talismanick has quit [Ping timeout: 245 seconds]
Tano_ has joined #ffmpeg
NGC3982 has joined #ffmpeg
Tinos has joined #ffmpeg
<NGC3982>
can ffmpeg conversion be offloaded to gpu with any use? is that a thing?
<CounterPillow>
GPUs usually come with fixed-function silicon for video decode and encode, yes. The encoders they use will differ from software encoders in quality. Additionally, certain ffmpeg filters can be offloaded to the programmable GPU silicon as well.
rv1sr has quit []
<NGC3982>
i see
<NGC3982>
im doing a lot of large scale conversions from bluray and most importantly VHS tapes and it would be neat not to stress the cpu on this server, if i can just add a gpu and let it work with ffmpeg stuff
kasper93 has quit [Remote host closed the connection]
kasper93 has joined #ffmpeg
vlm has quit [Read error: Connection reset by peer]
HarshK23 has joined #ffmpeg
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Max SendQ exceeded]
billchenchina has joined #ffmpeg
billchenchina has quit [Client Quit]
noobaroo has joined #ffmpeg
Livio has joined #ffmpeg
Ox7C5__ has joined #ffmpeg
vlm has joined #ffmpeg
rv1sr has quit []
microchip_ has quit [Ping timeout: 268 seconds]
rsx has quit [Remote host closed the connection]
coldfeet has quit [Remote host closed the connection]
makidoll has left #ffmpeg [Disconnected: Received SIGTERM]
makidoll has joined #ffmpeg
makidoll has left #ffmpeg [#ffmpeg]
makidoll has joined #ffmpeg
makidoll has left #ffmpeg [#ffmpeg]
makidoll has joined #ffmpeg
makidoll has left #ffmpeg [#ffmpeg]
makidoll has joined #ffmpeg
ong has joined #ffmpeg
makidoll has left #ffmpeg [Disconnected: Received SIGTERM]
makidoll has joined #ffmpeg
Mavrik has joined #ffmpeg
makidoll has left #ffmpeg [#ffmpeg]
makidoll has joined #ffmpeg
makidoll has left #ffmpeg [Disconnected: Received SIGTERM]
makidoll has joined #ffmpeg
Livio has quit [Ping timeout: 256 seconds]
makidoll has left #ffmpeg [#ffmpeg]
makidoll has joined #ffmpeg
rv1sr has joined #ffmpeg
nillyhan has quit [Ping timeout: 268 seconds]
nillyhan has joined #ffmpeg
rv1sr has quit []
Mmike has joined #ffmpeg
yans has joined #ffmpeg
TheSashmo has joined #ffmpeg
<Mmike>
Hi, all. I am doing some testing (and finnaly trying to wrap my head around ffmpeg options and parameters for various encoders and so on) and it seems my i7-1185G7 (in Thinkpad X13) is faster to encode DJI Mini2 video than my Nvidia GTX1060.
<Mmike>
Intel takes around 7 seconds where nvidia takes around 11 seconds. Also, with nvidia, gpu usage is only around 11-12%
<Mmike>
I've shared the ffmpeg commands on pastebin, would appreciate if someone more skilled/knowledgable would take a peek and see if I'm doing something obviously wrong: https://pastebin.com/Ce6RY4bk
<another|>
I mean, encoding ac3 in 2024 seems kinda wrong
<another|>
I also don't think you need hwupload in this case
microchip_ has joined #ffmpeg
Livio has joined #ffmpeg
<Mmike>
another|, yea, ac3 is... well, irellevant because source video clip contains no audio :)
<another|>
I don't think I've seen a `-resize` input option before. Where is that coming from?
<Mmike>
For instance, this one works: ffmpeg -hide_banner -y -stats -v error -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i DJI_0004.MP4 -vf scale_cuda=640:-2,hwupload -vcodec h264_nvenc -vb 30000k -rc cbr -acodec aac -ab 192k -sn -dn -map 0 -ignore_unknown output-NVENC-h264-scale_cuda.mp4
<Mmike>
Why this one says 'no suitable output for -vf': ffmpeg -hide_banner -y -stats -v error -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i DJI_0004.MP4 –vf scale_cuda=640:-2,hwupload -c:v h264_nvenc -b:v 5M output_720.mp4
<Mmike>
they're basically the same
<Mmike>
but, ignore that, it's probobaly my not able to read.
<Mmike>
I am wondering why is nvenc slower than vaapi thingine? I can't fathom that Intel Iris XE would be faster than Nvidia 1060
<Mmike>
also, is it normal that nvenc is using so little of GPU power?
<another|>
encoding does not happen on the GPU chip but on dedicated silicon on the card
<Mmike>
another|, what does that mean? that GPU can't be fed with data to encode fast enough?
<Mmike>
(you're talking about nvidia, right?)
<another|>
as for speed: Intel and Nvidia have completely separate codec implementations. why do you expect them to be similar
<another|>
also: nvenc has a bunch of different speed presets
emmanuelux has joined #ffmpeg
<Mmike>
another|, I don't, I just figured, as nvidia is way 'stronger' card (I'm, ofc, basing that on gaming, and am probably wrong), so it should outperform my intel
<another|>
graphics performance is irrelevant
<another|>
video de- and encoding happens on a separate ASIC
<Mmike>
another|, so, when I use cuda thingies with ffmpeg, it's not hitting the GPU at all?
<furq>
scale_cuda runs on the gpu
<furq>
the actual video encoding doesn't
<another|>
cuda or shaders do run on the GPU
<Mmike>
I mean, if I run this: ffmpeg -hide_banner -y -v error -stats -vsync 0 -c:v h264_cuvid -i DJI_0004.MP4 -vf "hwupload_cuda,scale_cuda=640:" -c:v h264_nvenc output.264 <- here my GPU is at 100%, but encoding takes more than the video itself
<another|>
I don't think you need hwupload. It might introduce needless memory copying
<Mmike>
beh, if I remove hwupload_cuda, ffmpeg dies with: Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
<BtbN>
well, in this commandline you do, since the deprecated cuvid decoders output to system RAM by default
<BtbN>
but yeah, it does introduce a pointless roundtrip
<another|>
BtbN: ah. I never know what's up with all the nvidia interfaces like cuvid,nv* since I don't have any NV HW
<BtbN>
the old cuvid decoders use nvidias parser
<BtbN>
they kinda just exist as a cross-check if we or nvidia messed something up at this point, and should basically never be used
<Mmike>
BtbN, would you know what would be the best way to scale down a video? This is the fastest way I got: ffmpeg -hide_banner -y -stats -v error -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i DJI_0004.MP4 -vf scale_cuda=640:-2,hwupload -vcodec h264_nvenc -acodec aac -ab 192k -sn -dn -map 0 -ignore_unknown output-NVENC-h264-scale_cuda.mp4
<BtbN>
Why are you hwuploading a frame that's already a hw frame?
<Mmike>
but I don't really fully understand the options I'm bashing there :/
<BtbN>
also -a/vcodec are long deprecated use -c(odec):a/v
<Mmike>
because when I remove hwupload I get.... hm, I get same results :)
<BtbN>
You also very likely will want to give the video encoder _some_ kind of options for quality, cause the defaults are not great
<BtbN>
Otherwise, that looks about how you do it
Traneptora has joined #ffmpeg
<Mmike>
BtbN, when you say 'encoder options', those go under -vf ?
<BtbN>
no
<BtbN>
stuff like the video bitrate/quality, or other options to nvenc
<another|>
<BtbN> also -a/vcodec are long deprecated use -c(odec):a/v
<another|>
are they actually though? I think it is nowhere mentioned in the docs
<BtbN>
They likely won't ever be removed, since it costs nothing to carry them
<BtbN>
but they do explicitly not support stream selection or anything, and are just legacy remnants
<Mmike>
I read somewhere about -vcodec/-acodec being deprecated, but I never bothered to change it. Did so now.
<another|>
yeah, stream specifiers is an obvious drawback
<Mmike>
BtbN, so, adding parameters to video encoder has nothing to do with video filters, and I add those directly as ffmpeg options? (I'm so new at all of this)
<another|>
see `ffmpeg -h encoder=h264_nvenc` for private options
<BtbN>
If you just want "okay quality", try -preset slow -cq 20
<BtbN>
and then adjust preset and quality to your needs
<Mmike>
another|, aaa, thnx!
<Mmike>
I don't care much about quality, the use case is for kdenlive's proxy clip encodings - I have a large 4k h264 video from DJI drone or a camcoder and I want to scale it down to 640 pixels in width so that I don't get laggy response in kdenlive. When doing final render I won't use such presets.
<BtbN>
If you want to just trash the quality and go fast, do -cq 50 -preset fast
<BtbN>
but it will be _bad_
<BtbN>
you will definitely want to find a sane middle ground
microchip_ has quit [Quit: There is no spoon!]
<Mmike>
wow, it definitely is bad :D
<Mmike>
but there is no difference in transcoding speed with that -preset
<Mmike>
i should probably play with other, larger videos
<BtbN>
If there is no difference, your speed limit is elsewhere
<Mmike>
BtbN, another| thnx so much for the inputs, I'll poke some more now
<BtbN>
nvenc at that preset and res should be capable of way over 1000 fps
<BtbN>
if that is 4K footage or something, the scaling is probably the bottleneck
<Mmike>
BtbN, I set up nvtop to display not just cpu utilization, but enc/dec utilization too and dec utilization is at 100%
<BtbN>
yeah, then it's the decoder
microchip_ has joined #ffmpeg
<Mmike>
so, can I speed that up? Or I just have a card that has decoder that can't do better?
<BtbN>
all cards of a gen have the same video unix
<BtbN>
*unit
<BtbN>
You never mentioned what kind of speeds you are even getting?
<Mmike>
this is 1060 GTX, I assume 20something would perform better?
<Mmike>
it starts at ~4.5 and goes up to 5.12, settles at 5.09 at the end
<BtbN>
the multiplier is meaningless, 153 fps is super decent for 4K
<Mmike>
Oh, fps! sorry :) Ack, thnx...
<Mmike>
BtbN, so, intel i7 11th gen with Iris Xe whatnot which is a bit faster, that's completely in line with expectations?
lusciouslover has quit [Ping timeout: 256 seconds]
<BtbN>
154 fps for transcoding 4K is a good result imo
<Mmike>
that is, I am wrong in thinking that becasue my nvidia in desktop scores better than Intel in Unigine benchmarks that it'd encode/decode faster too ?
<BtbN>
Like you were already told, the GPU is not involved
<Mmike>
yup
<Mmike>
learned few things, thnx a bunch folks!
<Mmike>
So, I run this: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i DJI_0004.MP4 -f null - -benchmark <- I wanted to test how fast I can just decode a video, and 150fps is the ceiling I hit
<Mmike>
`
<Mmike>
~150 that is
<BtbN>
not too unusual for 4K
<Mmike>
ack
lusciouslover has joined #ffmpeg
lusciouslover has quit [Ping timeout: 245 seconds]
Haxxa has quit [Quit: Haxxa flies away.]
Haxxa has joined #ffmpeg
lucasta has quit [Quit: Leaving]
yans has quit [Ping timeout: 245 seconds]
waleee has joined #ffmpeg
manwithluck has quit [Read error: Connection reset by peer]
manwithluck has joined #ffmpeg
Livio has quit [Ping timeout: 255 seconds]
Dotz0cat has quit [Ping timeout: 256 seconds]
lavaball has quit [Remote host closed the connection]
ivanich has joined #ffmpeg
vlm has quit [Quit: Leaving]
ivanich has quit [Remote host closed the connection]
Traneptora has quit [Quit: Quit]
Traneptora has joined #ffmpeg
jagannatharjun has quit [Quit: Connection closed for inactivity]