Skip to content

Instantly share code, notes, and snippets.

@pardo-bsso
Created February 24, 2014 22:31
Show Gist options
  • Select an option

  • Save pardo-bsso/9198673 to your computer and use it in GitHub Desktop.

Select an option

Save pardo-bsso/9198673 to your computer and use it in GitHub Desktop.
Sample mongo db to test the Patero UI on Caspa.
/** transcode_queue indexes **/
db.getCollection("transcode_queue").ensureIndex({
"_id": NumberInt(1)
},[
]);
/** transcode_queue records **/
db.getCollection("transcode_queue").insert({
"_id": "2767a86a-8520-4bd0-b394-cdb68bf21da6",
"filename": "El que falla",
"input": {
"path": "\/media\/datos\/compartida\/patero\/incoming\/XXã.flv",
"stat": {
"size": NumberLong(874810),
"blocks": NumberInt(1712),
"ctime": 1392051430.9606,
"rdev": NumberInt(0),
"dev": NumberLong(2054),
"nlink": NumberInt(1),
"gid": NumberInt(1000),
"blksize": NumberInt(4096),
"mtime": 1392051430.9606,
"uid": NumberInt(1000),
"atime": 1392051430.9566,
"ino": NumberLong(19667872),
"mode": NumberInt(33188)
}
},
"output": {
"files": [
"\/media\/datos\/compartida\/patero\/processed\/XXã.m4v",
"\/media\/datos\/compartida\/patero\/processed\/432fe282d42af0455006787d4ee0b4fe.mp4",
"\/media\/datos\/compartida\/patero\/processed\/432fe282d42af0455006787d4ee0b4fe.jpg"
],
"checksum": "432fe282d42af0455006787d4ee0b4fe",
"stat": {
"size": NumberLong(504216),
"blocks": NumberInt(992),
"ctime": 1392051438.9407,
"rdev": NumberInt(0),
"dev": NumberLong(2054),
"nlink": NumberInt(1),
"gid": NumberInt(1000),
"blksize": NumberInt(4096),
"mtime": 1392051438.9407,
"uid": NumberInt(1000),
"atime": 1392051439.1047,
"ino": NumberLong(19667872),
"mode": NumberInt(33188)
},
"transcoded": "\/media\/datos\/compartida\/patero\/processed\/XXã.m4v",
"metadata": {
"video": {
"container": "mov",
"fps": 24,
"resolution": {
"h": NumberInt(480),
"w": NumberInt(640)
},
"pixelString": "1:1",
"codec": "h264",
"aspect": 1.3333333333333,
"resolutionSquare": {
"h": NumberInt(480),
"w": 640
},
"bitrate": NumberInt(665741),
"pixel": 1,
"aspectString": "4:3"
},
"synched": true,
"durationraw": "00:00:06.06",
"audio": {
"channels": "stereo",
"codec": "aac",
"sample_rate": NumberInt(48000)
},
"type": "video",
"durationsec": 6.059
}
},
"progress": NumberInt(0),
"stage": "processing-error",
"tasks": [
{
"status": "done",
"message": "",
"name": "Normalizing audio"
},
{
"status": "done",
"message": "",
"name": "Transcoding video"
},
{
"status": "done",
"message": "",
"name": "Calculating checksum"
},
{
"status": "done",
"message": "",
"name": "Making filmstrip video"
},
{
"status": "done",
"message": "",
"name": "Extracting metadata"
},
{
"status": "done",
"message": "",
"name": "Making thumbnail"
}
]
});
db.getCollection("transcode_queue").insert({
"_id": "4daeab66-9316-409c-a875-61724c8c156c",
"filename": "XXã.flv",
"input": {
"path": "\/media\/datos\/compartida\/patero\/incoming\/XXã.flv",
"stat": {
"blocks": NumberInt(1712),
"ctime": 1392051455.3648,
"rdev": NumberInt(0),
"dev": NumberLong(2054),
"mode": NumberInt(33188),
"nlink": NumberInt(1),
"blksize": NumberInt(4096),
"mtime": 1392051455.3648,
"uid": NumberInt(1000),
"gid": NumberInt(1000),
"atime": 1392051455.3608,
"ino": NumberLong(19667872),
"size": NumberLong(874810)
}
},
"output": {
"files": [
"\/media\/datos\/compartida\/patero\/processed\/XXã.m4v",
"\/media\/datos\/compartida\/patero\/processed\/432fe282d42af0455006787d4ee0b4fe.mp4",
"\/media\/datos\/compartida\/patero\/processed\/432fe282d42af0455006787d4ee0b4fe.jpg"
],
"checksum": "432fe282d42af0455006787d4ee0b4fe",
"stat": {
"size": NumberLong(504216),
"blocks": NumberInt(992),
"ctime": 1392051467.6568,
"rdev": NumberInt(0),
"dev": NumberLong(2054),
"nlink": NumberInt(1),
"gid": NumberInt(1000),
"blksize": NumberInt(4096),
"mtime": 1392051467.6568,
"uid": NumberInt(1000),
"atime": 1392051467.7528,
"ino": NumberLong(19667872),
"mode": NumberInt(33188)
},
"transcoded": "\/media\/datos\/compartida\/patero\/processed\/XXã.m4v",
"metadata": {
"video": {
"container": "mov",
"fps": 24,
"resolution": {
"h": NumberInt(480),
"w": NumberInt(640)
},
"pixelString": "1:1",
"codec": "h264",
"aspect": 1.3333333333333,
"resolutionSquare": {
"h": NumberInt(480),
"w": 640
},
"bitrate": NumberInt(665741),
"pixel": 1,
"aspectString": "4:3"
},
"synched": true,
"durationraw": "00:00:06.06",
"audio": {
"channels": "stereo",
"codec": "aac",
"sample_rate": NumberInt(48000)
},
"type": "video",
"durationsec": 6.059
}
},
"progress": NumberInt(0),
"stage": "queued",
"tasks": [
{
"status": "done",
"message": "",
"name": "Normalizing audio"
},
{
"status": "done",
"message": "",
"name": "Transcoding video"
},
{
"status": "done",
"message": "",
"name": "Calculating checksum"
},
{
"status": "done",
"message": "",
"name": "Making filmstrip video"
},
{
"status": "done",
"message": "",
"name": "Extracting metadata"
},
{
"status": "done",
"message": "",
"name": "Making thumbnail"
}
]
});
db.getCollection("transcode_queue").insert({
"_id": "5d888bc2-d998-4e21-ba15-e4762c2c9bb9",
"tasks": [
{
"status": "processing",
"message": "",
"name": "Normalizing audio"
}
],
"filename": "Amanda_Palmer_&_The_Young_Punx_-__Map_of_Tasmania__8ft__Records-rcoreV10hI8.mp4",
"progress": 50,
"input": {
"path": "\/media\/datos\/compartida\/patero\/incoming\/Amanda_Palmer_&_The_Young_Punx_-__Map_of_Tasmania__8ft__Records-rcoreV10hI8.mp4",
"stat": {
"size": NumberLong(14753192),
"blocks": NumberInt(28816),
"ctime": 1393268958.3814,
"rdev": NumberInt(0),
"dev": NumberLong(2054),
"nlink": NumberInt(1),
"gid": NumberInt(1000),
"blksize": NumberInt(4096),
"mtime": 1393268958.3814,
"uid": NumberInt(1000),
"atime": 1393268958.1454,
"ino": NumberLong(19667872),
"mode": NumberInt(33188)
}
},
"output": {
"files": [
],
"checksum": "",
"metadata": {
"type": "video"
}
},
"stage": "processing"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment