---
title: "Getme Video"
description: "Ingredients: youtube-dl, ffmpeg, ffmpeg2theora sudo apt-get install youtube-dl ffmpeg ffmpeg2theora cat /.bashrc ’ fi fi }."
url: "https://h3manth.com/scribe/getme-video/"
canonical_url: "https://h3manth.com/scribe/getme-video/"
markdown_url: "https://h3manth.com/scribe/blog/getme-video.md"
publishDate: "2010-06-22T00:00:00.000Z"
author: "Hemanth HM"
category: "linux"
tags: ["ubuntu","bash"]
word_count: 141
reading_time_minutes: 1
x_markdown_tokens: 325
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# Getme Video

> Ingredients: youtube-dl, ffmpeg, ffmpeg2theora sudo apt-get install youtube-dl ffmpeg ffmpeg2theora cat /.bashrc ’ fi fi }.

##  Simple recipe to get youtube video in ~~avi~~ or ogg format from your terminal.

**Ingredients:** _youtube-dl, ffmpeg, ffmpeg2theora_ `sudo apt-get install youtube-dl ffmpeg ffmpeg2theora`
    
    
    cat >> ~/.bashrc << "EOF"
    getme(){
    if [[ $1 == avi && $2 != "" ]]; then
    url=$2
    filename=$(echo $url | cut -d"=" -f2)
    youtube-dl $url 
    ffmpeg -i $filename.flv $filename.avi
    else
    if [[ $1 == ogg && $2 != "" ]]; then
    url=$2
    filename=$(echo $url | cut -d"=" -f2)
    youtube-dl $url
    ffmpeg2theora -v 10 -S 0 -a 10 --sync $filename
    else
    echo "Use getme <ogg/avi> <link>"
    fi
    fi 
    }
    EOF
    

**Addon:** _To get mp3 out of the video, just add the below line in each method_ **ffmpeg -i $filename -vn -acodec copy $filename.mp3**

**Steps:**1\. Copy paste the code in the terminal. 2\. exec bash 3\. getme [ogg/avi] [youtube_link] 4\. Share better ideas in the comment area!****
