Page 1 of 1

Spherical metadata injection

Posted: Wed Nov 07, 2018 1:40 am
by tapirasiatic
Hello,
I need to inject spherical metadata, I am using mov_write_sv3d_tag and mov_write_st3d_tag and It doesn't works. I am not sure
if I had to pass oc->pb or other pb. Do you have any example where inject spherical metadata?

ret = avio_open2(&oc->pb, filename, AVIO_FLAG_WRITE, NULL,NULL);

size_t t;
AVSphericalMapping* spherical = av_spherical_alloc(&t);
spherical->projection = AV_SPHERICAL_EQUIRECTANGULAR;
spherical->yaw = 0; spherical->roll = 0; spherical->pitch = 0;
spherical->padding = 0; spherical->bound_bottom = 0; spherical->bound_left = 0;
spherical->bound_right = 0; spherical->bound_top = 0;
AVStereo3D* stereo_3d = av_stereo3d_alloc();
stereo_3d->flags = 0; stereo_3d->type = AV_STEREO3D_2D; stereo_3d->view = AV_STEREO3D_VIEW_PACKED;

av_stream_add_side_data(video_st.st, AV_PKT_DATA_STEREO3D, (uint8_t*)stereo_3d, sizeof(*stereo_3d));
av_stream_add_side_data(video_st.st, AV_PKT_DATA_SPHERICAL, (uint8_t*)spherical, t);
mov_write_sv3d_tag(oc, oc->pb, spherical);
mov_write_st3d_tag(oc->pb, stereo_3d);

Re: Spherical metadata injection

Posted: Sat Jul 13, 2019 1:19 am
by neon
Hi

Could you get this working. Please share any progress