Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
5th July 2020, 18:19 | #2061 | Link | |
Registered User
Join Date: Sep 2018
Posts: 390
|
Quote:
Sent from my SM-G986U1 using Tapatalk |
|
5th July 2020, 19:06 | #2063 | Link | |
Registered User
Join Date: Sep 2018
Posts: 390
|
Quote:
EDIT: I've encoded/muxed several different ways. EVERY way left the audio out of sync. For what ever reason, I'm assuming there is an issue with your source. Last edited by jlw_4049; 5th July 2020 at 19:38. |
|
5th July 2020, 22:28 | #2064 | Link |
Registered User
Join Date: May 2016
Posts: 88
|
That's my conclusion as well jlw
No matter what you do with the full show it sends it out of sync, though if you trim a 5min segment and convert it's perfectly fine it's only when you try to convert the whole show then it goes out of sync. |
6th July 2020, 00:49 | #2066 | Link | ||||
App Digger
Join Date: Sep 2018
Posts: 411
|
Quote:
MediaInfo (and MediaInfo.NET) shows (incorrectly) that it has 23.976 (24000/1001) fps, but if you look into the file using ffprobe, you get the following info: Quote:
In reality, if you run the following simple FFmpeg command in CMD, you'll verify it in the real time log message of FFmpeg. Code:
ffmpeg -hide_banner -i Test.vob -c:v libx264 -crf 22.0 -preset medium -c:a aac -ac 2 -b:a 128k -sn -map_metadata -1 -map_chapters -1 -y Test.mp4 Quote:
Then, how can we make StaxRip fill in dropped frames by duplicating frames? Well, in theory, putting ChangeFPS(30000, 1001) in the AVS script is expected to solve this out-of-sync problem, but in reality, it doesn't. Since StaxRip splits video and audio and deals with them separately, video/audio sync is not tackled appropriately by this method. In my experience, piping via FFmpeg along with a forced frame rate seems to be more effective for out-of-sync problems. Suppose you want to encode an HEVC video stream via NVEnc, but you want to fix this dropped frame issue as well. In this case, instead of piping via avs2pipemod, select Command Line encoder and edit the code like this: Quote:
(This is why you need to create a Command Line encoder profile instead of choosing ffmpeg (DXVA2) decoder in NVEnc options. Technically, choosing ffmpeg (DXVA2) decoder in NVEnc options is exactly the same as the above Command Line encoder code except for the -r option. I think it'd be good if @stax76 implemented this additional item in NVEnc ffmpeg (DXVA2) decoder option. ) Choose your own audio encoding. After muxing is done, you will see the final sync is a little bit off: video is a little delayed behind audio. But as ffprobe tells us, the video starts at 0.280633 second, i.e., about 281 milliseconds. So, you need to remux video (hevc) and audio by delaying the audio by 281 milliseconds. Now you'll see the output is fully in sync. Last edited by JKyle; 6th July 2020 at 03:57. |
||||
6th July 2020, 03:43 | #2067 | Link | |
Registered User
Join Date: Mar 2007
Posts: 26
|
Quote:
|
|
6th July 2020, 07:19 | #2068 | Link | |
Registered User
Join Date: Sep 2018
Posts: 390
|
Quote:
Sent from my SM-G986U1 using Tapatalk |
|
6th July 2020, 08:32 | #2069 | Link |
Registered User
Join Date: May 2020
Posts: 188
|
to Lordalibaski:
Your source file is a VOB file. In Settings > Preprocessing, you can select which one will handle mpeg2 and vob: - D2V Witch - DGIndex I bet D2V Witch is selected. So select DG Index. And before importing file, you MUST delete the temp folder of your project, to make sure no trace of the older intermediate files is left, and also maybe restart Staxrip to make sure DGIndex will be used. EDIT: TESTED your sample file, with the DGIndex selected, and the result gave Audio Video SYNCED! Last edited by 44vince44; 6th July 2020 at 09:10. |
6th July 2020, 09:53 | #2070 | Link |
App Digger
Join Date: Sep 2018
Posts: 411
|
Yes, I verified that @44vince44's approach works.
The combination of DGIndex and MPEG2Source works good on this source and produces no out-of-sync problem. (Although you need to delay audio by 281 milliseconds.) This way you can avoid forcing a frame rate via FFmpeg introduced in my approach, which means you can make most of the affluent AVS filters. The resulting frame rate is 24000/1001, same as the source frame rate detected by MediaInfo. Interesting result. Only DGIndex generated d2v works OK whereas D2V Witch or DGIndexNV fails. Seems like oldies go well with each other. Last edited by JKyle; 6th July 2020 at 10:10. |
6th July 2020, 14:22 | #2071 | Link | |
Useful n00b
Join Date: Jul 2014
Posts: 1,666
|
Quote:
The source VOB has the infamous black-frames-at-the-start-with-no-audio pathology. The timestamps reset after those frames and that is what causes the problem. You can see this by logging timestamps. Here's how to do it properly: - Open the VOB in DGIndexNV. - Skip forward 3 GOPs with the GOP forward button (it's only black video) and then set the project start there with the [ button. - Save the project. - Now the following script serves perfectly synced audio. I use 32-bit because my nicaudio.dll is 32-bit. You can play the script in VirtualDub32 for example. Code:
loadplugin("dgdecodenv.dll") loadplugin("nicaudio.dll") vid=dgsource("Test.dgi",fieldop=1) aud=NicAC3Source("Test T80 2_0ch 48KHz 192Kbps DELAY -90ms.ac3",2).DelayAudio(-0.09) AudioDub(vid,aud) Note, the video also has field-order transitions. I won't get into that as it does not bear on the sync issue and here the video is progressive (with 3:2 pulldown) so it is inconsequential. This is the pedal-to-the-metal way to handle this stream. I cannot comment on what 3rd-party transcoders are doing, nor how they differ in their handling with DGIndex versus DGIndexNV. EDIT: You can get away with skipping only two GOPs also, but use the correct delay from the demuxed AC3 filename in your script. I didn't try skipping only one GOP. Last edited by videoh; 6th July 2020 at 15:19. |
|
6th July 2020, 15:07 | #2072 | Link |
Registered User
Join Date: May 2020
Posts: 188
|
Thanks JKyle for confirming, and videoh for the information.
As a general rule, to people using vob sources, I recommend that they keep using DGIndex. It's better than D2V Witch, and it's not the first time a problem happens with D2V Witch.. |
6th July 2020, 19:30 | #2074 | Link | ||
Registered User
Join Date: Jun 2020
Posts: 26
|
My choice is h264 NVEnc or h264 QSVEnc. I worked with files about which jlw_4049 wrote
Quote:
AviSynth/VapourSynth The Godfather I,II,III \BDMV\STREAM\00001.m2ts Folder _temp before encoding: 00001.h264 - Frame rate: 23.976 (24000/1001) FPS Folder _temp after encoding: 00001_out.h264 - Frame rate: 24.000 FPS desync FFmpeg (Intel) Folder _temp before encoding: 00001.h264 - Frame rate: 23.976 (24000/1001) FPS Folder _temp after encoding: 00001_out.h264 - Frame rate: 23.976 (24000/1001) FPS But the desync remained I could try to do as -QfG- wrote Quote:
Last edited by hevron; 6th July 2020 at 19:55. |
||
6th July 2020, 20:12 | #2075 | Link | |
App Digger
Join Date: Sep 2018
Posts: 411
|
Quote:
Just putting this extra option in it solved the out-of-sync problem. I didn't even have to skip initial GOPs. So all this fuss was about how to deal with 3:2 pulldown? Thanks a lot for enlightening me, @videoh! Last edited by JKyle; 6th July 2020 at 20:22. |
|
6th July 2020, 21:22 | #2076 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,666
|
That cannot be correct, because the run time should not be affected by fieldop 0 versus 1. On the other hand, fieldop=2 can change the run time. And I definitely see the desync without skipping GOPs. Are you using direct manual stuff like I did or doing it through staxriip? I have to step out now but will come back to this.
Last edited by videoh; 6th July 2020 at 21:24. |
6th July 2020, 22:24 | #2077 | Link | |
App Digger
Join Date: Sep 2018
Posts: 411
|
Quote:
And yes, I was mistaken. Audio out-of-sync problem does NOT occur with DGIndexNV as long as you delay audio by 281 milliseconds (video start time info gained by ffprobe), no matter whether you put fieldop=1 or not. (Maybe my temp files were messed up when I thought it did.) But AviSynth+ 3.6.1 feeds source video (to NVEnc in my video encoding setting) at different frame rates depending on fieldop values, as is expected: with fieldop=1, it feeds source video at 23.976fps (24000/1001fps), and without it, at 29.970fps (30000/1001fps). (In both cases, I verified that audio sync problem did not occur.) And as is intended, fieldop=1 tackles IVTC: there's combing with 29.970fps, and no combing with 23.976fps. You can download those two videos from here and compare them yourself. Log for no fieldop (fieldop=0): https://pastebin.com/jpE9xkgH Log for fieldop=1: https://pastebin.com/QSYJH8Hz Thanks for the clarification, @videoh. Last edited by JKyle; 6th July 2020 at 22:55. |
|
7th July 2020, 01:36 | #2078 | Link | |||
Useful n00b
Join Date: Jul 2014
Posts: 1,666
|
Quote:
Quote:
Quote:
Last edited by videoh; 7th July 2020 at 01:44. |
|||
8th July 2020, 01:23 | #2079 | Link |
Registered User
Join Date: Mar 2007
Posts: 26
|
@Stax76
Hello, I have been wondering if it was possible to implement a feature that allows you to cut a video by its Chapters. It is a feature from an old program I used to use called V.A.F.E. which is a program that stopped being supported or updated in 2015. As shown in the image it comes up in the preview page and you can select from the boxes which chapter chunks you want to select and what to cut out. After this it will also generate a "keyframes.qpf" for the encode to generate I frames for the start frame of the selected chapters that are selected. I am aware this is pretty niche, I am just asking the question is all Failing that just a function that can generate a QPF file based on the current trimming/cutting functionality of Staxrip would be great (for inserting I frames). Alternatively, if anyone else knows is there currently a way to generate a QPF file based on the cuts that already exists, just atm the current method I have for doing this is: cutting->preview code->paste code into AVSPmod->find frame numbers of the first frame of cut segments->manually put frames in a "keyframes.qpf" to import for encoding (eg "3000 I -1"). Last edited by Disturbance; 8th July 2020 at 02:02. |
Tags |
aac, hdr, hevc, nvenc, staxrip, x264, x265 |
Thread Tools | Search this Thread |
Display Modes | |
|
|