[FFmpeg-user] Does recording stops without encoding the buffer?

Bouke bouke at editb.nl
Thu Sep 9 10:35:57 EEST 2021


Trying to record two streams with something like this:

ffmpeg -hide_banner -thread_queue_size "35012" -f "decklink" -queue_size "1073741824" -raw_format "auto" -format_code "Hp25" -channels "2" -timecode_format "rp188ltc" -video_input "sdi" -audio_input "embedded" -audio_depth "16" -i "bm mini Two" -timecode "09:13:28:04" -metadata:s:v:0 "reel_name=Reelname" -filter_complex "[0:v]split=2[out1][out2]" -map "[out1]" -map "0:a" -c:a "pcm_s16le" -c:v "prores" -profile:v "0" -vendor "ap10" -pix_fmt "yuv422p10le" "/Volumes/Data/09-09-2021/669.mov" -map "[out2]" -c:v "libx264" -preset "ultrafast" -g "30" -pix_fmt "yuv422p" -tune "zerolatency" -aspect "16:9" -f "tee" -map "0:v" "[f=mpegts]udp://127.0.0.1:1230" 

Stop recording by sending 'q' to both instances (at about the same time)
Now, sometimes one of the recordings is way shorter than the other, and does not hold all video as expected.
My guess (I don't have access to the machine it's running on now) is that the buffer isn't processed after the 'q' is received.

Could this be the case? If so, any workaround? 

(Besides looking at the amount of frames encoded and wait until it matches the time user pressed 'stop record'.)

thx
Bouke



More information about the ffmpeg-user mailing list