Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Converting audio and merging files #16500
Comments
|
For reference, my current method for merging audio+video is to download the audio and convert it to MP3: youtube-dl -f audio-96 "....ism/manifest(filter=trimmed1)?..." Or, alternatively, download the audio and convert it to MP3 in one step: Either way, I then merge the MP3 and ISMV files: Another alternative is to download the unconverted ISMA audio, but to convert it to, say, AAC along the way: None of these commands addresses the audio lag issue I mentioned in the second part of my original post. |
I am trying to download separate ISM audio and ISM video sources and merge them together. The ISMA audio file, when played, has periodic gaps, presumably between each fragment. To prevent these gaps, I have to explicitly convert the audio file to MP3 or something, then merge it with the ISMV file using ffmpeg. Is there a way to do the audio format conversion and audio+video merge as part of youtube-dl's arguments, rather than using ffmpeg commands manually?
Something like this:
youtube-dl -f bestvideo+bestaudio "....ism/manifest(filter=trimmed1)?..." --audio-format mp3 --merge-output-format mp4 --output filename
(This command does not work. the gap-filled ISMA audio is clearly being used in the output MP4 file.)
There is also a separate but related problem related to merging audio and video: In the original streaming video source, the audio begins about 2 seconds before the video. (For the first 2 seconds, only the first frame of the video is shown, a static image.) As a result, in the merged audio+video file, the audio appears about 2 seconds later than it should. Does youtube-dl have a graceful way of dealing with this audio lag? Acceptable answers would be command-line options for either including a black screen or frozen image for the first 2 seconds of video, or sacrificing the first 2 seconds of audio.