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
<redeeman>
it seems it doesnt
<redeeman>
seems i had to add out_range=pc to the scale
rex has quit [Ping timeout: 248 seconds]
wziko has quit [Ping timeout: 265 seconds]
Marth64 has quit [Quit: Leaving]
Kei_N has joined #ffmpeg
wziko has joined #ffmpeg
wziko has quit [Max SendQ exceeded]
Kei_N_ has quit [Ping timeout: 272 seconds]
olndrxyz has quit [Quit: Quit]
lavaball has quit [Remote host closed the connection]
rex has joined #ffmpeg
sihloo_ has joined #ffmpeg
chandash has joined #ffmpeg
CruxOfTheB has quit [Ping timeout: 244 seconds]
CruxOfTheB has joined #ffmpeg
xx has quit [Ping timeout: 264 seconds]
j4n has quit [Quit: j4n]
j4n has joined #ffmpeg
j4n has quit [Client Quit]
j4n has joined #ffmpeg
CruxOfTheB has quit [Ping timeout: 265 seconds]
chandash has quit [Quit: WeeChat 4.4.2]
UltimateCodeWarr has joined #ffmpeg
<UltimateCodeWarr>
Hello, is it possible to be reading from FFMPEG .MP4 while it's being written to at the same time. For instance, you have written 11 seconds of A/V to the file, and you want to read the first 10 seconds?
<Traneptora>
UltimateCodeWarr: for mp4, this is not possible
<Traneptora>
when writing to mp4, the last thing that the writer does is write the "moov" atom, which is the index. mp4 is not readable without it
<Traneptora>
faststart moves the mov atom to the front with a second pass after it is written
<Traneptora>
it does not work with streaming
<aaabbb>
Traneptora: yeah but you can still play it while it's writing
<Traneptora>
that should not work
<aaabbb>
hm, let me test it, since i was sure it did for some reason
<aaabbb>
oh you're right, i must have been thinking of matroska
<Traneptora>
UltimateCodeWarr: what you are trying to accomplish is possible fi you use matroska
<aaabbb>
yeah ^
<aaabbb>
and at the end you can remux the matroska into mp4 if you really want to
<Traneptora>
you can read from a matroska file that is being written to at the same time, and it should work. this is not possible with mp4 specifically because of the mp4 file format's limitations
<aaabbb>
i thought that faststart would put a dummy moov at the beginning until it was ready to write the real moov
<aaabbb>
maybe it just allocates space for a moov atom but doesn't actually put anything into it until thesecond pass
<Traneptora>
the mp4 file format isn't readable until the file is finalized, which won't work mid process. it also means that if the writing process crashes the recording is corrupt, so it's not a good idea for live recordings either
<aaabbb>
yeah you're right, i'm wrong there. just use mkv
<UltimateCodeWarr>
Ok, good to get the experts reasoning on it.
<UltimateCodeWarr>
Chat GPT thought it was possible
<UltimateCodeWarr>
import subprocess
<UltimateCodeWarr>
import socket
<UltimateCodeWarr>
import time
<UltimateCodeWarr>
# Set up socket connection to send video chunks
<UltimateCodeWarr>
server_ip = '127.0.0.1' # IP of the receiving machine
<UltimateCodeWarr>
server_port = 12345 # Port number
<UltimateCodeWarr>
sock.close() # Close the socket whe
<Traneptora>
ye but someone can kick him
<Traneptora>
oh good it ended
<aaabbb>
i think it finished pasting anyway
<aaabbb>
but yeah next time use a paste site lol
<UltimateCodeWarr>
Sorry bout that
<aaabbb>
unless pasting more than like 3 lines
<UltimateCodeWarr>
HexChat is great
<Traneptora>
unless you're pasting more than one line honestly use a paste site plz
<Traneptora>
you can always quit the client if you pasted a paragraph you didn't mean to
<UltimateCodeWarr>
Would like 512 bytes bring the system down?
<aaabbb>
yeah, cuz something a lot of people don't realize is that if you paste a lot, it will appear all at once to you, but to everyone else it will be slowly sent one at a time, so it's never "too late" to close the client to stop it from sending
<aaabbb>
512 bytes of what?
<UltimateCodeWarr>
A code block
<aaabbb>
it's more that posting a lot of lines at once is distracting
<aaabbb>
the system can handle it, although each irc line is limited to 512 bytes minus overhead for metadata
<UltimateCodeWarr>
The ideal way to read from a FFMPEG would be to pass in a start / stop timestamp, it would adjust those values according to how close it could get to a keyframe that it could stitch the two chunks back together seamlessly.
<UltimateCodeWarr>
Each chunk that it splits up should be playable by itself.
<aaabbb>
so like dash?
<UltimateCodeWarr>
But when re-assembling on the other side, it should get rid of any header junk
<aaabbb>
mpeg-ts etc?
<Traneptora>
UltimateCodeWarr: maybe you're looking for the segment muxer?
<UltimateCodeWarr>
The problem I have is I have a raspberry pi that can write Cam data to a MP4. If I write 10 second segments so they can be processed by back end OpenCV, I have to start/stop the PiCamera's writing of the MP4 file so by the time the next one starts, I am missing action.
<UltimateCodeWarr>
When I go to stitch them together, it looks jumpy.
<Traneptora>
does it *have* to write to mp4?
<UltimateCodeWarr>
No, but it was super convenient because it could write audio and video at the same time.
<Traneptora>
if you can write a streamable format that's ideal
<UltimateCodeWarr>
The .h264 is pretty good compression to boot
<aaabbb>
h264 isn't limited to mp4
<aaabbb>
mp4 is just a container. you can use mkv with the same exact h264 codec
<UltimateCodeWarr>
Well, when I was trying to do my own capture audio/video to a file, the FFMPEG was a CPU hog, and there was audio drift
<UltimateCodeWarr>
Seemed like Kung-Fu theater.
j4n has quit [Quit: j4n]
<Traneptora>
UltimateCodeWarr: picamera docs mention split_recording() so maybe check that out?
j4n has joined #ffmpeg
Mister_Magister_ has joined #ffmpeg
Mister_Magister has quit [Ping timeout: 252 seconds]
Mister_Magister_ is now known as Mister_Magister
<UltimateCodeWarr>
That split recording might just be the ticket.
cmc has quit [Ping timeout: 264 seconds]
cmc has joined #ffmpeg
\\Mr_C\\ has quit [Remote host closed the connection]
j4n has quit [Quit: j4n]
rvalue has quit [Read error: Connection reset by peer]