{"action":"created","issue":{"url":"https://api.github.com/repos/wireload/screenly-ose/issues/159","labels_url":"https://api.github.com/repos/wireload/screenly-ose/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/wireload/screenly-ose/issues/159/comments","events_url":"https://api.github.com/repos/wireload/screenly-ose/issues/159/events","html_url":"https://github.com/wireload/screenly-ose/issues/159","id":17900078,"number":159,"title":"Add tracking for duration for videos","user":{"login":"vpetersson","id":357664,"avatar_url":"https://avatars.githubusercontent.com/u/357664?v=3","gravatar_id":"","url":"https://api.github.com/users/vpetersson","html_url":"https://github.com/vpetersson","followers_url":"https://api.github.com/users/vpetersson/followers","following_url":"https://api.github.com/users/vpetersson/following{/other_user}","gists_url":"https://api.github.com/users/vpetersson/gists{/gist_id}","starred_url":"https://api.github.com/users/vpetersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpetersson/subscriptions","organizations_url":"https://api.github.com/users/vpetersson/orgs","repos_url":"https://api.github.com/users/vpetersson/repos","events_url":"https://api.github.com/users/vpetersson/events{/privacy}","received_events_url":"https://api.github.com/users/vpetersson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wireload/screenly-ose/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/wireload/screenly-ose/milestones/2","html_url":"https://github.com/wireload/screenly-ose/milestones/Sprint%200","labels_url":"https://api.github.com/repos/wireload/screenly-ose/milestones/2/labels","id":1320511,"number":2,"title":"Sprint 0","description":"Let's give OSE some TLC.","creator":{"login":"vpetersson","id":357664,"avatar_url":"https://avatars.githubusercontent.com/u/357664?v=3","gravatar_id":"","url":"https://api.github.com/users/vpetersson","html_url":"https://github.com/vpetersson","followers_url":"https://api.github.com/users/vpetersson/followers","following_url":"https://api.github.com/users/vpetersson/following{/other_user}","gists_url":"https://api.github.com/users/vpetersson/gists{/gist_id}","starred_url":"https://api.github.com/users/vpetersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpetersson/subscriptions","organizations_url":"https://api.github.com/users/vpetersson/orgs","repos_url":"https://api.github.com/users/vpetersson/repos","events_url":"https://api.github.com/users/vpetersson/events{/privacy}","received_events_url":"https://api.github.com/users/vpetersson/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":4,"state":"open","created_at":"2015-09-23T14:55:30Z","updated_at":"2015-10-05T10:37:45Z","due_on":"2015-10-06T23:00:00Z","closed_at":null},"comments":6,"created_at":"2013-08-10T15:34:16Z","updated_at":"2015-10-05T10:37:45Z","closed_at":"2015-10-05T10:37:45Z","body":"Omxplayer can now print out the duration of a video in a sensible way. We should leverage this. Here's a sample output:\r\n\r\n    pi@pi0 ~ $ omxplayer -i 3eFtiycRHm1u54H0dLNmkXfXm3McZpjT_encoded\r\n    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '3eFtiycRHm1u54H0dLNmkXfXm3McZpjT_encoded':\r\n     Metadata:\r\n       major_brand     : M4V\r\n       minor_version   : 1\r\n       compatible_brands: isomM4V mp42avc1\r\n       creation_time   : 2013-05-05 14:04:26\r\n     Duration: 00:00:15.63, start: 0.000000, bitrate: 2841 kb/s\r\n       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2840 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc\r\n       Metadata:\r\n         creation_time   : 2013-05-05 14:03:54\r\n         handler_name    : GPAC ISO Video Handler\r\n\r\n    have a nice day ;)\r\n\r\nPlease note however that the output might differ from version to version of omxplayer, so we need to wrap it in a try/except.\r\n"},"comment":{"url":"https://api.github.com/repos/wireload/screenly-ose/issues/comments/145491817","html_url":"https://github.com/wireload/screenly-ose/issues/159#issuecomment-145491817","issue_url":"https://api.github.com/repos/wireload/screenly-ose/issues/159","id":145491817,"user":{"login":"vpetersson","id":357664,"avatar_url":"https://avatars.githubusercontent.com/u/357664?v=3","gravatar_id":"","url":"https://api.github.com/users/vpetersson","html_url":"https://github.com/vpetersson","followers_url":"https://api.github.com/users/vpetersson/followers","following_url":"https://api.github.com/users/vpetersson/following{/other_user}","gists_url":"https://api.github.com/users/vpetersson/gists{/gist_id}","starred_url":"https://api.github.com/users/vpetersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpetersson/subscriptions","organizations_url":"https://api.github.com/users/vpetersson/orgs","repos_url":"https://api.github.com/users/vpetersson/repos","events_url":"https://api.github.com/users/vpetersson/events{/privacy}","received_events_url":"https://api.github.com/users/vpetersson/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T10:37:45Z","updated_at":"2015-10-05T10:37:45Z","body":"As @over64 correctly pointed out. This is already implemented [here](https://github.com/wireload/screenly-ose/blob/master/utils.py#L54)."}}