cropsly / ffmpeg-android-java

Android java library for FFmpeg binary compiled using https://github.com/writingminds/ffmpeg-android
http://writingminds.github.io/ffmpeg-android-java
GNU General Public License v3.0
3.32k stars 831 forks source link

BG-380-[hevc @ 0xe86ff800] Could not find ref with POC 34 #380

Open RishiDate opened 11 months ago

RishiDate commented 11 months ago
  1. I am trying to send Rtsp video (comes from RTSP camera URL) to the ANT media server.
  2. I am using LibVLC to play video locally in app.
  3. But In initial 20 seconds this corrupted frame appear. and following error comes in logs "[hevc @ 0xe86ff800] Could not find ref with POC 34" corruptedImg I am using following command:

         `String[] cmd = {
            "-rtsp_transport",
            "tcp", // Choose appropriate transport (e.g., "udp" or "tcp")
            "-i",
           "rtsp://127.0.0.1:8554/main.898", // Source RTSP stream URL
            "-filter:v",
            "scale=1280:720",
            "-c:v",
            "libx264", // Video codec for transcoding (you can choose other codecs if needed)
            "-preset",
            "ultrafast", // Video preset for transcoding speed (adjust as needed)
            "-max_delay",
            "1000000",
            "-an",
            "-f",
            "flv", // Output format, RTMP requires FLV container
           "rtmp://streamingServer.com/LiveApp/gdyggcshvcvhcvv " // Ant Media Server RTMP endpoint
    };
    
    try {
        // Execute FFmpeg command
        fFmpeg.execute(cmd, new FFmpegExecuteResponseHandler() {
            @Override
            public void onSuccess(String message) {
            }
            @Override
            public void onProgress(String message) {
            }
            @Override
            public void onFailure(String message) {
    
            }
            @Override
            public void onStart() {
            }
            @Override
            public void onFinish() {
    
            }
        });
    } catch (FFmpegCommandAlreadyRunningException e) {
        Log.e("FFmpeg", String.valueOf(e));
        // Handle FFmpeg command already running error
    }`

Thanks,