VideoHelp Forum

+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Dec 2020
    Location
    Seattle, WA
    Search PM
    First time here and new to all this. Learning as I go.

    There is a video stream I would like to save on my computer for future viewing.

    I was able to retrieve the master.m3u8 file and therefore was able to retrieve the following:

    (part of the URL)

    Video: https://.../sep/video/10107b9b/playlist.m3u8
    Audio: https://.../sep/audio/343d2c58/playlist.m3u8

    I tested the URLs with VLC Network stream and was able to play them each successfully. Now my questions are:

    1. Can I use the video and audio link in FFMPEG to create a video?

    2. What command line do I use in FFMPEG to make this happen? I also don't want to sacrifice video and audio quality.

    If not possible with FFMPEG, what is another way to go about this?


    Thanks guys!
    Quote Quote  
  2. Member
    Join Date
    Jan 2019
    Location
    hawai
    Search PM
    Code:
    ffmpeg -i video.mp4 -i audio.wav \
    -c:v copy -c:a aac -strict experimental \
    -map 0:v:0 -map 1:a:0 output.mp4
    a very simply search on google (or another search engine): JOIN AUDIO VIDEO FFMPEG
    Quote Quote  
  3. It might work by directly downloading both streams to the output file simultaneously with ffmpeg :
    Code:
    ffmpeg -i "https://.../video/.../playlist.m3u8" -i "https://.../audio/.../playlist.m3u8" -c copy "X:\target path for output\output.mp4"
    As far as I know, “-map” is only required if there are unwanted streams in the inputs, for instance to add an external audio stream to a video while removing its original audio stream ; in this case, the “video” link should provide a video stream only, the “audio” link an audio stream only, so that part should not be necessary.
    And there should be no need to reencode the audio (“-c:a aac”), which must be already in AAC format ; “-c copy” means that all streams shall be copied as-is, with no quality loss.
    I don't know what “-strict experimental” is for, but if it's related to aac encoding it's also unnecessary.

    Also, if you're new to this, “ffmpeg” alone works only if, either, the ffmpeg.exe file is in the same directory as the .bat file (if you're using a .bat script) or which is currently opened in the command prompt (if you're typing the command in the CMD command prompt, in which you can change the current folder with the “CD” command = change directory), or if the ffmpeg.exe is in the so-called Windows PATH — see here ; otherwise you have to type / copy the complete path, for instance, with quotation marks if there's at least once space somewhere.
    Code:
    "C:\command line tools\ffmpeg\ffmpeg.exe" -i ...
    What I do is that I added only one folder, called “CLI”, to the Windows PATH (procedure explained in the article linked above), then instead of copying EXE files into that folder, I create hard links with LinkShellExtension, which accomplishes the same thing without taking extra storage space as an actual copy would. It's especially problematic with ffmpeg, since that file is getting bigger and bigger (more than 60MB by now for the standard build) and A LOT of video / audio / downloading utilities rely on it and add their own copy when installed, so you can easily have 10 copies or more (some up to date, some older than Joe Biden's first sock) which amounts to the capacity of a full CD, when only one should be needed.

    That would be an idea for a silly poll : how many copies of ffmpeg and ffmpeg related DLLs do you have on your current computer, and what is the total size taken by those ?
    I have :
    – ffmpeg.exe in “Streamlink” 47.2MB
    – ffmpeg.dll in “Skype for Desktop” 2MB
    – ffmpeg.dll in “ffdshow” 3.8MB
    – ffmpeg.exe + avXXX DLLs in “FFmpeg for Audacity” 27MB
    – ffmpeg.exe + avXXX DLLs in “DVDStyler” 61.0MB
    – ffmpeg.exe + avXXX DLLs in “Shotcut” 21.3MB
    – ffmpeg.exe 64bit & 32bit in “Hybrid” 110MB
    – ffmpeg.exe in “multiAVCHD” 8MB
    – ffmpeg.exe in “MTNHGUIPlus” 23.8MB
    – ffmpeg.exe in “AVStoDVD” 26.5MB x 2 (two versions extracted, two identical copies of ffmpeg)
    – ffmpeg.exe in “MeGUI” 49.4MB (plus several “obsolete” ffmpeg files)
    – ffmpeg.exe in “youtube-dl-gui” 32.2MB
    – ffmpeg.exe in “StaxRip” 88.6MB
    – ffmpeg.exe in “MediathekView” 95.5MB (don't even remember what that is)
    – ffmpeg.exe in “SeekTester” 19.6MB (don't remember either)
    – ffmpeg.exe in “ffmpeg-20191226-XXX-win64” 61.9MB (hard-linked to the “CLI” folder)
    – ffmpeg.exe in “ffmpeg-20191226-XXX-win32” 47.5MB (hard-linked to the “CLI” folder)
    Total (not even counting all the instances of avcodec and whatnot) : 751.8MB.
    Last edited by abolibibelot; 15th Dec 2020 at 14:51.
    Quote Quote  



Similar Threads