{"action":"created","issue":{"url":"https://api.github.com/repos/jlaine/aiortc/issues/88","repository_url":"https://api.github.com/repos/jlaine/aiortc","labels_url":"https://api.github.com/repos/jlaine/aiortc/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/jlaine/aiortc/issues/88/comments","events_url":"https://api.github.com/repos/jlaine/aiortc/issues/88/events","html_url":"https://github.com/jlaine/aiortc/issues/88","id":374725018,"node_id":"MDU6SXNzdWUzNzQ3MjUwMTg=","number":88,"title":"rtp forwarding","user":{"login":"sbeneduce","id":19761501,"node_id":"MDQ6VXNlcjE5NzYxNTAx","avatar_url":"https://avatars0.githubusercontent.com/u/19761501?v=4","gravatar_id":"","url":"https://api.github.com/users/sbeneduce","html_url":"https://github.com/sbeneduce","followers_url":"https://api.github.com/users/sbeneduce/followers","following_url":"https://api.github.com/users/sbeneduce/following{/other_user}","gists_url":"https://api.github.com/users/sbeneduce/gists{/gist_id}","starred_url":"https://api.github.com/users/sbeneduce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbeneduce/subscriptions","organizations_url":"https://api.github.com/users/sbeneduce/orgs","repos_url":"https://api.github.com/users/sbeneduce/repos","events_url":"https://api.github.com/users/sbeneduce/events{/privacy}","received_events_url":"https://api.github.com/users/sbeneduce/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-28T07:14:10Z","updated_at":"2018-10-28T14:18:11Z","closed_at":null,"author_association":"NONE","body":"#Can i forward rtp to ffmpeg or gstreamer?\r\n\r\ni think i need to extend _handle_rtp_packet method of class RTCRtpReceiver:\r\n\r\nwhen i reach this point:\r\n\r\nline 362 \r\nif we have a complete encoded frame, decode it\r\n\t            if encoded_frame is not None and self.__decoder_thread:\r\n\t                encoded_frame.timestamp = self.__timestamp_mapper.map(encoded_frame.timestamp)\r\n\t                self.__decoder_queue.put((codec, encoded_frame))\r\n\r\ni decode the frame\r\nline 40\r\n \t        for frame in decoder.decode(encoded_frame):\r\n\t            # pass the decoded frame to the track\r\n\t            asyncio.run_coroutine_threadsafe(output_q.put(frame), loop)\r\n\r\ninstead that passing to the track, i need to pass it to ffmpeg or gstreamer ... but how?\r\n\r\nit would be great to have player, writer and also streamer class\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jlaine/aiortc/issues/comments/433709470","html_url":"https://github.com/jlaine/aiortc/issues/88#issuecomment-433709470","issue_url":"https://api.github.com/repos/jlaine/aiortc/issues/88","id":433709470,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzcwOTQ3MA==","user":{"login":"sbeneduce","id":19761501,"node_id":"MDQ6VXNlcjE5NzYxNTAx","avatar_url":"https://avatars0.githubusercontent.com/u/19761501?v=4","gravatar_id":"","url":"https://api.github.com/users/sbeneduce","html_url":"https://github.com/sbeneduce","followers_url":"https://api.github.com/users/sbeneduce/followers","following_url":"https://api.github.com/users/sbeneduce/following{/other_user}","gists_url":"https://api.github.com/users/sbeneduce/gists{/gist_id}","starred_url":"https://api.github.com/users/sbeneduce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbeneduce/subscriptions","organizations_url":"https://api.github.com/users/sbeneduce/orgs","repos_url":"https://api.github.com/users/sbeneduce/repos","events_url":"https://api.github.com/users/sbeneduce/events{/privacy}","received_events_url":"https://api.github.com/users/sbeneduce/received_events","type":"User","site_admin":false},"created_at":"2018-10-28T14:18:11Z","updated_at":"2018-10-28T14:18:11Z","author_association":"NONE","body":"Mediarecorder is based on pyav tha has one method av.open an it can just read or write files. It is not a full ffmpeg wrapper (i was thinking on how to swap pyav with ffmpy)\r\n\r\nclass MediaRecorder:\r\n    \"\"\"\r\n    A media sink that writes audio and/or video to a file.\r\n    Examples:\r\n    .. code-block:: python\r\n        # Write to a video file.\r\n        player = MediaRecorder('/path/to/file.mp4')\r\n        # Write to a set of images.\r\n        player = MediaRecorder('/path/to/file-%3d.png')\r\n    :param: file: The path to a file, or a file-like object.\r\n    :param: format: The format to use, defaults to autodect.\r\n    :param: options: Additional options to pass to FFmpeg.\r\n    \"\"\"\r\n    def __init__(self, file, format=None, options={}):\r\n        self.__container = av.open(file=file, format=format, mode='w', options=options)\r\n        self.__tracks = {}\r\n\r\nI cannot use it. If i am wrong can you pos a sample that streams to a youtube endpoint?\r\n\r\nThanks"}}
{"actor":{"display_login":"sbeneduce"}}