I hereby claim:
- I am flavioribeiro on github.
- I am flavioribeiro (https://keybase.io/flavioribeiro) on keybase.
- I have a public key whose fingerprint is EA32 99D7 7C74 8AD3 1AE0 FAF3 1BD4 9652 8275 5AD1
To claim this, I am signing this object:
| diff --git db/redis/storage/redis.go db/redis/storage/redis.go | |
| index 37a124e..70229bc 100644 | |
| --- db/redis/storage/redis.go | |
| +++ db/redis/storage/redis.go | |
| @@ -106,6 +106,36 @@ func (s *Storage) FieldMap(hash interface{}) (map[string]string, error) { | |
| } | |
| } | |
| +func (s *Storage) sliceToFieldList(field reflect.StructField, value reflect.Value, prefixes ...string) (map[string]string, error) { | |
| + fields := make(map[string]string) |
| General;{"preset": {"container":"%Format%", "rateControl":"%OverallBitRate_Mode%", | |
| Video; "video": {"profile": "%Format_Profile%", "height": "%Height%", "width": "%Width%", "codec": "%CodecID%", "bitrate": "%BitRate%","gopSize": "%Format_Settings_GOP%", "interlaceMode": "%ScanType%"}, | |
| Audio; "audio": {"codec": "%Format%", "bitrate": "%BitRate%"}}} | |
| General;{"preset": {"container":"%Format%", "rateControl":"%OverallBitRate_Mode%", | |
| Video; "video": {"format": "%Format_Profile%", "height": "%Height%", "width": "%Width%", "codec": "%CodecID%", "bitrate": "%BitRate%","gopSize": "%Format_Settings_GOP%", "interlaceMode": "%ScanType%"}, | |
| Audio; "audio": {"codec": "%Format%", "bitrate": "%BitRate%"}}} | |
| diff --git provider/zencoder/zencoder.go provider/zencoder/zencoder.go | |
| index d1b0daa..2ff8060 100644 | |
| --- provider/zencoder/zencoder.go | |
| +++ provider/zencoder/zencoder.go | |
| @@ -78,42 +78,49 @@ func (z *zencoderProvider) buildOutputs(transcodeProfile provider.TranscodeProfi | |
| return nil, fmt.Errorf("Error getting localpreset: %s", err.Error()) | |
| } | |
| localPresetStruct := localPresetOutput.(*db.LocalPreset) | |
| - preset := localPresetStruct.Preset | |
| - zencoderOutput := zencoder.OutputSettings{ |
| {"jobId":"260c3922-fe08-4ad5-8cb7-84a770297ed8","externalId":"51118","metadata":{"createDate":"2016-09-08 12:38:42.0","externalID":"51118","is360":false,"outputs":[{"fileName":"","preset":"reencode_1080p_hls"},{"fileName":"","preset":"reencode_240p_hls"},{"fileName":"","preset":"reencode_360p_hls"},{"fileName":"","preset":"reencode_480p_hls"},{"fileName":"","preset":"reencode_720p_hls"},{"fileName":"","preset":"reencode_1080p_mp4"},{"fileName":"","preset":"reencode_144p_mp4"},{"fileName":"","preset":"reencode_240p_mp4"},{"fileName":"","preset":"reencode_360p_mp4"},{"fileName":"","preset":"reencode_480p_mp4"},{"fileName":"","preset":"reencode_720p_mp4"},{"fileName":"","preset":"reencode_240p_webm"},{"fileName":"","preset":"reencode_360p_webm"},{"fileName":"","preset":"reencode_480p_webm"},{"fileName":"","preset":"reencode_720p_webm"}],"scoopId":"100000004528098","slug":"qa-video-test"},"createdAt":"2016-09-23T16:47:30.189Z","lastStatus":{"stage":"Distribution","stageJobId":"4e65b9a642bdbdb5af7380ce6cfbbecd","s |
| import requests | |
| import json | |
| from datetime import datetime | |
| NYT_API = "http://nytimes.com/svc/video/api/v2/video/" | |
| MEDIA_FACTORY_API = "http://media-factory.stg.nyt.net" | |
| PRESETS = ["1080p_hls", "720p_hls", "480p_hls", "360p_hls", "240p_hls"] | |
| def get_creation_date(hls_rendition): | |
| parts = hls_rendition.split("/") |
| { | |
| "audio": null, | |
| "base_url": "../", | |
| "clip_id": 179197689, | |
| "video": [ | |
| { | |
| "avg_bitrate": 412000, | |
| "base_url": "584417696/chop/", | |
| "bitrate": 563000, | |
| "channels": 2, |
| { | |
| "jobId": "ba4bd5fc-ed20-4b1e-91f1-783fc8aa7816", | |
| "externalId": "50241", | |
| "timestamp": "2016-08-08T19:49:11.436862Z", | |
| "metadata": { | |
| "slug": "test-scoop2sl-5", | |
| "more_stuff_here": "random_data" | |
| }, | |
| "renditions": [ | |
| { |
I hereby claim:
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Evaporate Example</title> | |
| <style> | |
| #progressbar { | |
| margin: 20px; | |
| width: 400px; |