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);
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);
For the developers that use FFmpeg in their software.
2 posts • Page 1 of 1