Wowza Community

Cannot transcode camera stream to h264

Hi everybody,
I am new to wowza and trying to connect an IP camera to streaming engine. I can connect it via a stream file but the test is unsuccessful (i cannot see it in test page). When I record the stream, the recorded mp4s cannot be opened by VLC since there is no H265 codec.
After some research I have enabled the transcoding option. However, while I can see the original stream is streaming (bytes input is increasing), the bytes in value for the transcoded streams is zero. So I cannot transcode H265 to H264.
Streaming Engine is running on Ubuntu 18.4.
The error in server log is as follows:
|ERROR|server|comment|2021-08-02|17:01:57|-|-|-|-|-|712.151|-|-|-|-|-|-|-|-|RTPStream.getMetadataPacket : java.lang.NullPointerException|at com.wowza.wms.media.h265.H265CodecConfigParts.getSpropPPS(H265CodecConfigParts.java:70)|at com.wowza.wms.rtp.model.RTPStream.getMetadataPacket(RTPStream.java:1959)|at com.wowza.wms.rtp.model.RTPStream.a(RTPStream.java:2094)|at com.wowza.wms.rtp.model.RTPStream.checkSendMetadata(RTPStream.java:2135)|at com.wowza.wms.rtp.model.RTPTrack.checkSendMetadata(RTPTrack.java:1548)|at com.wowza.wms.rtp.depacketizer.RTPPacket.write(RTPPacket.java:1375)|at com.wowza.wms.rtp.depacketizer.RTPDePacketizerVideoBase.sendPacket(RTPDePacketizerVideoBase.java:106)|at com.wowza.wms.rtp.depacketizer.RTPDePacketizerRFCXXXXH265.sendPacket(RTPDePacketizerRFCXXXXH265.java:506)|at com.wowza.wms.rtp.depacketizer.RTPDePacketizerRFCXXXXH265.onRtpPacket(RTPDePacketizerRFCXXXXH265.java:146)|at com.wowza.wms.rtp.depacketizer.RTPDePacketizerBase.handleRTPPacket(RTPDePacketizerBase.java:371)|at com.wowza.wms.rtp.model.RTPTrack$HandleRTPMessage.handleMessage(RTPTrack.java:64)|at com.wowza.wms.mediacaster.rtp.RTPSessionDescriptionDataProviderBasicRTSPWorker.onMessage(RTPSessionDescriptionDataProviderBasicRTSPWorker.java:727)|at com.wowza.wms.mediacaster.rtp.RTPSessionDescriptionDataProviderBasicRTSPHandler.messageReceived(RTPSessionDescriptionDataProviderBasicRTSPHandler.java:36)|at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(AbstractIoFilterChain.java:181)||
|—|---|—|---|—|---|—|---|—|---|—|---|—|---|—|---|—|---|—|---|
|WARN|server|comment|2021-08-02|17:01:57|-|-|-|-|-|712.173|-|-|-|-|-|-|-|-|TranscoderWorkerVideoDecoder.frameDimensionsValid[defaultVHost:liveCamera/definst/camera1.stream: decodeIterations:0]: videoDecoderDecodeDisplayWidth failed [0:32:8192]: Encodes will not be playable|

Can anybody help me identify the problem?
thanks

filiz.

Hello @Filiz_Celik are you saying you are using an IP camera with H.265 and you are trying to convert it to H.264?

Are you using the latest version of Engine- 4.8.14? Because we changed our transcoder to Beamr and you may need to adjust a few settings.

You can restream H.265 to H.264 following this doc and tutorial and is a demo how you can play it in VLC player.

Be sure to check out this doc and confirm the codec coming and going out:

https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming


If you’re still having issues, send us a support ticket in case we need to advise on some transcoder settings for you. We’ll need to review your camera and configuration.

Hi and thanks for your reply.

  • I have an IP camera stream and, I can get the stream via VLC, and checked that Codec: H264 - MPEG-4 AVC (part 10) (h264).
  • I connect to this camera via a stream file (as described in video mentioned in rge reply post.)
  • when I test playback, the video screen is all black.
  • Then i tried to record this stream which is successful, however when i try to play the recorded video, I cannot play it neither in video Test Player in Wowza (again black screen), nor in VLC player (VLC could not decode the format “hevc” (MPEG-H Part2/HEVC (H.265))).
  • Then I tried to transcode it to H264 (thinking that is the problem) but this time, as I have mentioned in the post, the “bytes in” value in network throughput is zero (for the transcoded streams)

I have opened a support ticket,
thanks again.

Weird, I wonder what’s going on and will look for your ticket and the discussion. It might be the camera url- they vary per manufacturer but I don’t know and am glad you sent the ticket! We’ll get it figured out!

1 Like

Hi, thanks for the solution.
Changing the URL to rtsp://[user]:[pass]@[cameraIP]:[port]/ ?h26x=4&inst=2 solved the problem.

1 Like