You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implement custom video encoders for pion webrtc like this:
func CreateCustomOpen264Encoder() codec.ReadCloser {
// Your image data (replace this with your image loading logic)
customVideoReader := NewCustomVideoReader2()
open264Params, _ := openh264.NewParams()
mediaProp := prop.Media{
//DeviceID: "",
Video: prop.Video{
Width: 350,
Height: 350,
FrameRate: 25,
FrameFormat: frame.FormatRGBA,
DiscardFramesOlderThan: 0,
},
//Audio: prop.Audio{},
}
open264Encoder, err := openh264Params.BuildVideoEncoder(&customVideoReader, mediaProp)
if err != nil {
println("Error BuildVideoEncoder")
}
return open264Encoder
}
It works for vp8, vp9 and x264, but open264 throws the following error:
/usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
/usr/bin/ld: /tmp/go-link-1015362183/000012.o: in function `enc_new':
/home/alex/go/pkg/mod/github.com/pion/[email protected]/pkg/codec/x264/bridge.h:24: multiple definition of `enc_new'; /tmp/go-link-1015362183/000008.o:/home/alex/go/pkg/mod/github.com/pion/[email protected]/pkg/codec/openh264/bridge.cpp:7: first defined here
/usr/bin/ld: /tmp/go-link-1015362183/000012.o: in function `enc_encode':
/home/alex/go/pkg/mod/github.com/pion/[email protected]/pkg/codec/x264/bridge.h:81: multiple definition of `enc_encode'; /tmp/go-link-1015362183/000008.o:/home/alex/go/pkg/mod/github.com/pion/[email protected]/pkg/codec/openh264/bridge.cpp:74: first defined here
collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered:
Alpe6825
changed the title
Error in bridge.cpp when using open264
Error in bridge.cpp when using openh264
Apr 5, 2024
I implement custom video encoders for pion webrtc like this:
It works for vp8, vp9 and x264, but open264 throws the following error:
The text was updated successfully, but these errors were encountered: