Giter Club home page Giter Club logo

Comments (12)

cyberj0g avatar cyberj0g commented on July 29, 2024 1

It occurs here, but I'm still unable to reproduce it:

ret = avcodec_open2(vc, codec, &octx->video->opts);

I believe profile:high should be passed there always, but it doesn't seem to be the case, or it doesn't trigger error with test data. Maybe add some logging around this bit, WDYT @MikeIndiaAlpha?

This issue seem to be specific to h264_ni_enc and is not related to other similar errors. I think one of previous experimental versions for Netint used xcoderparams structure to set profile, maybe it won't work otherwise, then we need to make sure profile is passed differently through this structure, in case of Netint:

av_opt_set(vc->priv_data, "xcoder-params", ictx->xcoderParams, 0);

from lpms.

MikeIndiaAlpha avatar MikeIndiaAlpha commented on July 29, 2024

@yondonfu
One comment I have here - unless I understood something wrong, referred issue was on Windows and here we are talking about Netint, so Linux, right? Any hint on how can I reproduce the problem described above?

from lpms.

yondonfu avatar yondonfu commented on July 29, 2024

@MikeIndiaAlpha

referred issue was on Windows and here we are talking about Netint, so Linux, right?

Yep that is correct - livepeer/FFmpeg#19 was only a problem on Windows and the error described in this issue was observed on a Linux machine using NETINT.

Any hint on how can I reproduce the problem described above?

Unfortunately I don't have additional reproduction steps as this error was just observed in the logs of a node using NETINT. We can keep an eye out for additional reports of this error and follow up if there are clearer reproduction steps that can be taken.

from lpms.

MikeIndiaAlpha avatar MikeIndiaAlpha commented on July 29, 2024

@yondonfu
Thanks for a clarification. 'high' is likely to be h264 stream profile name, so I'll try to look around for profile setting. Other than that I guess you're right, need to have more.

from lpms.

thomshutt avatar thomshutt commented on July 29, 2024
fname /home/nvme/.lpData/arbitrum-one-mainnet/f3843dd4fef32d3f4a10.tempfile
[h264_ni_enc @ 0x7f6704a44740] [Eval @ 0x7f68c3ffe200] Undefined constant or missing '(' in 'high'
[h264_ni_enc @ 0x7f6704a44740] Unable to parse option value "high"
[h264_ni_enc @ 0x7f6704a44740] Error setting option profile to value high.
ERROR: encoder.c:261] Error opening video encoder : Invalid argument
ERROR: transcoder.c:209] Unable to open output : Invalid argument
E0412 07:48:41.935128   39791 ffmpeg.go:790] Transcoder Return : Invalid argument
E0412 07:48:41.935230   39791 orchestrator.go:555] manifestID=335498b7-3ab3-4042-8e85-ddb19e438078 seqNo=813 orchSessionID=b5d87b17 clientIP=89.187.185.153 sender=0xc3c7c4C8f7061B7d6A72766Eee5359fE4F36e61E Error transcoding segName= err="Invalid argument"
E0412 07:48:41.935472   39791 segment_rpc.go:234] manifestID=335498b7-3ab3-4042-8e85-ddb19e438078 seqNo=813 orchSessionID=b5d87b17 clientIP=89.187.185.153 sender=0xc3c7c4C8f7061B7d6A72766Eee5359fE4F36e61E Could not transcode err="Invalid argument"
E0412 07:48:43.841583   39791 orchestrator.go:178] manifestID=335498b7-3ab3-4042-8e85-ddb19e438078 seqNo=814 orchSessionID=b5d87b17 clientIP=89.187.185.153 sender=0xc3c7c4C8f7061B7d6A72766Eee5359fE4F36e61E Error receiving ticket sessionID=b5d87b17 recipientRandHash=4e05857562430c1edfd11917ee2c52a197a494ae3d8b9305f838d326dd270e1d senderNonce=94: TicketParams expired
E0412 07:48:43.841633   39791 segment_rpc.go:107] manifestID=335498b7-3ab3-4042-8e85-ddb19e438078 seqNo=814 orchSessionID=b5d87b17 clientIP=89.187.185.153 sender=0xc3c7c4C8f7061B7d6A72766Eee5359fE4F36e61E error processing payment: TicketParams expired

This is the latest set of logs - should we add some additional logging of params received and ship a patched version to help diagnose this since it's down in the ffmpeg call, or is there anything useful we can get from finding out the params passed to the binary? @MikeIndiaAlpha @cyberj0g

from lpms.

MikeIndiaAlpha avatar MikeIndiaAlpha commented on July 29, 2024

Looking at the FFmpeg code at that server I can also see that NETINT guys did modify option parser. I think I can check, maybe they introduced some problems there. The question is, where I can find current/latest NETINT ffmpeg changes. Do you happen to know @cyberj0g?

from lpms.

MikeIndiaAlpha avatar MikeIndiaAlpha commented on July 29, 2024

Update:

  • Checked over NETINT changes in the option parser, doesn't seem like this is the problem
  • Had a hunch that maybe option value is the problem. Code complains about "high", while proper profile name is (I think) "High". 'git grep' in ffmpeg sources seem to confirm. So my current theory is that basically the problem is with uppercase vs lowercase 'H'. Digging around to learn more.

from lpms.

MikeIndiaAlpha avatar MikeIndiaAlpha commented on July 29, 2024

It looks like video options are actually set at upper level Golang code (ffmpeg.go function Transcode, which does pretty complex parameters processing before actually calling lpms_transcode). So this would be the best place for printing the options out, as I don't believe they are changed deeper (in the C code)

from lpms.

cyberj0g avatar cyberj0g commented on July 29, 2024

@MikeIndiaAlpha thanks for insights, I tried passing profile as "High" and it didn't work either. Looks like Netint encoder expect profile to be passed differently. I updated transcoding script on the server to make reproducing the error easier, it will always use high profile now:

sudo ./transcoding ~/bbb_265.mp4 P720p25fps16x9 nt 0

And that's how profile is passed through Ffmpeg API:

ret = avcodec_open2(vc, codec, &octx->video->opts);

The AVDictionary will have profile:high in it.

The error:

[h264_ni_enc @ 0x4104540] [Eval @ 0x7fff5d83cd70] Undefined constant or missing '(' in 'high'
[h264_ni_enc @ 0x4104540] Unable to parse option value "high"
[h264_ni_enc @ 0x4104540] Error setting option profile to value high.

from lpms.

xdwq2008 avatar xdwq2008 commented on July 29, 2024

We use "-xcoder-params" to set the FW params on ffmpeg.
You can use below code:
av_opt_set(c->priv_data, "xcoder-params", "xxx", 0);

from lpms.

MikeIndiaAlpha avatar MikeIndiaAlpha commented on July 29, 2024

Not sure if this is relevant, but when going through ffmpeg.go configuration parsing I found out that the "High" profile and "ConstrainedHigh" profile are handled differently. For "High" profile there is special handling for Netint HW and profile is set via xcoderOutParamsStr. For "ConstrainedHigh" default handling is used BUT in videoprofile.go this profile name is changed to "high" as well.

So to sum things up, we have two profiles that look different in the config: High and ConstrainedHigh. Internally they both map to "high" profile name. And then the same name is handled differently on Netint HW: for ConstrainedHigh it is passed as normal encoder options (incorrectly?) and for High profile is passed by xcoderOutParamsStr (correctly?).

What do you think @cyberj0g ?

from lpms.

cyberj0g avatar cyberj0g commented on July 29, 2024

@MikeIndiaAlpha 'constrained high' is 'high' without B-frames, which is how it is configured for Software mode and Nvidia. For Netint, we got clarifications from them, that profile indeed should be passed through xcoderParams structure, which is how it currently implemented for high profile, but we didn't yet get info on how to disable B-frames to make it 'constrained'. So you are right, 'constrained high' is not configured correctly in current version, because we don't know how to do it. Now, it will result in above error and Broadcaster will select a different Orchestrator, which, I think, is better than producing output not as requested.

from lpms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.