Greetings!
Sorry for my English, need help.
Faced with following issue:
I captured some VHS in MKV with Huffyuv and PCM, video and sound is ok.
Then, I converted it in x264 and ac3 using VfW in VirtualDub, noticed little desynch opening it in MPC. I decided to use Virtualdub External Encoder with next parametrs of encoders:
x264_64.exe
AC3 (aften.exe)Code:--crf 19 --preset medium --level 4.1 --keyint 24 --tune film --min-keyint 1 --bluray-compat --b-pyramid none --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
mkvmerge.exeCode:-b 256 - "%(tempaudiofile)"
So, the problem is next: after long almost successful convertation, VirtualDub show error:Code:-o "%(outputname)" --default-duration 0:%(fpsnum)/%(fpsden)fps "%(tempvideofile)" "%(tempaudiofile)"
Something appers to be stuck while trying to stop (thread deadlock). Abort operation and exit program?
I tried simple VD and VD FilterMod, different x264 (just x264.exe or included in ffmpeg) and ac3 encoders, result always same.
Also tried to convert in mp4 with AAC, nothing helped.
When I conerving via x264VfW I don't face that issue, but have audio/video desynch.
Please, help!
Waiting for your adviced.
UPD:
VirtualDub log
[i] Dub: Processing thread has not cycled for thirty seconds -- possible
livelock. (Thread action: running main loop) (Current address:
00007FFF7F5FFEF4)
P.S.
Finally, after 10 minutes VD created MKV file, but little video delay also have place to be.. In original MKV compressed with Huffyuv and PCM there is no desync.
How to fix it? Thanks.
+ Reply to Thread
Results 1 to 30 of 38
-
Last edited by Tarnum; 22nd Jan 2018 at 11:26. Reason: Additional info
-
Hi,
To solve desync -> if sync is still same, you can easily fixed it in Avidemux. Copy video, copy audio and output format what you want. Just set shift audio to proper value in milliseconds. I think it isn't best idea to keep Huffyuv and PCM in mkv, avi seems to me be better suitable for this.
x264vfw is for avi container, not sure if AAC is good for this container also, ordinary x264 or x265 aren't usable in avi container. If the problems occurs at the end, probably muxing problem wrong codec in wrong container.
Bernix -
Thank for reply!
I want to solve problem in VirtualDub that is why trying a lot of different options.
After checking file in gMKVExtractGUI
I noticed that input audio has a delay in 40 ms. Other in 39 ms.
Now I don't know how to correct it in settings on MKVmerge
I tried using option -y 2:40
full codeCode:-o "%(outputname)" -y 2:40 --default-duration 0:%(fpsnum)/%(fpsden)fps "%(tempvideofile)" "%(tempaudiofile)"
And how is it possible to set that option for all files (I have 1TB of uncompressed video) to automatically set audio delay, because most files have delay in 40ms, other in 39. I don't know the reason.
-
You can do this shift audio +/- in mkvtoolnix, when selected audiotrack. 1ms difference, you couldn't recognize. Even 40ms you hardly notice. If noticeable so about 500ms or similar but probably more.
Bernix -
In mkvmerge the TrackIDs for input files restart for every input file. Mkvmerge knows which input file they belong to because of the order:
Code:-o "%(outputname)" --default-duration 0:%(fpsnum)/%(fpsden)fps "%(tempvideofile)" -y 0:40 "%(tempaudiofile)"
1ms is nothing. If you lean your head back 30cm while sitting on your chair you will also have 1ms delay because of the speed of sound. -
Wow that's great! Thanks for replies, it works!
I'm perfectionist, that is why want to know everything
Now I'm thinking about ripping BluRay's, never tried.
P.S. Another question: I captured video from VHS, VHS-C, And Video8 cassets. But I have options in GUI of program for my tuner: MKV, AVI, MPEG2 and some other. So, when I'm capturing in MPEG2, video is more smooth, as it has more fps.. but capturing in other container gives me worse result. Any suggestions?
Thanks a lot! -
It can be because for example in our country is SD content native in Mpeg2, so no need to re encode and it is best you can get. I think there are also countries that probably has HD content in MPEG2, here is HD in h264 and going to be h265. So if you are most satisfied with Mpeg2 capture, why to change it? You can re encode it to different format with cut out unwanted parts at same framerate with lower bitrate to different codec container anytime. But I also think there are better (higher controls over options of each codec) software for this. Don't know how virtualdub handles Mpeg2 in ts or whatever container.
Probably you have not powerful enough computer to real time convert to codecs used in avi, mkv and it results in lots of droped frames, probably badly choose fps in your gui. 23,976, 25 it can result in not so smooth playback.
You can get full report of properties of captured files with text form of Mediainfo.
Bernix -
Benrix, I'm in Russia.
PC is poweful enough
Intel Core I7 5820K (Haswell-E) (3,3 Ghz, 6 cores, 12 threads), 16 GB DDR 4, GeForce GTX 780, MSI X99S Gaming 7.
So I don't mind about resources, as I told, I want best result.
Thank you so much!
Rip Blu-Ray much harder ? lol -
Greetings!
Need your explanation, coding that MKV's (Hyffyuv, PCM) to MKV (x264, ac3) with next configurations of video encoder
Code:--crf 14 --preset medium --input-res %(width)x%(height) --input-depth 16 --input-csp i420 --fps %(fps) - -o "%(tempvideofile)"
Code:--crf 19 --preset medium --level 4.1 --keyint 24 --tune film --min-keyint 1 --bluray-compat --b-pyramid none --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
If it is possible, give me standart setting for x264 and explanation of each tag, I mean what does crf do, csp i420... I don't understand it clearly.
How to set bitrate, and what does it meanCode:--keyint 24 --tune film --min-keyint 1 --bluray-compat --b-pyramid none
I need movie with length 3 hours and size not more than 5 GB
Thanks in advance! -
You control quality/bitrate via --crf value. Higher crf = lower quality = lower bitrate = lower filesize. (Alternatively you can use --bitrate but for most people --crf is recommended.)
More info on all the parameters:
https://en.wikibooks.org/wiki/MeGUI/x264_Settings and attached help.
Why is length different?
First command had "--input-depth 16". Second command didn't have that command and default is 8. So if x264 thinks input is 8 bit instead of 16 bit the length will be doubled. -
Hi,
I think your second where you are using fpsden, you should just use fps only. fpsden should be 1001 in case fps is 24 (assuming 23,976 fps) So If i were you i don't use it. Just keep fps as in first (if source is also 3hrs long) I mean by this you have to set fps manually according to source, not needed fpsden.
And at crf19 for 3 hours full HD video (it is quality based) so several GBs it will be. You can also use 2pass, to get best quality for given size. Constant rate factor final size of video is unpredictible.
Edit: it is novelty for me that wrong bit depth is causing twice longer video.
BernixLast edited by Bernix; 23rd Jan 2018 at 08:48. Reason: Edit
-
-
We are dealing with uncompressed video data. If you send one 16 bit frame to x264 but tell x264 the input is 8 bit then x264 will encode the first half as frame 1 and the second half as frame 2. Now your video seems to be twice as long (and will look totally b0rked in a player).
-
Yes, I also prefer 24000/1001 but better do it manually. How cli can get fpsden from video? And overall difference in 24000/1001 vs 23,976 is minimal but is. In 3hrs video it will not occur but can caused problem with editing. I know. All I want to say is to set manually fps and fpsden.
Bernix -
So, I have to set manually fps? Hmmm
And I also didn't understand exactly about 23,976. As I know new 4K BluRay's has 60 fps.. and in some new videogames I can set 60 fps and 4K. My graphic card won't correctly handle it, but it is possible with GTX 1080 of Radeon RX Vega 56.. Explain please -
VirtualDub populates those fields. If they are correct depends how the video is detected. If I open e.g. an AviSynth script with AssumeFPS(24000, 1001) then VirtualDub will correctly pass that on to x264cli.
If you want to play it safe you can of course set them manually like you suggested. That is not a bad idea but of course won't account for 3 hrs vs 6 hrs. -
Last edited by sneaker; 23rd Jan 2018 at 09:21.
-
-
You can convert any fps to any fps with interpolation. Doesn't mean authoring houses actually do that. Movies are 99.9% still filmed at 24 fps and then released/stored at 24 or 24/1.001 fps on Blu-Ray. (24 to 24/1.001 is only slightly slowed down to be better compatible with the NTSC TV world in North America, Japan and others.)
I have never seen a movie that was produced at 24 fps being released at 60 fps on Blu-Ray. -
Also would like to ask, if not intermediate conversion, are there blu rays with true 16 bit depth? Aren't they mostly 8 or 10 bit depth? I understand that 16 bd is good for intermediate work, like reduce noise, sharpen etc. but is it worth to have 16 bit depth as source? I know that x264cli can manage it, but is there any benefit?
Bernix -
"HD" Blu-Ray is always 8 bit. 4K Blu-Ray either 8 bit or 10 bit, extra Dolby Vision layer can extend to 12 bit (not 100% sure). (If you rip, filter, re-encode such a 10 bit source you may work with 16 bit intermediates because 16 bits are 2 bytes and often in IT you "like" to work with byte-aligned formats or because you want to do filtering at a higher precision.)
-
I understand this is better to work with higher bit depth, but i asked if is it reasonable just for ripping. To have final output 16 bit depth. (seems to me be pointless)
Already in one thread about 1/3 years ago I suggested to use program for picture editing and do intermediate work in 48 bit depth (original was 8bit) to identify car license plate.
So I'm aware of this. But have input video 8bit and final output to 16 bit seems to me be redundant.
Bernix -
No one uses 16 bit as final format. x264 supports max 10 bit output, x265 max 12 bit output.
-
So why "First command had "--input-depth 16""
when input isn't most probably 16, but 8 or 10. O.k. so it give better results even in simply just conversion files.
Bernix -
Hey guys!
I used 16 bit hopefully I will get video with redudant possibilities for editing. But what I got:
[Attachment 44479 - Click to enlarge]
with next code
Code:--crf 19 --preset medium --input-res %(width)x%(height) --input-depth 16 --input-csp i420 --fps %(fps) - -o "%(tempvideofile)"
-
I would decide to codec about input. So if is it possible to skip bitdepth and csp, I would decide program.
Bernix
Similar Threads
-
Disc drive freezes PC when encountering damaged sectors. The SCSi deadlock.
By TechLord in forum Newbie / General discussionsReplies: 4Last Post: 19th Nov 2017, 02:44 -
x264 conversion with Virtualdub/sony vegas 13 Color issues
By MajorFoley in forum Video ConversionReplies: 23Last Post: 20th Dec 2016, 07:11 -
Virtualdub ERROR CODE 512 ACMERR_NOTPOSSIBLE - DivX to Xvid in Virtualdub
By kurtky in forum Video ConversionReplies: 6Last Post: 4th May 2015, 13:26 -
x264 error
By yaston in forum Video ConversionReplies: 8Last Post: 9th Apr 2015, 05:59 -
SYNC PROBLEM: X264 AC3/DTS MKV --->>> Xvid with VBR mp3?
By Randm in forum Video ConversionReplies: 6Last Post: 30th Jul 2013, 17:57