JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
128 stars 53 forks source link

Naming and settings fixes #304

Closed IanButterworth closed 3 years ago

IanButterworth commented 3 years ago

@galenlynch if we rename container_settings->container_options do we also want to:

change

 container_settings::SettingsT = (;),
 container_private_settings::SettingsT = (;),
 encoder_settings::SettingsT = (;),
 encoder_private_settings::SettingsT = (;),

to

 container_options::OptionsT = (;),
 container_private_options::OptionsT = (;),
 encoder_options::OptionsT = (;),
 encoder_private_options::OptionsT = (;),

Note OptionsT

galenlynch commented 3 years ago

That seems right to me!

galenlynch commented 3 years ago

One comment about the documentation: true lossless encoding no longer requires libx264rgb. I haven't tested that's it's completely lossless, but VideoIO now supports YUV444 encoding, not just YUV420, which at least avoids the chroma subsampling.

IanButterworth commented 3 years ago

I kept the renames as individual commits, so let me know if any should be dropped

true lossless encoding no longer requires libx264rgb

This would be good to write up for the docs. Edit: oh right, that was your point.. would you mind writing that up?

galenlynch commented 3 years ago

Sure!

codecov[bot] commented 3 years ago

Codecov Report

Merging #304 (bc24506) into master (5482491) will not change coverage. The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #304   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files          17       17           
  Lines        1196     1196           
=======================================
  Hits          985      985           
  Misses        211      211           
Impacted Files Coverage Δ
src/VideoIO.jl 53.33% <ø> (ø)
src/avio.jl 81.25% <ø> (ø)
src/frame_graph.jl 99.18% <50.00%> (ø)
src/encoding.jl 93.20% <75.00%> (ø)
src/avptr.jl 69.47% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5482491...bc24506. Read the comment docs.

galenlynch commented 3 years ago

One comment about the documentation: true lossless encoding no longer requires libx264rgb. I haven't tested that's it's completely lossless, but VideoIO now supports YUV444 encoding, not just YUV420, which at least avoids the chroma subsampling.

I just tested it and libx264 is not lossless even when crf=0. I don't know this is due to some colorspace problem, or instead something else on our end, but there's lots of off-by-one errors. I could probably also try with actual mpeg-range input, but that's probably beyond the pale for top-level documentation.

IanButterworth commented 3 years ago

Even with color_range=2? That's required for Gray, so might be needed for RGB

galenlynch commented 3 years ago

Yeah. It goes through sws_scale for RGB->YUV which is notoriously complicated so it's perhaps not surprising that it's not lossless without spending the time to fine-tune the sws_scale parameters.

On Mon, Mar 15, 2021, at 17:22, Ian Butterworth wrote:

Even with color_range=2? That's required for Gray, so might be needed for RGB

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JuliaIO/VideoIO.jl/pull/304#issuecomment-799760866, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUDZT3KTVCO56W2VDZ6NWLTDZ273ANCNFSM4ZHAHURA.