This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| project:stereoscopy [2018/10/16 15:07] – dp | project:stereoscopy [2018/10/17 10:20] (current) – dp | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Stereoscopic recording using FFmpeg ====== | ====== Stereoscopic recording using FFmpeg ====== | ||
| - | FFmpeg is a free software project that produces libraries and programs for handling multimedia data. FFmpeg is available for under most operating systems (Windows, Linux, Mac OS X, Android...) | + | This is I support material collected for Steroscopic/ |
| [[http:// | [[http:// | ||
| - | |||
| - | <WRAP prewrap> | ||
| - | < | ||
| - | ffmpeg -help | ||
| - | </ | ||
| - | </ | ||
| ===== Accessing USB cameras ===== | ===== Accessing USB cameras ===== | ||
| - | Here we use two identical USB cameras for capturing. These examples | + | Examples here are tested on Windows (DirectShow multimedia framework), but with small changes it should work on other systems. |
| - | Example to list dshow input devices (Windows): | + | List dshow input devices (Windows): |
| <WRAP prewrap> | <WRAP prewrap> | ||
| < | < | ||
| Line 28: | Line 22: | ||
| </ | </ | ||
| - | Example to print a list of options from a selected device: | + | Print a list of options from a selected device: |
| <WRAP prewrap> | <WRAP prewrap> | ||
| < | < | ||
| Line 85: | Line 79: | ||
| < | < | ||
| ffmpeg -i LEFT.mp4 -i RIGHT.mp4 -filter_complex [0: | ffmpeg -i LEFT.mp4 -i RIGHT.mp4 -filter_complex [0: | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Convert views into a top-above-bottom format: | ||
| + | <WRAP prewrap> | ||
| + | < | ||
| + | ffmpeg -i LEFT.mp4 -i RIGHT.mp4 -filter_complex framepack=tab OUTPUT_TAB.mp4 | ||
| </ | </ | ||
| </ | </ | ||
| Line 96: | Line 97: | ||
| </ | </ | ||
| - | ===== Changing stereoscopic | + | ===== Metadata for Youtube video uploads ===== |
| + | Unfortunately none of the below recommended metadata work and Youtube is breaking things constantly. It might recognize stereoscopic/ | ||
| + | |||
| + | MPEG4 (with re-encoding): | ||
| + | <WRAP prewrap> | ||
| + | < | ||
| + | ffmpeg -i input_file.mp4 -vcodec libx264 -x264opts frame-packing=3 output_file.mp4 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP prewrap> | ||
| + | < | ||
| + | ffmpeg -i input_file.mkv -vcodec libx264 -x264opts " | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Matroska (direct stream copy) | ||
| + | <WRAP prewrap> | ||
| + | < | ||
| + | ffmpeg -i input_file.mkv -c copy -metadata: | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | There is Google' | ||
| + | https:// | ||
| + | This fork is less strict and allows more operations: https:// | ||
| + | |||
| + | Add left-right (SBS) metadata: | ||
| + | <WRAP prewrap> | ||
| + | < | ||
| + | python spatialmedia -i --stereo=left-right INPUT.mp4 OUTPUT.mp4 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Print spatial media metadata contained in the file: | ||
| + | <WRAP prewrap> | ||
| + | < | ||
| + | python spatialmedia FILE | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== Changing stereoscopic | ||
| Convert between different stereoscopic image formats. | Convert between different stereoscopic image formats. | ||
| [[https:// | [[https:// | ||