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
ahc has joined #ffmpeg
alexherbo2 has quit [Remote host closed the connection]
sonicrules1234 has joined #ffmpeg
Kei_N_ has joined #ffmpeg
Kei_N has quit [Read error: Connection reset by peer]
nigetilly has joined #ffmpeg
Marth64 has joined #ffmpeg
Everything has quit [Ping timeout: 255 seconds]
BUSY has quit [Quit: Leaving]
BUSY has joined #ffmpeg
grufwub has quit [Ping timeout: 252 seconds]
lucasta has quit [Quit: Leaving]
iive has quit [Quit: They came for me...]
grufwub has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
mw1144 has quit [Quit: Client closed]
billchenchina has joined #ffmpeg
minimal has quit [Quit: Leaving]
sonicrules1234 has quit [Ping timeout: 276 seconds]
System_Error has quit [Remote host closed the connection]
sonicrules1234 has joined #ffmpeg
System_Error has joined #ffmpeg
MisterMinister has quit [Ping timeout: 255 seconds]
nigetilly has quit [Read error: Connection reset by peer]
MrZeus__ has quit [Ping timeout: 252 seconds]
ahc has quit [Quit: Leaving]
haritz has quit [Read error: Connection reset by peer]
foul_owl has quit [Ping timeout: 260 seconds]
haritz has joined #ffmpeg
StephenLynx has quit [Quit: Leaving]
foul_owl has joined #ffmpeg
System_Error has quit [Ping timeout: 260 seconds]
cmc has quit [Ping timeout: 260 seconds]
cmc has joined #ffmpeg
Keshl_ is now known as Keshl
vincejv has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
vincejv has joined #ffmpeg
Vonter_ has joined #ffmpeg
Vonter has quit [Read error: Connection reset by peer]
Vonter_ has quit [Read error: Connection reset by peer]
Vonter has joined #ffmpeg
billchenchina has quit [Remote host closed the connection]
Mirarora has quit [Quit: Mirarora encountered a fatal error and needs to close]
Tano has quit [Quit: WeeChat 4.4.2]
billchenchina has joined #ffmpeg
rv1sr has joined #ffmpeg
evilscreww has joined #ffmpeg
drv_ is now known as drv
Mirarora has joined #ffmpeg
Suchiman has quit [Quit: Connection closed for inactivity]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg
ZLima12 has quit []
ZLima12 has joined #ffmpeg
a0z has quit [Remote host closed the connection]
l4yer has quit [Ping timeout: 246 seconds]
l4yer has joined #ffmpeg
billchenchina- has joined #ffmpeg
billchenchina has quit [Ping timeout: 245 seconds]
nigetilly has joined #ffmpeg
evilscreww has quit [Ping timeout: 250 seconds]
nigetilly has quit [Client Quit]
nigetilly has joined #ffmpeg
Dagger has quit [Ping timeout: 245 seconds]
Dagger has joined #ffmpeg
cmc has quit [Remote host closed the connection]
cmc has joined #ffmpeg
YuGiOhJCJ has joined #ffmpeg
manwithluck has quit [Ping timeout: 265 seconds]
Suchiman has joined #ffmpeg
Blacker47 has joined #ffmpeg
celmor has joined #ffmpeg
evilscreww has joined #ffmpeg
MoC has joined #ffmpeg
yans has quit [Remote host closed the connection]
manwithluck has joined #ffmpeg
lavaball has joined #ffmpeg
rvalue has quit [Ping timeout: 272 seconds]
evilscreww has quit [Quit: Leaving]
manwithluck has quit [Remote host closed the connection]
manwithluck has joined #ffmpeg
acidbunny has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
Keshl has quit [Quit: Konversation terminated!]
rvalue has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
Keshl has joined #ffmpeg
lullerhaus has quit []
lullerhaus has joined #ffmpeg
Krusher has joined #ffmpeg
MisterMinister has joined #ffmpeg
nigetilly has quit [Quit: Konversation terminated!]
murb has quit [Quit: gone]
murb has joined #ffmpeg
billchenchina- has quit [Quit: Leaving]
crossby1004 has joined #ffmpeg
StephenLynx has joined #ffmpeg
rsx has joined #ffmpeg
JanC has quit [Remote host closed the connection]
JanC has joined #ffmpeg
zsoltiv_ has quit [Ping timeout: 255 seconds]
drew has left #ffmpeg [WeeChat 4.4.2]
EmleyMoor has quit [Ping timeout: 276 seconds]
EmleyMoor has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 276 seconds]
Tano has joined #ffmpeg
EmleyMoor has joined #ffmpeg
Sl4yer has joined #ffmpeg
l4yer has quit [Ping timeout: 252 seconds]
JanC has quit [Remote host closed the connection]
JanC has joined #ffmpeg
JanC has quit [Remote host closed the connection]
JanC has joined #ffmpeg
billchenchina has joined #ffmpeg
<MisterMinister> Greetings and Salutations! Would anyone know if ZMQ can process multiple commands in sequence with minute delay between them please? Something like "scale h=360; sleep 0.2; scale h=400; sleep 0.2; scale...." Issuing separate zmqsend commands via python seems unrelaiable with the sleep delay being impercise and resulting scaling animation being jerky...
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
catsoften has quit [Ping timeout: 252 seconds]
Dagger has quit [Ping timeout: 248 seconds]
Perflosopher has quit [Quit: The Lounge - https://thelounge.chat]
Dagger has joined #ffmpeg
ocrete has quit [Quit: Ping timeout (120 seconds)]
vvvv has quit [Quit: Ping timeout (120 seconds)]
ocrete has joined #ffmpeg
vvvv has joined #ffmpeg
natto has quit [Quit: a.]
iliv has quit [Quit: "<paniq> you know when i walk out the door, there is plenty of stupid people. i open irc, there is plenty of intelligent people. so the choice comes easy."]
antto has quit [Remote host closed the connection]
strudl- has quit [Quit: got milk?]
Ekho has quit [Quit: CORE ERROR, SYSTEM HALTED.]
ops has quit [Ping timeout: 252 seconds]
natto has joined #ffmpeg
Arsen has quit [Remote host closed the connection]
raccct has joined #ffmpeg
strudl has joined #ffmpeg
antto has joined #ffmpeg
aaabbb has quit [Ping timeout: 252 seconds]
Arsen has joined #ffmpeg
johnjaye has quit [Ping timeout: 252 seconds]
johnjaye has joined #ffmpeg
ops has joined #ffmpeg
Ekho has joined #ffmpeg
Perflosopher has joined #ffmpeg
crossby1004 has quit [Ping timeout: 260 seconds]
crossby1004 has joined #ffmpeg
raccct has quit [Ping timeout: 256 seconds]
crossby1004 has quit [Ping timeout: 248 seconds]
crossby1004 has joined #ffmpeg
catsoften has joined #ffmpeg
catsoften has quit [Client Quit]
esu has left #ffmpeg [#ffmpeg]
catsoften has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 252 seconds]
JanC_ has joined #ffmpeg
JanC is now known as Guest723
Guest723 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
JanC_ is now known as JanC
crossby1004 has quit [Ping timeout: 252 seconds]
EmleyMoor has joined #ffmpeg
lavaball has joined #ffmpeg
MoC has quit [Quit: Konversation terminated!]
crossby1004 has joined #ffmpeg
crossby1004 has quit [Ping timeout: 252 seconds]
crossby1004 has joined #ffmpeg
crossby1004 has quit [Ping timeout: 252 seconds]
<BtbN> no. It's not meant for real time animation anyway
rsx has quit [Quit: rsx]
Sketch has quit [Ping timeout: 260 seconds]
crossby1004 has joined #ffmpeg
realies has joined #ffmpeg
billchenchina has quit [Quit: Leaving]
crossby1004 has quit [Ping timeout: 265 seconds]
crossby1004 has joined #ffmpeg
crossby1004 has quit [Ping timeout: 252 seconds]
jemius has joined #ffmpeg
ewomer has quit [Quit: WeeChat 4.4.3]
Sketch has joined #ffmpeg
Krusher has quit [Ping timeout: 245 seconds]
Marth64 has quit [Quit: Leaving]
Suchiman has quit [Quit: Connection closed for inactivity]
minimal has joined #ffmpeg
KillerWasp has joined #ffmpeg
<KillerWasp> hello. I have a C program that get a mp4 and send to twitch, i already have all the code for get the frame, resize the video, and send the frame to switch. The problem is that i'm like 2 days with the damn pts/dts sincronization, i never can fix it, i don't know what pts/dts send to avcodec_send_frame and how to handle the pts/dts receive from avcodec_receive_packet, and where/how handle with av_usleep. the avcodec_send_frame+avcodec_receive_p
<KillerWasp> acket is where i process the frame to packet for send to twitch, but i always get wrong pts/dts, and in av_interleaved_write_frame i get whining.
<JEEB> KillerWasp: basically when you are reading packets from an AVFormatContext, they should be on the time base of the AVStream to which they belong. then when you initialize your decoder you configure the time base for that context, and then utilize the time base it was able to initialize as the one to which to rescale
<JEEB> then the AVFrames would be on the time base of the decoder context when received from the decoder
<JEEB> then you may have filtering, encoder, muxer and in each of these you will have time bases
Vonter has quit [Ping timeout: 252 seconds]
<KillerWasp> I should ignore the decoder time, after all it is a twitch stramming, which means that before the encoder I can mix the images or frames I want before sending them, so the pts/dts of the encoder step is independent and I can give it whatever value I want, right? Here I try to enter a frames per second value like 'time_base=(AVRational){1,15};' for the video context, and 'time_base=(AVRational){1,1000}' for the video stream, while for audio it
<KillerWasp> is 'time_base=(AVRational){1,44100}' in context and 'time_base=a .o_cctx->time_base' for stream, I understand how to use the rescaling before avcodec_send_frame and after avcodec_receive_packet. The problem is getting the correct data into pts/dts for the frame before sending and how to handle the pts/dts after receiving your packet.
<KillerWasp> 'time_base=(AVRational){1,1000}' for stream in audio****
<KillerWasp> also have the problem how to calculate for av_usleep and where must i put this function, before of send the frame or later of receive the packet.
BUSY has quit [Quit: Leaving]
<JEEB> you cannot fully ignore decoder time
<JEEB> unless you don't actually care about the timing of the input files
<JEEB> in which case you should have a system that according to your output frame rate is constantly pushing out AVFrames with the correct PTS
<JEEB> "timing of the input files" means the time difference between frames, not necessarily the actual demuxed or decoded values themselves
<JEEB> also I know over 9000 people cargo cult that 44.1kHz thing for FLV, but it's been now like 15 years (probably more) since the specification was amended to say that in case of AAC, any implementation should look into the audio frame's configuration data instead of the container value, and since then muxing AAC into FLV supported any sample rate
celmor has quit [Ping timeout: 256 seconds]
Kruppt has joined #ffmpeg
hightower3 has joined #ffmpeg
coldfeet has joined #ffmpeg
FlorianBad has quit [Remote host closed the connection]
<KillerWasp> seem the handle of audio give more problems still. I need solve the pts/dts first.
iliv has joined #ffmpeg
<JEEB> well yes
<KillerWasp> i deactivate all the audio side in my program and work with only video. Like i work with 15fps then it's {1,15}, like that i must send in the pts of the frame before of avcodec_send_frame a counter number frame x frame, it's correct?
<KillerWasp> like 1, 2, 3, 4, 5, 6... etc
<JEEB> yes, for constant 15fps those would be the values, just make sure to pass that time base to encoder avcodec context, and do rescaling after initialization in case the encoder doesn't support your exact time base
<JEEB> also I recommend setting the AVFrame duration accordingly as well
<JEEB> for AVPackets there's av_packet_rescale_ts as a helper, and for AVFrame I don't recall
ursa has joined #ffmpeg
squeaktoy has quit [Read error: Connection reset by peer]
<KillerWasp> time_base=(AVRational){1,15} for context output in video and time_base=(AVRational){1,1000} for stream output in video.
<KillerWasp> really are all set.
<KillerWasp> but still is a mess, the pts of packet give any garbage from avcodec_receive_packet
squeaktoy has joined #ffmpeg
<KillerWasp> seem like i must discard the pts of avcodec_receive_packet and send also in sequence
Marth64 has joined #ffmpeg
Blacker47 has quit [Quit: Life is short. Get a V.90 modem fast!]
coldfeet has quit [Remote host closed the connection]
<johnjaye> the manual gives this as an example for how to draw a green rectangle for the delogo filter. it works fine in ffmpeg. but it fails in ffplay
<johnjaye> delogo=x=0:y=0:w=100:h=77:show=1
Suchiman has joined #ffmpeg
<johnjaye> it gives an out of bounds error. if i change it to x=1 and y=1 then it doesn't give the error with ffplay -vf. am i doing something wrong here?
<JEEB> KillerWasp: any sane encoder gives you proper dts and pts back from it
<JEEB> if you are getting "garbage", then something is clearly wrong
<JEEB> most common reason is that you are not properly rescaling
<BtbN> well, they mostly give you what they got as input, without doing much with it
<BtbN> so it's a case of "garbage in, garbage out"
<JEEB> yes, most likely
chiselfuse has quit [Ping timeout: 260 seconds]
<KillerWasp> JEEB: maybe by av_usleep? that i also ask by the correct calculation values and where i must put it.
<JEEB> let's first get the dts and pts set up
cmc has quit [Ping timeout: 260 seconds]
<JEEB> please log the input and pts/duration for the AVFrame and dts/pts/duration for the output AVPacket
<JEEB> take a couple of frames and push them through, paste the result into pastebin of choice and link here
ursa has quit [Ping timeout: 260 seconds]
<KillerWasp> i don't know if avcodec_receive_packet also get the time from my machine with av_gettime and how to handle it. I already have the log, is why i say that show any garbage, now give the paste.
<JEEB> the encoders just take your input and translate that into output
<JEEB> they do not care about real time
<BtbN> that at works re-order and interpolate between two given timestamps
<BtbN> but nothing more
<BtbN> Would be a bit silly if encoders used real time. Could never get more FPS than the video is. And could also just not encode if your CPU is too slow.
strudl has quit [Quit: got milk?]
<JEEB> after all, what in general is handling your real life timing is the source providing the AVFrames. that thing ticks, ticks, ticks and then pushes it towards whatever output chain you have
<KillerWasp> JEEB: https://paste.rs/7gLiG - where say pts/dts is later of get the package from avcodec_receive_packet, and where say "S-V:" is before to read av_packet_rescale_ts+av_interleaved_write_frame.
strudl has joined #ffmpeg
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
delthas has quit [Ping timeout: 252 seconds]
<JEEB> so this has both the AVFrame pts+duration as well as the encoder output AVPacket dts/pts/duration?
delthas has joined #ffmpeg
jemius has quit [Quit: Leaving]
<KillerWasp> JEEB: the output is the result of "AVstream_index" is from avcodec_receive_packet, and "S-V:" is before of av_packet_rescale_ts+av_interleaved_write_frame. Between those two parts i have a condition for discard any package with pts less that the previous pts of previous package.
Arsen has quit [Quit: No Ping reply in 180 seconds.]
<KillerWasp> before of avcodec_send_frame+avcodec_receive_packet i send a counter of correlated number of frames
<KillerWasp> to pts of the frame
Arsen has joined #ffmpeg
<JEEB> OK, sorry. it's not clear and I am not going to guess what your code does
<KillerWasp> ok.
<JEEB> but I will definitely tell you that if you get unexpected timestamps, most of the time it is time base and lack of correct rescaling
strudl has quit [Remote host closed the connection]
strudl has joined #ffmpeg
luva has quit [Quit: Byebye]
luva has joined #ffmpeg
chiselfuse has joined #ffmpeg
fling has joined #ffmpeg
ursa has joined #ffmpeg
cmc has joined #ffmpeg
Everything has joined #ffmpeg
Arokh has joined #ffmpeg
Marth64 has quit [Quit: Leaving]
Muimi has joined #ffmpeg
rv1sr has quit []
rex has quit [Ping timeout: 248 seconds]
rex has joined #ffmpeg
gvg has quit [Ping timeout: 248 seconds]
delthas has quit [Remote host closed the connection]
delthas has joined #ffmpeg
gvg has joined #ffmpeg
Everything has quit [Quit: leaving]
TheSilentLink has quit [Quit: Good Bye! My bouncer has probably crashed or lost connection to the internet...]
TheSilentLink has joined #ffmpeg
iive has joined #ffmpeg
JanC has quit [Remote host closed the connection]
JanC has joined #ffmpeg
JanC has joined #ffmpeg
JanC is now known as Guest7379
Guest7379 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
vvvv has quit [Ping timeout: 260 seconds]
JanC has joined #ffmpeg
JanC has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
vvvv has joined #ffmpeg
SuicideShow has quit [Ping timeout: 276 seconds]
SuicideShow has joined #ffmpeg