GCRC / nunaliit

Nunaliit Atlas Framework
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

Optimal size for media files visible to northern communities #298

Closed rduerr closed 9 years ago

rduerr commented 9 years ago

I have a client who has several long video interviews that they would like to load into a Nunaliit map. These should be visible/playable by members in the Alaska villages where they were recorded. The videos as recorded are in excess of 2 GB in size. I note that even a 32 MB file takes a significant amount of time to upload and process and it isn't clear what to set as a reasonable size limit for media files. Are there any best practices for that? What would you suggest we set the size limit to (and ask our client to reduce/chunk the videos to)?

ahayes commented 9 years ago

Hi Ruth. The situation up north is quite variable these days. The best way to figure it out involves testing in/with the community. Can you provide some more details on the existing videos?

What codec, bitrate, resolution, and container are they using? (For example, H.264 codec, 250kpbs, 620x480, mp4) And how long are the clips?

The multimedia.properties file has a bunch of settings for the encoder used by Nunaliit. If the resolution of the video coming in is smaller or equal to the resolution specified, and the codec and bitrate are the same, then it may not need to transform and will skip that step. If it is larger, then the transformation could take a long time, possibly as much as double the runtime of the video, and that happens after the upload (but only happens once). Generally you only want to transcode the original video to a compressed version in one step to avoid multiple generations of compression. So if you can't feed Nunaliit a compressed file that skips that step, then it is best to feed it the best version you can, regardless of size, and let is convert.

Nunaliit should keep the original files on disk (but not in couchdb) by default. You can then modify the multimedia.properties and re-submit the media via an option in Nunaliit's data modification tool to cause it to re-evaluate the original, re-process as necessary, and replace the version in couchdb. This may result in all the videos being transcoded again, so leave yourself some time.

rduerr commented 9 years ago

Hi Amos,

Actually there are several types of videos and several will need preprocessing of some sort since they were acquired with the camera rotated, so need to be rotated so that the images appear right side up. Here are some specs for a few of them? They can be as much as an hour or more long and sometimes as large as 3-4 GB.

Ruth

Stream: Kotlik_Liz_Josie.MTS Path: ~/Documents/Work Documents/Dropbox/Projects-active/SNOWY/Kotlik_KOT_17_20Feb2014/Kotlik_Video18Feb2014/Kotlik_Liz_Josie.MTS Type: MPEG transport stream

Duration: 0:24:36 Data Size: 1.64 GB Bit Rate: 9.56 Mbps

Video Tracks: 4113 AVC, 64 ? 544

Audio Tracks: 4352 AC3 2/0, 48 kHz, 256 kbps

Stream Files: Kotlik_Liz_Josie.MTS (1.64 GB)


Stream: Clement_Matthias1.mp4 Path: ~/Documents/Work Documents/Dropbox/Projects-active/SNOWY/Kotlik_KOT_17_20Feb2014/FlipCamera_Interviews_17Feb2014/Clement_Matthias1.mp4

Duration: 0:44:30 Data Size: 2.81 GB Bit Rate: 9.03 Mbps

Video Tracks: AVC Coding, 1280 ? 720, 30 fps, 8.90 Mbps

Audio Tracks: MPEG-4 Audio stereo, 44.1 kHz, 131 kbps

Stream Files: Clement_Matthias1.mp4 (2.81 GB)


Stream: GP010012.MP4 Path: ~/Documents/Work Documents/Dropbox/Projects-active/SNOWY/Kotlik_KOT_17_20Feb2014/Kotlik_Video18Feb2014/GoPro_SnowMachineTrip/776GOPRO/GP010012.MP4

Duration: 0:21:05 Data Size: 1.86 GB Bit Rate: 12.61 Mbps

Video Tracks: GoPro AVC encoder, 1280 ? 960, 29.97 fps, 12.48 Mbps

Audio Tracks: MPEG-4 Audio stereo, 48 kHz, 128 kbps

Stream Files: GP010012.MP4 (1.86 GB)


"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody will see it." - Mahatma Gandhi

Ruth Duerr Data Stewardship and Informatics Lead National Snow and Ice Data Center Cooperative Institute for Research in Environmental Science University of Colorado at Boulder (303) 735-0136 rduerr@nsidc.org

On Jan 26, 2015, at 2:56 PM, Amos Hayes notifications@github.com wrote:

Hi Ruth. The situation up north is quite variable these days. The best way to figure it out involves testing in/with the community. Can you provide some more details on the existing videos?

What codec, bitrate, resolution, and container are they using? (For example, H.264 codec, 250kpbs, 620x480, mp4) And how long are the clips?

The multimedia.properties file has a bunch of settings for the encoder used by Nunaliit. If the resolution of the video coming in is smaller or equal to the resolution specified, and the codec and bitrate are the same, then it may not need to transform and will skip that step. If it is larger, then the transformation could take a long time, possibly as much as double the runtime of the video, and that happens after the upload (but only happens once). Generally you only want to transcode the original video to a compressed version in one step to avoid multiple generations of compression. So if you can't feed Nunaliit a compressed file that skips that step, then it is best to feed it the best version you can, regardless of size, and let is convert.

Nunaliit should keep the original files on disk (but not in couchdb) by default. You can then modify the multimedia.properties and re-submit the media via an option in Nunaliit's data modification tool to cause it to re-evaluate the original, re-process as necessary, and replace the version in couchdb. This may result in all the videos being transcoded again, so leave yourself some time.

? Reply to this email directly or view it on GitHub.

ahayes commented 9 years ago

OK. So do your processing work using the H.264 codec and saving as .mp4 files. Test a few different video resolutions and bitrates and see what is the smallest file size you think is acceptable for quality, then modify the multimedia.properties file to match and upload one to Nunaliit to test. For viewing over northern satelite connections, I would aim for a resolution no higher that 640x480 (or 720p if widescreen). In the past we've done 320x240 with success.

rduerr commented 9 years ago

Thanks!


"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody will see it." - Mahatma Gandhi

Ruth Duerr Data Stewardship and Informatics Lead National Snow and Ice Data Center Cooperative Institute for Research in Environmental Science University of Colorado at Boulder (303) 735-0136 rduerr@nsidc.org

On Jan 27, 2015, at 2:29 PM, Amos Hayes notifications@github.com wrote:

OK. So do your processing work using the H.264 codec and saving as .mp4 files. Test a few different video resolutions and bitrates and see what is the smallest file size you think is acceptable for quality, then modify the multimedia.properties file to match and upload one to Nunaliit to test. For viewing over northern satelite connections, I would aim for a resolution no higher that 640x480 (or 720p if widescreen). In the past we've done 320x240 with success.

— Reply to this email directly or view it on GitHub.