{"action":"created","issue":{"url":"https://api.github.com/repos/meetecho/janus-gateway/issues/1189","repository_url":"https://api.github.com/repos/meetecho/janus-gateway","labels_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/1189/labels{/name}","comments_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/1189/comments","events_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/1189/events","html_url":"https://github.com/meetecho/janus-gateway/pull/1189","id":308555019,"number":1189,"title":"WIP: include janus mjr metadata into postprocessed video","user":{"login":"xadhoom","id":197981,"avatar_url":"https://avatars1.githubusercontent.com/u/197981?v=4","gravatar_id":"","url":"https://api.github.com/users/xadhoom","html_url":"https://github.com/xadhoom","followers_url":"https://api.github.com/users/xadhoom/followers","following_url":"https://api.github.com/users/xadhoom/following{/other_user}","gists_url":"https://api.github.com/users/xadhoom/gists{/gist_id}","starred_url":"https://api.github.com/users/xadhoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xadhoom/subscriptions","organizations_url":"https://api.github.com/users/xadhoom/orgs","repos_url":"https://api.github.com/users/xadhoom/repos","events_url":"https://api.github.com/users/xadhoom/events{/privacy}","received_events_url":"https://api.github.com/users/xadhoom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-26T12:40:25Z","updated_at":"2018-03-27T09:00:23Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/meetecho/janus-gateway/pulls/1189","html_url":"https://github.com/meetecho/janus-gateway/pull/1189","diff_url":"https://github.com/meetecho/janus-gateway/pull/1189.diff","patch_url":"https://github.com/meetecho/janus-gateway/pull/1189.patch"},"body":"Opening this PR for discussion, if ok, I'll complete and clean up it before merge.\r\n\r\nProblem:\r\nunder normal circumstances, the joins into a recorded room are not simultaneous, so each stream will start and end at different times.\r\n\r\nWhen you need to postprocess files (play them back in a synced way, pad with blank video at beginning and/or end of the stream), is difficult to get when each stream starts, because janus-pp-rec output is not formatted (ie machine readable) and you don't know when each stream ends.\r\n\r\nSo you have to parse janus-pp-rec output (hoping for no log format changes between releases) to get start and using generated video metadata (using for example ffprobe) to get the duration of each file.\r\n\r\nThankfully, ffprobe output can be formatted in json/xml.\r\n\r\nSo why not add .mjr header into the generated .mp4/webm/whatever metadata? Doing that, and thanks to ffproble parsable output, is possibile to get all informations in one pass.\r\n\r\nThe tag choosen is the `comment`, which seems to be common between all formats.\r\n\r\nIn this PR I've done only for h264, just to experiment a bit.\r\n\r\nIf it is interesting, I'll be happy to complete it for the other containers."},"comment":{"url":"https://api.github.com/repos/meetecho/janus-gateway/issues/comments/376449690","html_url":"https://github.com/meetecho/janus-gateway/pull/1189#issuecomment-376449690","issue_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/1189","id":376449690,"user":{"login":"lminiero","id":3684796,"avatar_url":"https://avatars1.githubusercontent.com/u/3684796?v=4","gravatar_id":"","url":"https://api.github.com/users/lminiero","html_url":"https://github.com/lminiero","followers_url":"https://api.github.com/users/lminiero/followers","following_url":"https://api.github.com/users/lminiero/following{/other_user}","gists_url":"https://api.github.com/users/lminiero/gists{/gist_id}","starred_url":"https://api.github.com/users/lminiero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lminiero/subscriptions","organizations_url":"https://api.github.com/users/lminiero/orgs","repos_url":"https://api.github.com/users/lminiero/repos","events_url":"https://api.github.com/users/lminiero/events{/privacy}","received_events_url":"https://api.github.com/users/lminiero/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T09:00:23Z","updated_at":"2018-03-27T09:00:23Z","author_association":"OWNER","body":"I wasn't aware of this possibility. If it really is common to all formats, and we're sure it won't break compatibility or playout, I'm definitely ok with this :+1: . As a side note, it might be easier to add another option to `janus-pp-rec` to just print the .mjr JSON header to stdout: we already have a `--header` option which parses that header, so another option to just print that and nothing else should be trivial enough."}}
{"actor":{"display_login":"lminiero"}}