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

NSOSStatusErrorDomain with only some mp4 files #2450

Open
acheong08 opened this issue Jul 21, 2024 · 1 comment
Open

NSOSStatusErrorDomain with only some mp4 files #2450

acheong08 opened this issue Jul 21, 2024 · 1 comment
Labels
airplay AirPlay related issue bug

Comments

@acheong08
Copy link

acheong08 commented Jul 21, 2024

Describe the bug

out.mp4:  ISO Media, MP4 v2 [ISO 14496-14]
out1.mp4: ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]
out2.mp4: ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]
out3.mp4: ISO Media, MP4 v2 [ISO 14496-14]

This works:
out.mp4: http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

These don't:
out[1-3].mp4 wf-recorder -f out1.mp4

All of them play just fine on my laptop so I have no idea what's causing the issue:

Error log

Traceback (most recent call last):
  File "/home/acheong/Projects/airplay/main.py", line 100, in <module>
    asyncio.run(main())
  File "/usr/lib64/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/acheong/Projects/airplay/main.py", line 67, in main
    await airplay.stream.play_url(os.path.join(pwd, path))
  File "/home/acheong/.local/lib/python3.12/site-packages/pyatv/core/facade.py", line 357, in play_url
    await self.relay("play_url")(url, **kwargs)
  File "/home/acheong/.local/lib/python3.12/site-packages/pyatv/protocols/airplay/__init__.py", line 136, in play_url
    return await self._play_task
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/acheong/.local/lib/python3.12/site-packages/pyatv/protocols/airplay/player.py", line 68, in play_url
    await self._wait_for_media_to_end()
  File "/home/acheong/.local/lib/python3.12/site-packages/pyatv/protocols/airplay/player.py", line 101, in _wait_for_media_to_end
    raise exceptions.PlaybackError(
pyatv.exceptions.PlaybackError: got error -6707 (NSOSStatusErrorDomain) when playing video
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f37de748410>

How to reproduce the bug?

  1. wf-recorder -f out1.mp4
  2. Optional: ffmpeg -i out1.mp4 -brand mp42 out3.mp4 (to get it into the same format)

What is expected behavior?

Stream properly

Operating System

Linux

Python

3.11

pyatv

0.14.5

Device

MacOS Sonoma

Additional context

Pass the video through Handbrake and it works properly

@acheong08 acheong08 added the bug label Jul 21, 2024
@postlund
Copy link
Owner

The Apple TV is very picky when it comes to correct format, so I guess something is wrong. It gives more or less no indication of what is wrong unfortunately (other than that error message you get), so it's hard to tell. Can you boost the files somewhere so that I can try them out?

@postlund postlund added the airplay AirPlay related issue label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airplay AirPlay related issue bug
Projects
None yet
Development

No branches or pull requests

2 participants