Add audio to stream (#38846)
* Add audio to stream component * Use container options to do most fmp4 formatting * Add test for treatment of different audio inputs * Add test for treatment of different audio inputs * pcm_mulaw frames should be s16 * Use seek to get BytesIO length * Remove unused utcnow * Remove peek_next_audio_pts * only demux audio and video packets - ignoring data and subtitle streams Co-authored-by: Jason Hunter <hunterjm@gmail.com>
This commit is contained in:
1 parent
b0974d89a6
commit
dc2d0b9297
8 files changed
+287
-196
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import asyncio
|
||||
from collections import deque
|
||||
import io
|
||||
from typing import Any, List
|
||||
from typing import Any, Callable, List
|
||||
|
||||
from aiohttp import web
|
||||
import attr
|
||||
@@ -34,7 +34,6 @@ class Segment:
|
||||
sequence: int = attr.ib()
|
||||
segment: io.BytesIO = attr.ib()
|
||||
duration: float = attr.ib()
|
||||
start_pts: tuple = attr.ib()
|
||||
|
||||
|
||||
class StreamOutput:
|
||||
@@ -61,8 +60,8 @@ class StreamOutput:
|
||||
return None
|
||||
|
||||
@property
|
||||
def audio_codec(self) -> str:
|
||||
"""Return desired audio codec."""
|
||||
def audio_codecs(self) -> str:
|
||||
"""Return desired audio codecs."""
|
||||
return None
|
||||
|
||||
@property
|
||||
@@ -71,8 +70,8 @@ class StreamOutput:
|
||||
return None
|
||||
|
||||
@property
|
||||
def container_options(self) -> dict:
|
||||
"""Return container options."""
|
||||
def container_options(self) -> Callable[[int], dict]:
|
||||
"""Return Callable which takes a sequence number and returns container options."""
|
||||
return None
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user