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

BUG: Recording Playback Issues #1319

Open
g-stick opened this issue Aug 10, 2024 · 10 comments
Open

BUG: Recording Playback Issues #1319

g-stick opened this issue Aug 10, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@g-stick
Copy link

g-stick commented Aug 10, 2024

Describe the bug

When attempting to playback on windows, the media player fails to play the audio, there's a pop up saying "we can't play the audio for xxxx-xx-xx_xx-xx-xx. It's encoded in ipcm format which isn't supported. You can still watch the video".
The video plays however I am unable to seek forward or backwards.

When I try to use VLC media player, it takes some time to "parse the file" before playback begins. It is able to play the video and audio, and seek works, h
ipcm
owever it is not very responsive.

Affected Bridge Version

v2.10.1

Bridge type

Docker Run/Compose

Affected Camera(s)

No response

Affected Camera Firmware

No response

docker-compose or config (if applicable)

wyze-bridge:
    <<: *common-keys-core
    container_name: wyze-bridge
    restart: unless-stopped
    image: mrlt8/wyze-bridge:latest
    ports:
      - 1935:1935 # RTMP
      - 8554:8554 # RTSP
      - 8888:8888 # HLS
      - 8889:8889 #WebRTC
      - 8189:8189/udp # WebRTC/ICE
      - 5000:5000 # WEB-UI
    environment:
      <<: *default-tz-puid-pgid
      # [OPTIONAL] (Can be set in the WebUI):
      WYZE_EMAIL: $WYZE_EMAIL
      WYZE_PASSWORD: $WYZE_PASSWORD
      API_ID: $WYZE_KEY_ID
      API_KEY: $WYZE_API_KEY
      WB_IP: 192.168.2.115
      ENABLE_AUDIO: True
      RECORD_ALL: True
      RECORD_LENGTH: 300s
#      RECORD_KEEP: 672h
    volumes:
      - $VAULT/record:/record/
@g-stick g-stick added the bug Something isn't working label Aug 10, 2024
@mrlt8
Copy link
Owner

mrlt8 commented Aug 10, 2024

Different cameras versions use different audio codecs. You can force a different audio codec like libopus or aac but keep in mind that different streaming formats may have limited support for some codecs.

VLC will buffer the RTSP stream so that's probably why it takes a while to load, but you can go into the advanced settings to reduce the buffer.

As for seeking, it's probably based on the media player's cache/buffer as livestreams are usually meant to playback at the edge.

@g-stick
Copy link
Author

g-stick commented Aug 10, 2024

Apologies, I should have been more specific. It isn't the livestream playback that I am having issues with. Rather It is the recorded stream. I have been using the docker version for more than a year now, records onto a HDD and plays back without issues. However with the new version, playback of the recorded stream is now having the listed issues. The older files playback properly as expected.

@dhuang083
Copy link

Apologies, I should have been more specific. It isn't the livestream playback that I am having issues with. Rather It is the recorded stream. I have been using the docker version for more than a year now, records onto a HDD and plays back without issues. However with the new version, playback of the recorded stream is now having the listed issues. The older files playback properly as expected.

Same issue here. I tried 2.10.1 for a day and had to roll back to 2.9.10. There seemed to be something fundamentally different in the codec or formatting or something else, that messed up the timeline when I tried to play on mobile devices and TVs. Perhaps that could be fixed by applying a custom ffmpeg command but I have not figured it out yet...

@mrlt8
Copy link
Owner

mrlt8 commented Aug 11, 2024

Unfortunately, this is probably because we switched from recording the streams directly from the camera to having mediaMTX do the recording from the RTSP stream.

Will need to look into this further.

@mrlt8 mrlt8 changed the title BUG: Playback Issues BUG: Recording Playback Issues Aug 16, 2024
@mrlt8
Copy link
Owner

mrlt8 commented Aug 16, 2024

Could you try changing the audio codec?

    environment:
        ....
        - AUDIO_CODEC=libopus

@mrlt8
Copy link
Owner

mrlt8 commented Aug 19, 2024

Has anyone been able to test out if AUDIO_CODEC=libopus helps fix the issue? @g-stick @dhuang083

We could try setting the default audio codec to libopus if that works.

@dhuang083
Copy link

Has anyone been able to test out if AUDIO_CODEC=libopus helps fix the issue? @g-stick @dhuang083

We could try setting the default audio codec to libopus if that works.

Sorry, I rolled back to 2.9.12 for stability and playback. I am planning on deploying a secondary NAS and can possibly test there.

@g-stick
Copy link
Author

g-stick commented Aug 20, 2024

Adding the audio codec fixed the error message, however the recorded file is till a little wonky.
Playing the file with VLC, it takes a about 10 or more seconds for playback to commence, however one can skip and search the video. With Other media players, searching and skipping is not possible.
Also the videos are set to have a length of 300secs.
It's almost like the files are not finalized correctly

@dhuang083
Copy link

Actually the other thing I liked about 2.9.x version was the automated sectioning when I set it to record 2hrs. The system would start a file every 2hrs according to the clock time instead of actually going by the video length. That made the recording organization much easier. @mrlt8

@mrlt8
Copy link
Owner

mrlt8 commented Aug 25, 2024

I noticed that as well. Unfortunately, v2.10+ is using mediaMTX to do all the recording, so we have limited control and may have to revert back to the old style of recording to fix some of these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants