VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
  1. 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
    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)" -
    AC3 (aften.exe)
    Code:
    -b 256 - "%(tempaudiofile)"
    mkvmerge.exe
    Code:
    -o "%(outputname)" --default-duration 0:%(fpsnum)/%(fpsden)fps "%(tempvideofile)" "%(tempaudiofile)"
    So, the problem is next: after long almost successful convertation, VirtualDub show error:

    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.
    Last edited by Tarnum; 22nd Jan 2018 at 11:26. Reason: Additional info
    Quote Quote  
  2. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  3. 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 code
    Code:
    -o "%(outputname)" -y 2:40 --default-duration 0:%(fpsnum)/%(fpsden)fps "%(tempvideofile)" "%(tempaudiofile)"
    Please let me know how to set delay correctly?
    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.

    Click image for larger version

Name:	delay.png
Views:	101
Size:	98.0 KB
ID:	44471
    Quote Quote  
  4. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  5. 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)"
    https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.track_ids

    Originally Posted by Tarnum View Post
    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.
    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.
    Quote Quote  
  6. 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!
    Quote Quote  
  7. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  8. 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
    Quote Quote  
  9. 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)"
    And got file with duration 3 hours and size 8 GB, I need to reduce size, then decided to experiment and try other parametrs for x264
    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)" -
    Finally got file with duration 6(!!!) hours, though input video 3 hours, green video screen, noizy sound, and size of 64 GB. What am I doing wrong?

    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 mean
    Code:
    --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!
    Quote Quote  
  10. 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.
    Image Attached Files
    Quote Quote  
  11. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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.

    Bernix
    Last edited by Bernix; 23rd Jan 2018 at 08:48. Reason: Edit
    Quote Quote  
  12. Originally Posted by Bernix View Post
    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.
    No, that shouldn't be the problem. You can either do:
    --fps %(fps)
    or
    --fps %(fpsnum)/%(fpsden)
    I usually prefer the latter as e.g. 24000/1001 is exact while 23.976 is not.
    Quote Quote  
  13. Originally Posted by Bernix View Post
    Edit: it is novelty for me that wrong bit depth is causing twice longer video.
    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).
    Quote Quote  
  14. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  15. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    I think he was talking about Bluray...
    Quote Quote  
  16. 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
    Quote Quote  
  17. Originally Posted by Bernix View Post
    Yes, I also prefer 24000/1001 but better do it manually. How cli can get fpsden from video?
    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.
    Quote Quote  
  18. Originally Posted by Tarnum View Post
    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
    4K Blu-Ray allows different fps (for HEVC):
    24000/1001 (~= 23.976)
    24
    25
    50
    60000/1001 (~= 59.94)
    60 (<- this was added with 4K Blu-Ray. All others were already allowed on "HD" Blu-Ray.)

    24000/1001 will be most common for Hollywood movies.
    Last edited by sneaker; 23rd Jan 2018 at 09:21.
    Quote Quote  
  19. Originally Posted by sneaker View Post
    24000/1001 will be most common for Hollywood movies.
    - I didn't know, I thought it is possible to convert video from celluloid to 4K Blu-Ray with fps 59.94. I'm not right?
    Quote Quote  
  20. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Just use Mediainfo to get information of source file. Probably possible on BR files.

    Bernix
    Quote Quote  
  21. Originally Posted by Tarnum View Post
    Originally Posted by sneaker View Post
    24000/1001 will be most common for Hollywood movies.
    - I didn't know, I thought it is possible to convert video from celluloid to 4K Blu-Ray with fps 59.94. I'm not right?
    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.
    Quote Quote  
  22. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  23. "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.)
    Quote Quote  
  24. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  25. No one uses 16 bit as final format. x264 supports max 10 bit output, x265 max 12 bit output.
    Quote Quote  
  26. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  27. I don't know what he did with the source, source filters, filtering. It could be 16 bit is his intermediate format. You can pass that to x264cli and x264cli will use its in-built dithering filter to get it down to 8 bit or 10 bit.
    Quote Quote  
  28. Hey guys!
    I used 16 bit hopefully I will get video with redudant possibilities for editing. But what I got:
    Image
    [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)"
    What is my mistake?
    Quote Quote  
  29. --input-depth 16 only tells x264 that the input is 16 bit. If the input isn't actually 16 bit you will only produce garbage.

    How does the picture look in the VirtualDub preview? Are you using AviSynth? Show "File"->"File Information" and MediaInfo ("View"->"Text").
    Quote Quote  
  30. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    I would decide to codec about input. So if is it possible to skip bitdepth and csp, I would decide program.

    Bernix
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!