Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Capturing a still from a RTSP stream

Capturing a still from a RTSP stream

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharp
4 Posts 4 Posters 27 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_14995896
    wrote on last edited by
    #1

    Good morning, I'm trying to capture an image from a RTSP stream using ffmpeg. I'm struggling, it is as if ffmpeg isnt working. A snip from my code is below:

    using System.Runtime.InteropServices;
    using FFmpeg.AutoGen;
    using SixLabors.ImageSharp.Formats.Png;
    using SixLabors.ImageSharp.Formats;

    Class Program
    {
    unsafe static void Main(string[] args)
    {
    string inputUrl = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4";

    ffmpeg.avformat_open_input(&pFormatContext, inputUrl, null, null);

    The error that I'm receiving which is related to the last line of code is:

    System.NotSupportedException
    HResult=0x80131515
    Message=Specified method is not supported.
    Source=FFmpeg.AutoGen
    StackTrace:
    at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.b__2_1284(AVFormatContext** , String , AVInputFormat* , AVDictionary** )
    at FFmpeg.AutoGen.ffmpeg.avformat_open_input(AVFormatContext** ps, String url, AVInputFormat* fmt, AVDictionary** options)
    at Program.Main(String[] args)

    Any help would be appreciated, Freddie

    Richard DeemingR L J 3 Replies Last reply
    0
    • M Member_14995896

      Good morning, I'm trying to capture an image from a RTSP stream using ffmpeg. I'm struggling, it is as if ffmpeg isnt working. A snip from my code is below:

      using System.Runtime.InteropServices;
      using FFmpeg.AutoGen;
      using SixLabors.ImageSharp.Formats.Png;
      using SixLabors.ImageSharp.Formats;

      Class Program
      {
      unsafe static void Main(string[] args)
      {
      string inputUrl = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4";

      ffmpeg.avformat_open_input(&pFormatContext, inputUrl, null, null);

      The error that I'm receiving which is related to the last line of code is:

      System.NotSupportedException
      HResult=0x80131515
      Message=Specified method is not supported.
      Source=FFmpeg.AutoGen
      StackTrace:
      at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.b__2_1284(AVFormatContext** , String , AVInputFormat* , AVDictionary** )
      at FFmpeg.AutoGen.ffmpeg.avformat_open_input(AVFormatContext** ps, String url, AVInputFormat* fmt, AVDictionary** options)
      at Program.Main(String[] args)

      Any help would be appreciated, Freddie

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      You'll probably have better luck reporting this as an issue in the GitHub project - assuming it hasn't already been reported: Issues · Ruslan-B/FFmpeg.AutoGen · GitHub[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      • M Member_14995896

        Good morning, I'm trying to capture an image from a RTSP stream using ffmpeg. I'm struggling, it is as if ffmpeg isnt working. A snip from my code is below:

        using System.Runtime.InteropServices;
        using FFmpeg.AutoGen;
        using SixLabors.ImageSharp.Formats.Png;
        using SixLabors.ImageSharp.Formats;

        Class Program
        {
        unsafe static void Main(string[] args)
        {
        string inputUrl = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4";

        ffmpeg.avformat_open_input(&pFormatContext, inputUrl, null, null);

        The error that I'm receiving which is related to the last line of code is:

        System.NotSupportedException
        HResult=0x80131515
        Message=Specified method is not supported.
        Source=FFmpeg.AutoGen
        StackTrace:
        at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.b__2_1284(AVFormatContext** , String , AVInputFormat* , AVDictionary** )
        at FFmpeg.AutoGen.ffmpeg.avformat_open_input(AVFormatContext** ps, String url, AVInputFormat* fmt, AVDictionary** options)
        at Program.Main(String[] args)

        Any help would be appreciated, Freddie

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        The documentation at FFmpeg: Demuxing[^] implies that it expcts an actual filename as input. So try reading the stream into a local file, and see if it can process that.

        1 Reply Last reply
        0
        • M Member_14995896

          Good morning, I'm trying to capture an image from a RTSP stream using ffmpeg. I'm struggling, it is as if ffmpeg isnt working. A snip from my code is below:

          using System.Runtime.InteropServices;
          using FFmpeg.AutoGen;
          using SixLabors.ImageSharp.Formats.Png;
          using SixLabors.ImageSharp.Formats;

          Class Program
          {
          unsafe static void Main(string[] args)
          {
          string inputUrl = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4";

          ffmpeg.avformat_open_input(&pFormatContext, inputUrl, null, null);

          The error that I'm receiving which is related to the last line of code is:

          System.NotSupportedException
          HResult=0x80131515
          Message=Specified method is not supported.
          Source=FFmpeg.AutoGen
          StackTrace:
          at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.b__2_1284(AVFormatContext** , String , AVInputFormat* , AVDictionary** )
          at FFmpeg.AutoGen.ffmpeg.avformat_open_input(AVFormatContext** ps, String url, AVInputFormat* fmt, AVDictionary** options)
          at Program.Main(String[] args)

          Any help would be appreciated, Freddie

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #4

          Myself it just seemed like an interesting problem. So I googled using the following

          capture an image from a RTSP stream still shot

          Interesting that they mention this tool right away. This one seems useful https://stackoverflow.com/questions/25360470/ffmpeg-capture-current-frame-and-overwrite-the-image-output-file[^] So the tool itself will capture it as long as the correct options are provided. Another link suggests that streams can be corrupted because, not surprisingly, streams can drop packets.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups