AudioDub(A, MergeChannels(B,C))
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 151 to 180 of 183
Thread
-
The command I gave you shows how to extract a pair of streams to a stereo channel.
-
Right, but when mapping, if I have 4.0 instead of 7.1 because there are two stereo tracks in the original instead of 5.1 and 2.0, what channels do I need to map? Front left and right and surround left and right?
-
There are four four-channel options though:
Code:4.0 FL+FR+FC+BC quad FL+FR+BL+BR quad(side) FL+FR+SL+SR 3.1 FL+FR+FC+LFE
-
Why don't you just try them and find out? That would be far faster than coming here and asking.
-
Is there a way to tell ffmpeg what the layout is of the input file? I have a file with a mono audio track for the movie, and a stereo commentary track. I set up my batch file thinking it'd be treated as 3.0, but it threw an error because it'd decided the input was probably 2.1. So is there a way of telling ffmpeg what the input is so I don't have to trial-and-error my way through it every time?
-
Well this is weird. Here's the batch file I just ran:
Code:for %%F in (*.mkv) do ( echo A = LWLibAvVideoSource("%%F"^) > script.avs echo B = LWLibAvAudioSource("%%F",stream_index=1^) >> script.avs #echo C = LWLibAVAudioSource("%%F",stream_index=2^) >> script.avs #echo B = MergeChannels (B,C^) >> script.avs echo AudioDub(A,B^) >> script.avs echo AssumeFPS(24000,1001,sync_audio=true^) >> script.avs echo ResampleAudio(48000^) >> script.avs rem ffmpeg\ffmpeg.exe -i script.avs -aspect 16:9 -filter_complex "[0:1]channelmap=map=FL-FL|FR-FR|FC-FC|BR-BR|BL-BL|LFE-LFE:channel_layout=5.1" -filter_complex "[0:1]channelmap=map=SL-FL|SR-FR:channel_layout=stereo" -acodec ac3 -vcodec libx264 -preset slow -crf 18 "Output\%%F" ffmpeg\ffmpeg.exe -i script.avs -aspect 16:9 -acodec ac3 -vcodec libx264 -preset slow -crf 18 "Output\%%F" rem mkvextract "%%F" chapters chapters.txt tracks 2:subs.idx 3:subs.idx mkvextract "%%F" chapters chapters.txt mkvmerge -o "ChapterVersions\%%F" --chapter-sync 0,25000/23976 --chapters chapters.txt "Output\%%F" rem mkvmerge -o "ChapterVersions\%%F" --chapter-sync 0,25000/23976 --chapters chapters.txt "Output\%%F" --sync -1:0,25000/23976 subs.idx del "%%F.lwi" del script.avs del "chapters.txt" del "subs.idx" del "subs.sub" del "Output\%%F" ) pause
But apart from that, the chapters are in the wrong spots. They've moved, they don't have their old time codes, but they don't have the correct time codes either. -
I just noted the first obvious error I saw.
The sub errors are because of the "del subs.idx" and "de. subs.sub" lines at the end of the batch file.
I don't have an mkv file with chapters handy for testing the chapter issue. -
Ah, right, of course.
But yeah, chapters are the biggie. I have a box of PAL movies I'm going through and it was all going swimmingly until this one, when suddenly the chapters are completely out of whack. -
I found one mkv file with chapter markers but it was VFR and nominally 23.976 fps already. After running the batch file the new video had A/V sync errors but the chapter points had the expected timing (~4 percent later).
I changed the LWlibavVideoSource() line to include fpsnum=24000 and fpsden=1001 arguments and ran the batch file again. This time the new video had no A/V sync errors and the same running time as the source (as expected since it was already 23.976 fps). And the chapter points were ~4 percent later (which is what you expect going from 25 fps to 23.976 fps).
So my analysis is your source is VFR and that's causing the errors you're seeing. -
I like to use 25000/1000 because it's similar in scale to the exact NTSC values of 24000/1001, 30000/1001, and 60000/1001, and because it's more precise. I don't know if it matters to LWlibavVideoSource but many programs use 32 bit integers for the frame rate numerator and denominator. A number like 25000000000 is too large for a 32 bit integer and will cause those programs to screw up.
-
Got exactly the same result. Audio and video aren't in sync with each other, and the chapters aren't in sync with either of them.
-
mpeg 2 elementary stream. A sample of your source. Haven't you ever demuxed the mpeg 2 stream with DGIndex? It produces an m2v file.
-
I've actually never done that, no, just used it to create d2v files for AviSynth.
I'm also not starting with the VOBs, but with MKV files created via MakeMKV. So I cut a small sample from that, no re-encoding or anything. Should achieve the same goal, but I can't attach it because Firefox alway times out when I do that. I'll give Chrome a shot in a sec. -
Since LWlibavVideoSource is giving you sync errors with this video I'd still recommend you demux the video data to an MPG file, use DgIndex to build a d2v (honor pulldown flags mode), then open the video with Mpeg2Source() in AviSynth. That's the gold standard for dealing with MPEG2 video in AviSynth.
-
The chapter points should be unaffected by that though, shouldn't they? They don't line up with either the video or the audio on my output file.
-
If your video and audio aren't in sync there's something wrong with one or both of them. So the fact that the chapters don't sync with either may mean nothing. Looking at the timing of the chapter points I got exactly what was expected from slowing a 25 fps video to 23.976 fps. So the new chapter points are correct.
Another thing I'm not sure about -- what happens when a chapter point doesn't coincide with a key frame in an MVK file? Does the player seek to the nearest keyframe? Does it try to seek frame accurately? Does it depend on the player and its settings? The default keyframe interval with x264 is 250 frames. So there can be more than 10 seconds between keyframes at 23.3976 fps. Keyframes in your AVC output don't correspond to keyframes in your MPEG2 source.
Similar Threads
-
Multiple video episodes from DVD to BD
By Tim Berlin in forum Authoring (Blu-ray)Replies: 7Last Post: 23rd Dec 2019, 12:39 -
Trying to get tv episodes onto my iPod video
By noblenutria in forum Newbie / General discussionsReplies: 4Last Post: 9th Sep 2019, 12:07 -
Ripping Episodes from my Bluray-Disc
By JonNada in forum Blu-ray RippingReplies: 1Last Post: 2nd Jan 2018, 01:20 -
Is there a way to list all subtitle tracks for all my episodes?
By zephyr22 in forum SubtitleReplies: 4Last Post: 3rd Jun 2016, 07:01 -
multiavchd---shows only 12 of 15 episodes
By mysts in forum Authoring (Blu-ray)Replies: 0Last Post: 27th Jul 2015, 12:20