Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The recording doesn't run #758

Closed
sinnrrr opened this issue May 12, 2022 · 9 comments
Closed

The recording doesn't run #758

sinnrrr opened this issue May 12, 2022 · 9 comments
Assignees
Labels
bug Confirmed as bug

Comments

@sinnrrr
Copy link

sinnrrr commented May 12, 2022

Describe the bug
When doing POST {{BASE_URL}}/v1/vhosts/default/apps/app:startRecord, I'm getting something like:

{
  "message": "OK",
  "response": [
    {
      "app": "app",
      "createdTime": "2022-05-12T07:30:19.365+00:00",
      "id": "123",
      "segmentationRule": "continuity",
      "state": "ready",
      "stream": {
        "name": "Hello",
        "tracks": []
      },
      "vhost": "default"
    }
  ],
  "statusCode": 200
}

And that's it. It doesn't start recording, no error logs. When doing POST {{BASE_URL}}/v1/vhosts/default/apps/app:records, it has status of "ready" even after 5, 10 minutes. When stopping the recording it has never been saved.

I tried to reproduce this on the dev version and here is what I got:

POST request to create the recording
Logs

streamy-streaming-server-1  | [2022-05-12 07:47:12.841] I [AW-DASH0:35] DASH | dash_packetizer.cpp:237  | [#default#app/stream] DASH: init_video.m4s has created
streamy-streaming-server-1  | terminate called after throwing an instance of 'std::bad_function_call'
streamy-streaming-server-1  |   what():  bad_function_call
streamy-streaming-server-1  | [2022-05-12 07:47:17.944] C [SPAPISvr-T8081:40] OvenMediaEngine | signals.cpp:114  | OME received signal 6 (SIGABRT), interrupt.
streamy-streaming-server-1 exited with code 6

and then it just quit.
UPD: getting this not only when I POST to create the recording, but also when I do query recordings.

API Result

{
  "message": "OK",
  "response": [
    {
      "app": "app",
      "createdTime": "2022-05-12T07:47:17.927+00:00",
      "id": "123",
      "segmentationRule": "continuity",
      "state": "ready",
      "stream": {
        "name": "Hello",
        "tracks": []
      },
      "vhost": "default"
    }
  ],
  "statusCode": 200
}

To Reproduce
Steps to reproduce the behavior:

  1. Set Server.xml as follows: https://pastebin.com/vuWCVxes
  2. With Encoder: OBS 27.2.4
  3. Start the engine and try to create a recording

Expected behavior
The recording should be created in the FILE.RootPath folder

Logs
https://pastebin.com/kGZ1kQJB

Server (please complete the following information):

  • OS: MacOS
  • OvenMediaEngine Version: v0.13.2
  • Branch: stable

Player (please complete the following information):

  • Device: MacBook Air 2020 M1
  • OS: MacOS
  • Browser Chrome
  • Version 101

Additional context
No additional context.

@sinnrrr sinnrrr added the bug Confirmed as bug label May 12, 2022
@Keukhan Keukhan self-assigned this May 13, 2022
@Keukhan
Copy link
Member

Keukhan commented May 16, 2022

@sinnrrr
Recently, there was a problem that an error occurred after using the API due to a modification of the HTTP module.
We solved the exception problem a few hours ago, so please try again with the latest master version.

Thanks.

@getroot
Copy link
Member

getroot commented May 16, 2022

Since the master branch is a version under development, errors can occur at any time. If you want a stable version, use the release branch.

@sinnrrr
Copy link
Author

sinnrrr commented May 18, 2022

@Keukhan @getroot sorry for the late reply and thanks for such a quick response!

I've tried to switch to the dev tag of the docker image, and the error is gone (I can query the records without errors on the dev version), but it still doesn't run recording and still becomes frozen at the state of "ready".

I could spare some time to help you with this, but I'm not proficient in C++ as much as you guys. Looking forward to your feedback.

@Keukhan
Copy link
Member

Keukhan commented May 19, 2022

@sinnrrr

Looking at the log you sent, the name of the stream transmitted by the rtmp protocol is 'stream'.

[Stream Info]
id(1968503546), msid(0), output(stream), SourceType(Transcoder), Created Time (Thu May 12 07:40:37 2022) UUID(4a2ab9f5-df18-4c0a-bb4f-1e5bd23a1b33/default/#default#app/stream/o)

Origin Stream Info
id(23), output(stream), SourceType(Rtmp), Created Time (Thu May 12 07:40:36 2022)

Video Track #0: Bypass(true) Bitrate(2.50Mb) codec(1, H264) resolution(1280x720) framerate(30.00fps) timebase(1/1000)
Audio Track #1: Bypass(true) Bitrate(160.00Kb) codec(6, AAC) samplerate(1.0K) format(s16, 16) channel(stereo, 2) timebase(1/1000)
Audio Track #2: Bypass(false) Bitrate(128.00Kb) codec(8, OPUS) samplerate(48.0K) format(s16, 16) channel(stereo, 2)

However, if you check the recording request API, the target stream name is 'Hello'.
Try changing the target stream name to Hello -> stream

Thanks

@sinnrrr
Copy link
Author

sinnrrr commented May 19, 2022

What a stupid mistake. Thanks a lot!
@Keukhan can I also ask, is there an ability to fully record the stream from the very start to the very end, like in nginx-rtmp?

@sinnrrr sinnrrr closed this as completed May 19, 2022
@Keukhan
Copy link
Member

Keukhan commented May 19, 2022

@sinnrrr

Sure,

  1. Start recording with API
  2. RTMP transmission starts and ends after a certain period of time.
  3. A fully recorded file is created in the storage.

Repeat step 2 without calling the recording stop API.

That's easy, right? :)

@sinnrrr
Copy link
Author

sinnrrr commented May 19, 2022

@Keukhan okay, so in order to record the full stream, I need to run a record as soon as I started the media engine, right?

@Keukhan
Copy link
Member

Keukhan commented May 19, 2022

@sinnrrr
right. after OME starts, you need to request recording for all stream names to be recorded.

@sinnrrr
Copy link
Author

sinnrrr commented May 19, 2022

@Keukhan okay, thanks for such a help!
have a productive day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed as bug
Projects
None yet
Development

No branches or pull requests

3 participants