quietvoid / hdr10plus_tool

CLI utility to work with HDR10+ in HEVC files.
MIT License
294 stars 33 forks source link

Pipe for injection? #55

Closed Manouchehri closed 1 year ago

Manouchehri commented 1 year ago

Would it be possible to add support to accept a pipe for the hevc input stream? e.g. like this:

ffmpeg -i Untitledforhdr10injection265.mov -map 0:v:0 -c copy -vbsf hevc_mp4toannexb -f hevc - | hdr10plus_tool inject -i - -j metadata.json -o /tmp/injected_output.hevc

This errors out with:

Press [q] to stop, [?] for help
av_interleaved_write_frame(): Broken pipeB time=00:00:00.00 bitrate=N/A speed=N/A
Error writing trailer of pipe:: Broken pipe
frame=    1 fps=0.0 q=-1.0 Lsize=    1037kB time=-00:00:00.03 bitrate=N/A speed=N/A
video:1037kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Error closing file pipe:: Broken pipe
Conversion failed!
quietvoid commented 1 year ago

No it's not supported, we rely on being able to figure out the proper frame presentation order, which requires parsing the whole video first. When parsing, the frames can come in any order and buffering a full GOP isn't an option.