Extracating raw values of slices (I/P/B Slices) #1909
Unanswered
makisukurisu
asked this question in
1. Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Is it possible to extract values of slices (not values/pixels of the video stream itself) using this library?
To avoid confusion, when I'm talking about slices here, I'm talking about I/P/B (and other) as defined by H.264
For example, I can see that there's a
pict_type
attribute on a frame, so this got me thinking that I can extract the values of slices (they have to extracted somewhere to reconstruct the image, right?)I've tried using
to_ndarray
method, and it's counterpart -from_ndarray
to alter the videostream, but even if it returns some kind of representation of the slices, I can't use it to get back the stream.to_ndarray
returns 2-dim array, butfrom_ndarray
requires 3-dims. Also theto_ndarray
method returns (in my case) different shape, then my video. For example, 19201080 returns 16201920.Perhaps I misunderstood how these methods should be used (it looks like I can input per-channel pixel values with
from_ndarray
?)For some context, I'm designing a steganography algorithm that will embed data to (alter value of) I/P/B slices (blocks) of compressed H.264 video. I guess I can implement parsing on my own, of course, but if there's a ready-made solution for decoding/encoding video files, I'd like to use that instead.
Thanks, and sorry for my ramble.
Beta Was this translation helpful? Give feedback.
All reactions