Hi,
I’m trying to setup a pipeline that encodes H264 video, and then save the result to a sequence of files.
I found that there’s a plugin called multifilesink for the task quickly. If the next-file property is set to 2 (key-frame), the plugin can create a new file each time a key frame is received, which is exactly what I want.
It works with one encoder, but fails with the other.
working example with openh264enc:
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=800,height=600,framerate=30/1 ! openh264enc bitrate=2560000 ! multifilesink location=output-%05d.mp4 next-file=2
failed example with nvh264enc:
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=800,height=600,framerate=30/1 ! nvh264enc ! multifilesink location=output-%05d.mp4 next-file=2
All files created by openh264enc can be opened by PotPlayer. They are also recognized by gst-discoverer-1.0 and ffprobe.
Files created by nvh264enc cannot be opened, or recognized by gst-discoverer / ffprobe, except for the first file.
I’m not sure whether it is an issue of nvh264enc. Is it a known issue or something new?
Here’s my testing environment:
- Windows 11 23H2 64 bit
- GStreamer 1.24.5 msvc x86_64
- NVIDIA RTX 3060 Laptop (522.06, 31.0.15.2226)
- PotPlayer 220106 (1.7.21595)