OK, I can't believe I am asking this question, but here goes.
If I encode my video to MPEG2 Intra only using the following:
is there a way to mux this m2v with the audio stream of the input file? I have tried various methods but come up dry e.g.Code:ffmpeg -i input -vcodec mpeg2video -pix_fmt yuv422p -q:v 1 -qmin 1 -intra -an output.m2v
Kicks off a "Unknown decoder 'copy'" error.Code:ffmpeg -i input.m2v -vcodec copy -i input.wav -acodec copy output.mpg
I want to bring the m2v into PP/AE and start editing. But unless I am missing something, having the video and audio demuxed makes for a very messy editing experience.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
-
Code:
ffmpeg -i input.m2v -i audio.wav -map 0:0 -map 1:0 -c:v copy -c:a copy output.mpg
But you could have encoded the video & kept the audio (assuming you wanted to stream copy) in 1 step with -c:a copy . Or you could have encoded both in 1 step (assuming you wanted to re-encode the audio, replace -c:a copy with whatever)
Code:ffmpeg -i input.ext -vcodec mpeg2video -pix_fmt yuv422p -q:v 1 -qmin 1 -intra -c:a copy output.mpg
-
-
Poisondeathray: First of all, thank you. I suspected that I could have encoded the audio the first time around. But since I grabbed that command line from the web, I was hesitant to tweak it. Ffmpeg while extremely flexible can be finicky when dealing with certain codecs. Also, my input file is an avisynth script using QTGMC so it takes a really long time.
Cornucopia: fwiw I ended up biting the bullet and working with the demuxed files in PP/AE anyway because the audio is 5.1 Dolby Stereo and even with poisondeathray's excellent suggestion on how to mux I still couldn't get it to work. My problem is I am too used to selecting in and out points from the source clip window and dragging them to the timeline. I need to spend some time learning how to edit directly in the timeline. So your advice is noted. Because I have a feeling that muxing is a bad idea anyhow. -
Whenever you want to test something with ffmpeg, and don't want to waste time encoding just to see if it will work or not, you can test a small clip
Use
Code:-t time in duration in hh:mm:ss notation
e.g encode a 20 second clip from 1minute to 1minute 20seconds
Code:ffmpeg -i input.avs -c:v mpeg2video -pix_fmt yuv422p -q:v 1 -qmin 1 -intra -c:a pcm_s16le -s 00:01:00 -t 00:00:20 -f mpegts output.ts
Often some containers or muxers produce something that Adobe (or other software ) don't like. So it's always good to do small test on the workflow first -