This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
from torch.autograd import Variable | |
import torch.nn.functional as F | |
import matplotlib.pyplot as plt | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gst-launch-1.0 v4l2src ! "video/x-raw,width=640,height=480,framerate=15/1" ! \ | |
x264enc bitrate=1000 ! video/x-h264,profile=high ! h264parse ! queue ! \ | |
flvmux name=mux pulsesrc ! audioresample ! audio/x-raw,rate=48000 ! \ | |
queue ! voaacenc bitrate=32000 ! queue ! mux. mux. ! rtmpsink location="rtmp://127.0.0.1/mytv/mystream live=1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Preview and save webcam video on NVIDIA Jetson TK1 | |
# Grab audio and video (in h264 format) from Logitech c920 @ 1920x1080 | |
# Preview @ 1280x720 on screen | |
# Store video to file named gEncode1080p.mp4 | |
# Logitech c920 is video1 on this machine | |
VELEM="v4l2src device=/dev/video1 do-timestamp=true" | |
# Video capability from the camera - get h264 1920x1080 | |
VCAPS="video/x-h264, width=1920, height=1080, framerate=30/1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-10-05 10:19:59 mikeboers@maxwell: ~/Documents/Python/PyAV | |
$ time python video_frames_via_pipe.py | |
real 0m0.564s | |
user 0m0.729s | |
sys 0m0.241s | |
2013-10-05 10:20:01 mikeboers@maxwell: ~/Documents/Python/PyAV | |
$ time python video_frames_via_pyav.py |