Download video+audio in a single file from YouTube - windows

I tryed to download a video+audio from YouTube by using youtube-dl:
youtube-dl https://www.youtube.com/watch?v=7wfUUZvybPY
I got a video file (.webm) without audio. I'm looking for a way to download video+audio in a single file by using the command line (cmd) in Windows 10. Do you have any suggestion?

youtube-dl.exe --format mp4 https://www.youtube.com/watch?v=7wfUUZvybPY
However, youtube-dl relies on ffmpeg for many format conversions. Install ffmpeg for Windows and look at youtube-dl docs here

I found a solution; the following command merges the audio and video files in a file.mkv:
youtube-dl.exe --sub-lang en --write-sub https://www.youtube.com/watch?v=7wfUUZvybPY

Related

How to transcribe audio without using external APIs?

I would prefer not to use Amazon, Google etc, so how would I use my own computer (macOS) to get a time-stamped transcription of mp3s and videos? Preferably on the command line. So I could do something like this
transcribe -o oliver_twist.srt oliver_twist.mp3
.. to create a SRT subtitle file from an mp3.
For Linux there's a package called voice2json: http://voice2json.org/commands.html#transcribe-wav
simply if you have an audio file: sample.wav you run
voice2json transcribe-wav < simple.wav
and you get the output
{"text": "sample voice recording", "transcribe_seconds": 0.123, "wav_seconds": 1.23}
I believe you can install this Linux package to macOS. To do that just look at: https://apple.stackexchange.com/questions/53096/is-it-possible-to-install-linux-packages-on-os-x
EDIT:
To get the srt, you need a package called jq. You can install it the same way. Let's say your output from previous command is output.json. What you need to do is:
jq .text output.json > subtitles.srt and the output will be saved as subtitles.srt
Kdenlive is able to generate SRT files from an audio file: see Kdenlive. It is also available for MacOs.
Once Kdenlive is installed, you can install Kdenlive command line tools to operate Kdenlive from the command line: see Kdenlive command line.

How do i convert flv to mp4/mkv?

I'm trying to grab content from http://tv.nrk.no and the content is downloaded as *.flv. But VLC cannot play that file, no errors or other information.
I have tried to reinstall ffmpeg with additional codes: brew reinstall ffmpeg --with-libvpx and convert the flv file to mp4. But getting error *.flv: could not find codec parameters.
So how can I either download in another format? Or convert the file to mkv/mp4?
I cannot download the content, so I can't try the input video from http://tv.nrk.no
And, what is your command line? Can you post it?
It seems that you don't have some codec.
Maybe you can download ffmpeg-static to transcode the video.

Convert mp4 from color to black-and-white with linux terminal

I have an mp4 which I want to convert from color to black and white using the terminal.
How?
EDIT: My question is NOT a duplicate because I want to do this with an mp4 (video, not image).
If you install ffmpeg (cross-platform video converter), you can do it with a one line command by filtering the saturation to 0.
ffmpeg -i <inputfile> -vf hue=s=0 -acodec copy <outputfile>
Maybe overkill but GStreamer could probably achieve that. It's mainly for streaming media but you can use it to manipulate local files also.
https://gstreamer.freedesktop.org/
It can either be executed as a command taking your mp4 as argument along with a long series of other arguments directly from the terminal or the framework can be imported in a project. Takes some time to get the hang of it tho and it's probably an easier way.

Tagging mkv files with cover images?

I found this screenshot which shows that you can add a cover image to an mkv file in a way that it is displayed as the icon of the file in the Windows explorer using Shark007+icaros.
But these tools are messing with the system in a really bad way. A lot of people are having problems with it and I too very much regret that I've installed it. I'm really glad I got my Windows to boot again...
Anyway, how could I programmatically add a cover image to an mkv file?
And would I need to change something in the registry to make Windows display them?
I'm not neccessarely looking for code, I'm more looking for something like the format the cover needs to have and the byte at which I have to inject/insert/attach the image file and maybe a registry entry that would cause the tagged images to be displayed etc.
You can use the FFmpeg multimedia framework to attach an image as MKV metadata. More Windows builds can be found at Zeranoe.
Example CLI usage:
ffmpeg -i input.mkv -c copy -attach image.jpg -metadata:s:t \
mimetype=image/jpeg output.mkv
-c copy copy all streams in the source file without re-encoding
-attach image.jpg attach a JPEG image
-metadata:s:t mimetype=image/jpeg set the attachement MIME type
On *nix the same can be accomplished with MKVToolNix.
Ubuntu demo:
Programmatic approach:
use the ffmpeg C libraries to attach or replace the cover art
write a custom Shell Extension to read the MKV format and display the image attachement as thumbnail.

FFmpeg for the file conversion using URL

i need to be converted from MP4 to AVI. MP4 video are uploaded in window azure blob storage and storage is accessible publicly.
my question when we write the ffmpeg command line. can i give the url of the video which is on blob storage
ffmpeg -i https://abcd.blob.core.windows.net/container/1.mp4 D:\Shared\1.avi
Your ffmpeg command is correct.
But FFmpeg works only with http urls out of the box. To make it work with https urls, you will need to compile it yourself with openssl.

Resources