elsampsa / valkka-core

Valkka - Create video surveillance, management and analysis programs with PyQt
GNU Lesser General Public License v3.0
186 stars 35 forks source link

Getting an error while trying to use mkv export in C++ #37

Closed apokerce closed 1 year ago

apokerce commented 1 year ago

Hi I have write a streamer in C++ using Valkka's functionality but when I tried to export the dump files to mkv I am getting error shown in 1. The reason I am trying to use valkka in C++ because most of the code is in C++. Thank you in advance.

  1. Terminal Output

    0 : 1673007524595 1673007525428
    1 : 1673007525845 1673007526678
    2 : 1673007527095 1673007527928
    3 : 1673007528344 1673007529178
    4 : 1673007529594 1673007530428
    5 : 1673007530845 1673007531553
    6 : -
    7 : 1673007520845 1673007521678
    8 : 1673007522095 1673007522929
    9 : 1673007523345 1673007524179
    ValkkaFSReaderThread: reportSlotId:
    ValkkaFSReaderThread: reportSlotId: 925412 --> 1
    [NULL @ 0x7f57f00102a0] Requested output format 'matroska' is not a suitable output format
    FileFrameFilter : initFile : FATAL : could not create output context!  Have you enabled matroska and registered all codecs and muxers?
  2. NVIDIA

  3. RTSP Camera

  4. DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
    Arch=x86_64
  5. Compiled using Cmake

  6. 
    branch 1
                                                      ------>    {RGBShmemFrameFilter: shmem_filter) --> {SwsScaleFrameFilter:sws_scale_filter} --> {TimeIntervalFrameFilter:interval} --> {AVThread:avthread} 
main branch (LiveThread:livethread) --> {ForkFrameFilter:live_out_filter} -->
                                                               +-------------> {ValkkaFSWriterThread: writer}

9.
[valkkafscpp.txt](https://github.com/elsampsa/valkka-core/files/10361051/valkkafscpp.txt)
[savetomkvcpp.txt](https://github.com/elsampsa/valkka-core/files/10361075/savetomkvcpp.txt)
elsampsa commented 1 year ago

Did you forget this?

https://github.com/elsampsa/valkka-core/blob/master/test/mux_test.cpp#L129

apokerce commented 1 year ago

I added ffmpeg_av_log_set_level(0); fatal_log_all(); Did not work after I added this too but still no luck; ffmpeg_av_register_all(); // never forget!

elsampsa commented 1 year ago

you added "ffmpeg_av_register_all()" in the very begining of your program? plz upload the full program snippet here

apokerce commented 1 year ago

I was calling reader function in another main after adding to that part to solved my problem. Thank you very much for looking in this issue.