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

Add missing option - filter_args? #126

Merged
merged 1 commit into from Mar 22, 2021

Conversation

olekenneth
Copy link
Contributor

@olekenneth olekenneth commented Mar 19, 2021

I try to rotate my camera image, but when I set filter_args I don't see them end up in the generated ffmpeg command.

My config:

cameras:
  - name: Ute
    mqtt_name: ute
    host: 192.168.0.*
    port: 554
    username: **
    password: "**"
    path: '/h264'
    width: 2592
    height: 1944
    fps: 5
    publish_image: true
    filter_args:
      - "-vf"
      - "rotate=45*PI/180"

Output from the log:

[2021-03-19 21:44:35] [lib.camera.ute          ] [DEBUG   ] - FFMPEG decoder command: ffmpeg -hide_banner -loglevel fatal -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -stimeout 5000000 -use_wallclock_as_timestamps 1 -vsync 0 -c:v h264_cuvid -rtsp_transport tcp -i rtsp://*..*@192.168.0.*:554/h264 -f segment -segment_time 5 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /segments/Ute/%Y%m%d%H%M%S.mp4 -f rawvideo -pix_fmt nv12 pipe:1

@roflcoopter
Copy link
Owner

Thanks!
Closes #123

@roflcoopter roflcoopter linked an issue Mar 22, 2021 that may be closed by this pull request
@roflcoopter roflcoopter merged commit 3b89096 into roflcoopter:master Mar 22, 2021
@roflcoopter
Copy link
Owner

Re-building the containers, they will be on Docker Hub soon

@olekenneth
Copy link
Contributor Author

Did you test the PR? Because I didn't. Sorry! I should have started with that... 🤦

@olekenneth
Copy link
Contributor Author

olekenneth commented Mar 22, 2021

Pulled the image now and it looks like it's adding the param.

ffmpeg -hide_banner -loglevel fatal -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -stimeout 5000000 -use_wallclock_as_timestamps 1 -vsync 0 -c:v h264_cuvid -rtsp_transport tcp -i rtsp://admin:**@192.168.0.*:554/h264?username=admin&password=** -f segment -segment_time 5 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /segments/Ute/%Y%m%d%H%M%S.mp4 -vf "transpose=1" -f rawvideo -pix_fmt nv12 pipe:1
Still haven't got the image rotated, but I guess I need to tweak the params I'm sending. If you know how, please let me know.

But I have it running in a VM with 175GB disk and it wasn't possible upgrading unless I completely removed the current image.
Before and after pulling the image and starting the container:

root@debian:~# df -h
Filesystem                    Size  Used Avail Use% Mounted on
rpool/data/subvol-104-disk-0  175G   19G  157G  11% /

root@debian:~# df -h
Filesystem                    Size  Used Avail Use% Mounted on
rpool/data/subvol-104-disk-0  175G  142G   34G  81% /

@olekenneth
Copy link
Contributor Author

If you can help with the ffmpeg-command for rotating the image? I'm on Discord with the same username as here.

@roflcoopter
Copy link
Owner

A PR isnt really the place to discuss this but, do you want the image in Home Assistant rotated, or the recording? Or both?

@olekenneth olekenneth deleted the patch-1 branch November 20, 2021 19:56
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.

filter_args ignored?
2 participants