Hi,
When I try to stream CasparCG output to Wowza using ffmpeg consumer, audio is ok but video is absent.
This is stopped working from CasperCG v2.2 or CasperCG v2.3
2022-07-18 04:34:24 UTC comment server INFO 200 - LiveStreamPacketizerCupertino.handlePacket[live/definst/test-rtmp][null]: H264 Video info: {MediaCodecInfoVideo: codec:H264, profile:unknown:0, level:0.0, frameSize:0x0, displaySize:0x0, frameRate:0.000000} - - - 303376.625 - - - -
CasperCG works with RTSP over TCP with same wowza and also works with ffmpeg command with RTMP url (ffmpeg -re -i inputfile.mp4 -codec copy -f flv “rtmp://[wowza-address]:1935/myApplication/myStream” ).
Wowza is not receiving the stream only if it gets stream from casperCG consumer.Need help to solve this issue from casperCG ffmpeg consumer side?
Environment:
Server version: v2.3.0
GPU : NVIDIA GeForce GTX 1050
channel Configuration is 720p3000.
Captured RTMP tcpdump today and where i see First H264 keyframe is getting send however next consecutive H264 I-Frames are size of 4044 which doesn’t seems to be correct for h264 video frames. Hence streaming server is not able to identify and decode the packets.
Kindly help if you see anything obvious to solve.
Attaching the snapshot of capturedump where casparcg ffmpeg consumer sends 4044 bytes of packet to RTMP server.
Do we know why casparcg ffmpeg consumer packetise packet this way? Any way to fix this?
If anyone facing this issue i’ve found a fix.
add +global_header arg when adding RTMP stream this will enable individual stream headers required for FLV.
Technically this should be added based on the Muxer we use but there is code bug in CarparCG where we open the encoder before setting AV_CODEC_FLAG_GLOBAL_HEADER flag.
Older casparcg has this sequence so it’s working @ronag@Julusian can you guys patch this up in 2.3.x lts? it might help other people who are facing this RTMP bug
Hi dear Dilip or anyone! I am using casparMediaPlayback but i cannot run rtmp, it doesn’t show image at all. Can you please help me to fix the issue?! I don’t know much about programming etc. Any help will be valuable!
@Dilip With patch adding GLOBAL_HEADER before opening stream in ffmpeg consumer source code, we can see RTMP header in stream with duration, width, height, videocodecid, audiodatarate, audiosamplerate, audiosamplesize, stereo, audiocodecid, encoder, filesize :