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

Ability to set different codec for restream and use go2rtc hardware #4876

Merged
merged 6 commits into from
Jan 4, 2023

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Jan 3, 2023

No description provided.

@netlify
Copy link

netlify bot commented Jan 3, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit f5a91b1
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/63b4922585e444000899ce84

@NickM-27 NickM-27 mentioned this pull request Jan 3, 2023
25 tasks
@blakeblackshear blakeblackshear merged commit ea7d1aa into blakeblackshear:dev Jan 4, 2023
@banthungprong
Copy link
Contributor

Thanks!
But I think the problem starts "earlier".
I reduced my setup to only one mjpeg camera and checked the last version of the docker images that worked:
image: ghcr.io/blakeblackshear/frigate:dev-3f05f74

With the version 4 days ago I get only a green screen (no errors in the logs).
image: ghcr.io/blakeblackshear/frigate:dev-59b52f3

Is it possible that the switch to hw presets changed something that doesn't work for mjpeg streams?

cameras:
  mjpeg:
    enabled: True
    ffmpeg:
      inputs:
        - path: http://10.0.0.142/mjpeg/1
          roles:
            - detect
            - record
      input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -c:v mjp>
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
    detect:
      width: 800
      height: 600
      fps: 10
    record:
      enabled: True

@NickM-27 NickM-27 deleted the restream-codec branch January 4, 2023 12:57
@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Jan 4, 2023

It wouldn't make sense to have no error logs though, also I don't see what hwaccel you're using, it's possible that the -vf filter doesn't work for mjpeg but I'd need to see more of the config to understand the issue

@banthungprong
Copy link
Contributor

No errors in the logs would be ok if a "green" video isn't an error.

ffmpeg:
  global_args: -hide_banner -loglevel error
  hwaccel_args: preset-intel-vaapi
  input_args: preset-rtsp-generic
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
    record: preset-record-generic

@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Jan 4, 2023

For mjpeg cameras I'd suggest setting the hwaccel args manually and see if that works. Otherwise you can just use the restream from this PR to transcode the mjpeg stream to h264 and then use that as the source for detect and record

@banthungprong
Copy link
Contributor

I did this before (you told me in another thread to use presets...). Same, same.
And I tried restreaming and transcoding h264 and using the rtsp-Url for detect and record. Didn't work.

@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Jan 4, 2023

I did this before (you told me in another thread to use presets...). Same, same. And I tried restreaming and transcoding h264 and using the rtsp-Url for detect and record. Didn't work.

are you using the latest dev image? I'll have to see if I can put together an mjpeg stream to test, too much information to ask for to figure out what the problem is

@banthungprong
Copy link
Contributor

Yes. Latest dev image. But not problem, mjpeg isn't so important (using an esp32cam with a printed case as door spy).
So please do not invest too much time - low prio.
With my h265-cams everything is working without any problems - that's relevant. I will move the frigate HW to Thailand in the summer: until now I have 5 cams in Thailand and the frigate NVR in Germany. Even with this strange configuration frigate is working flawless!

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

Successfully merging this pull request may close these issues.

None yet

3 participants