VideoHelp Forum
+ Reply to Thread
Page 3 of 4
FirstFirst 1 2 3 4 LastLast
Results 61 to 90 of 106
Thread
  1. Here an undistorted zoomed 16:9 1920x1080 version which avoids the pillars. Note that one has to vertically crop into the picture though.

    Avisynth script (one can do the same in Vdub or ffmpeg of course):
    Code:
    v=ffms2("HORSE(01).vob")
    a=LWLibavAudioSource("HORSE(01).vob")
    AudioDub(v,a)
    Crop(0, 60, -4, -62)
    spline36resize(1920,1080) #square pixels
    Edit: and here the ffmpeg commandline which does essentially the same and includes the x264 encoding:
    Code:
    ffmpeg -i "Horse(01).vob" -vf setfield=tff,fps=30000/1001,fieldmatch,decimate,crop=716:358,scale=1920:1080" -c:v libx264 -crf 20 -g 50 -c:a ac3 "HORSE(01)_zoomed_.mp4
    Image Attached Files
    Last edited by Sharc; 30th Jun 2024 at 12:38.
    Quote Quote  
  2. @Sharc & Alwyn,
    I made an error when I created the cropped .vob & it is 23.976 fps.
    That is the one I uploaded .
    The original DVD rip is 29.97 fps & I thought I has made the clipped file withthat.
    That is the reason I use 30 fps with ffmpeg & should explain the juddar Shars saw.

    What software did you see the juddar with ?
    I also checked the original uncompressed rip in VDub2 & saw some duplicated frames in it.
    So no surprise that some were in the conversion.

    I used ffmpeg cropdetect to determine the crop I used.
    It should have been accurate but it could have been off enough to cause the slight vertical crop.
    Did VDub2 also show this?
    I expected a slight horizontal stretch.

    Alwyn I tried the last .mp4 you created & it played on my 55" wide screen & filled the screen.
    Quote Quote  
  3. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I made an error when I created the cropped .vob & it is 23.976 fps.
    That is the one I uploaded .
    The original DVD rip is 29.97 fps & I thought I has made the clipped file withthat.
    Interesting. The HORSE(01).vob (post #35) shows in MediaInfo as 23.976, but VDub (File>File Info) shows it as 29.97, as does Windows File Properties. When stepping through the frames with VDub, you can see the pppccpppcc structure that Sharc mentioned in post #41.

    Applying the IVTC filter in VDub definitely clears up the combing, so I assume the VOB is indeed 29.97.

    Alwyn I tried the last .mp4 you created & it played on my 55" wide screen & filled the screen.
    On my 55" LG and 60" Sharp, it plays with the small black side bars, as it does in VLC Player.

    On my TVs, the zoom/Aspect was (already) on "Original".

    If my file is indeed filling the screen, then either you could change the TV to not stretch the video, crop it to 16:9 as per Sharc's suggestion, or encode small black side bars to fill it out to 16:9 so your TV won't stretch it.

    Fun fun fun!
    Quote Quote  
  4. My 55" is a Sharp.
    The setting I use is "Direct".
    It has 7 or 6 settings.
    "Auto" usually uses Direct.
    2 are usually grayed out & are only active if a video uses those. DotbyDot or Panoramic.
    The stretching is minimal & I do not mind that.
    Quote Quote  
  5. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Quote Quote  
  6. Originally Posted by Alwyn View Post
    Interesting. The HORSE(01).vob (post #35) shows in MediaInfo as 23.976, but VDub (File>File Info) shows it as 29.97, as does Windows File Properties. When stepping through the frames with VDub, you can see the pppccpppcc structure that Sharc mentioned in post #41.

    Applying the IVTC filter in VDub definitely clears up the combing, so I assume the VOB is indeed 29.97.
    About Framerate and Soft-telecine:
    For film footage the video on the DVD .vob is progressive 23.976fps. No interlacing, no combing. Perfect progressive film frames.
    In order to make it NTSC compliant the stream is flagged accordingly. The flags are instructions for the player how to convert the 23.976 progressive frames to NTSC compliant 29.97fps (actually 59.94 fields per second) during playback, on the fly.

    MediaInfo reports the .vob as 23.976fps progressive which is correct, and it also reports the Scan order as 2:3 pulldown, which is correct.

    What one eventually sees depends on the video decoder/player (and on the container):
    a) The decoder can just ignore the flags and play the video as 23.976fps progressive. It delivers the 23.976fps progressive frames as they are stored in the .vob.
    b) The decoder can respect the flags and and play the frames as a pppccpppccpppcc... sequence at 29.97fps. ppp = 3 progressive frames followed by cc = 2 combed frames. This is what we get with LWLibavVideoSource for example. It respects the flags.
    c) A converter may just convert the 23.976fps progressive frames to 29.97fps by repeating every 4th frame, resulting in a juddery progressive sequence like abcddefghhijkll .... with dd,hh,ll representing the frame repeats.
    The same pattern one will see when just applying fieldmatching without decimation to the telecined video. This seems to be what Vdub does. Fieldmatching should be followed by decimation (TFM().TDecimate() in Avisynth, or the IVTC filter in Vdub configured for decimation) which removes the duplicates and restores the original 23.976fps film frames. This process is called IVTC.

    No miracles, it's all logic.

    About telecine see
    https://en.wikipedia.org/wiki/Telecine
    https://en.wikipedia.org/wiki/Three-two_pull_down
    Last edited by Sharc; 1st Jul 2024 at 07:44. Reason: typos
    Quote Quote  
  7. @cholla: If you are still in doubt and can't make ffms2 etc. working properly, try the ffmpeg commandline in post#61 and you are done.
    Quote Quote  
  8. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Informative as always, Sharc. So would the processing options be:

    1. VDub IVTC filter or
    2. AVISynth: Use "FFMS2" to open the file or
    3. AVISynth: Use TFM() and Tdecimate().

    Because all of those are giving me a good-looking video with no combing or dupes as far as I can see.
    Quote Quote  
  9. Originally Posted by Alwyn View Post
    Informative as always, Sharc. So would the processing options be:

    1. VDub IVTC filter or
    2. AVISynth: Use "FFMS2" to open the file or
    3. AVISynth: Use TFM() and Tdecimate().

    Because all of those are giving me a good-looking video with no combing or dupes as far as I can see.
    1. yes, configured as discussed.
    2. yes, ffms2 by default ignores the flags (may change in a next revision, who knows?)
    3. Depends on the source filter which you use. The particular source filter (or its settings, some have options) may ignore or respect the flags. TFM().TDecimate() needed if the source filter like LWLibavVideoSource() for example respects the flags.

    Note that for hard-telecined stuff you would always need TFM().TDecimate().

    And it's highly recommended to always inspect carefully what you eventually got.
    Quote Quote  
  10. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks a lot.
    Quote Quote  
  11. And you can always try out the behaviour of different source filters with Vdub by using an .avs script as input rather than opening the file directly in Vdub.
    Quote Quote  
  12. Originally Posted by Sharc View Post
    ffms2 by default ignores the flags
    Be careful with this. Videos are often a mix of soft and hard pulldown. Treating the entire video as 23.976 with soft pulldown may leave combed frames and lead to A/V sync problems. It's safest to perform soft pulldown and then let TIVTC sort things out.
    Quote Quote  
  13. Originally Posted by jagabo View Post
    Originally Posted by Sharc View Post
    ffms2 by default ignores the flags
    Be careful with this. Videos are often a mix of soft and hard pulldown. Treating the entire video as 23.976 with soft pulldown may leave combed frames and lead to A/V sync problems. It's safest to perform soft pulldown and then let TIVTC sort things out.
    Good point. Thanks for the hint to better respect the flags and to take the safe route.
    I noticed that former versions of ffms2() had the option with rffmode=0/1/2 to control the handling of the flags. This seems to have been dropped with later releases. I think that LWLibavVideoSource does by default respect the flags. A reliable decoder for soft-telecined mpeg2 is still DGIndex I think.
    Quote Quote  
  14. Originally Posted by Sharc View Post
    I think that LWLibavVideoSource does by default respect the flags.
    That is correct. It applies the pulldown to produce all 29.97 fps interlaced frames -- just like a DVD player does at the SD analog outputs.

    Originally Posted by Sharc View Post
    A reliable decoder for soft-telecined mpeg2 is still DGIndex I think.
    Yes.
    Quote Quote  
  15. Originally Posted by Sharc View Post
    @cholla: If you are still in doubt and can't make ffms2 etc. working properly, try the ffmpeg commandline in post#61 and you are done.
    I never found a Windows 32-bit ffms2 set of files for VDub2.
    I have other software that has the ffms2 file set .
    I tried copying those to VDub2 but it did not work with them.
    I also have them in the Avisynth folder in Program Files.
    I did not test yet to see if any software I have will work with the Avisynth code you posted.

    I tried the ffmpeg code you posted but I'm not comepletly satisfied with it.
    I have borrowed some of it.
    One thing on the left side of my TV screen there is a narrow bar of artifacts.
    That's the best I can describe it.

    I decided the video is a 23.976fps as in your post#66.
    That is what I have been working with.
    Even though I thought it was 29.97fps & that is what you made the ffmpeg code for.
    The video is smoother with 23.976fps.

    I found this information for the decimate filter as I had never used it:
    The decimate filter currently only works for constant frame rate input. If your input has mixed telecined (30fps) and progressive content with a lower framerate like 24fps use the following filterchain to produce the necessary cfr stream: dejudder,fps=30000/1001,fieldmatch,decimate.
    dejudder,fps=30000/1001,fieldmatch,decimate

    The default cycle for decimate is 1 in 5 (because the most common case is "NTSC" decimation from 29.97 to 23.976)

    @ Alwyn,
    I have not tried your last VDub2 settings yet but I plan to try them.
    Quote Quote  
  16. Originally Posted by cholla View Post
    I never found a Windows 32-bit ffms2 set of files...
    32bit version attached below (x86.zip). Unzip and put it into your Avisynth plugins folder

    I tried the ffmpeg code you posted but I'm not comepletly satisfied with it.
    I have borrowed some of it.
    One thing on the left side of my TV screen there is a narrow bar of artifacts.
    That's the best I can describe it.
    Strange. Maybe an issue with an outdated 32bit ffmpeg or with your TV. Do the attached files still show the artefacts on your PC or TV??

    I decided the video is a 23.976fps as in your post#66.
    That is what I have been working with.
    Even though I thought it was 29.97fps & that is what you made the ffmpeg code for.
    The telecined video is 29.97fps. The ffmpeg commandline applies IVTC and outputs the original 23.976fps. See the 1st attached file.

    Or if all you want is to crop the top+bottom borders and stretch it horizontally to 16:9 (=distort the picture width by +7%) you can use this commandline (see the 2nd attached file):
    Code:
    ffmpeg -i "Horse(01).vob" -vf "setfield=tff,fps=30000/1001,fieldmatch,decimate,crop=716:388:0:44,scale=1920:1080,setdar=dar=16/9" -c:v libx264 -crf 18 -c:a ac3 "HORSE(01) 1920x1080_ffmpeg_stretch.mp4
    Image Attached Files
    Last edited by Sharc; 4th Jul 2024 at 06:27. Reason: 32bit ffms2 attached
    Quote Quote  
  17. @Sharc,
    For post #76
    These look a lot like other videos you posted created with ffmpeg.
    HORSE(01) 1920x1080_ffmpeg_stretch.mp4
    The people are a little narrower & further down.
    Code:
    ffmpeg -i "Horse(01).vob" -vf "setfield=tff,fps=30000/1001,fieldmatch,decimate,crop=716:388:0:44,scale=1920:1080,setdar=dar=16/9" -c:v libx264 -crf 18 -c:a ac3 "HORSE(01) 1920x1080_ffmpeg_stretch.mp4
    HORSE(01) 1920x1080_ffmpeg_.mp4
    People are some wider & longer & closer to the top.
    Was this .mp4 created with the code in post#61 ?

    Is there a software that will show the duplicate pattern of a video like what you posted "abcddefghh....." ?
    Or do I have to watch it frame by frame & determine this ?

    For the "artifacts" I saw on the left side.
    When I played the videos again what I saw was a vertical line about 1/8" wide from top top bottom of the screen.
    I could see the video through it but it was like the bright or white had been turned up in just that area.
    I also saw this on my videos but had to look closer.
    I did not see it when I played a couple of DVDs.
    So it could be my TV or my BD player .

    I DLed the ffms2 files.
    I guess I'm still not doing it correctly.
    No more ffms error but this error:
    Avisynth open failure:
    "Script error: there is no function named "LWLibavAudioSource"
    (C:\Users\user\Desktop\FFMPEGNew\code.avs, line 2)or:"
    I just about have the ffmpeg code I plan to use.
    I will create a clip if I'm satisfied with it & post it.

    I opted not to use decimate.
    Quote Quote  
  18. Originally Posted by cholla View Post
    @Sharc,
    For post #76
    These look a lot like other videos you posted created with ffmpeg.
    HORSE(01) 1920x1080_ffmpeg_stretch.mp4
    The people are a little narrower & further down.
    Code:
    ffmpeg -i "Horse(01).vob" -vf "setfield=tff,fps=30000/1001,fieldmatch,decimate,crop=716:388:0:44,scale=1920:1080,setdar=dar=16/9" -c:v libx264 -crf 18 -c:a ac3 "HORSE(01) 1920x1080_ffmpeg_stretch.mp4
    HORSE(01) 1920x1080_ffmpeg_.mp4
    People are some wider & longer & closer to the top.
    Was this .mp4 created with the code in post#61 ?
    Of course the 2 variants look slightly different. It's by design. The first one is vertically cropped+zoomed, the second one is stretched.
    You have to understand the options of putting a ~1.65:1 picture into a 16:9 frame.

    Is there a software that will show the duplicate pattern of a video like what you posted "abcddefghh....." ?
    Or do I have to watch it frame by frame & determine this ?
    Frame by frame, yes. In realtime the jerkyness caused by frame repetitions is most eyecatching for horizontal pannig scenes.
    (Remember that the DVD player will take these headaches away from you and output the video correctly for your TV).

    For the "artifacts" I saw on the left side.
    When I played the videos again what I saw was a vertical line about 1/8" wide from top top bottom of the screen.
    I could see the video through it but it was like the bright or white had been turned up in just that area.
    I also saw this on my videos but had to look closer.
    I did not see it when I played a couple of DVDs.
    So it could be my TV or my BD player .
    Really, I don't know what your player/TV is doing with these .mp4 files producing "vertical lines". Do you see these when you play the files on your PC?

    I DLed the ffms2 files.
    I guess I'm still not doing it correctly.
    No more ffms error but this error:
    You need to install this Avisynth plugin as well:
    http://avisynth.nl/index.php/LSMASHSource

    I just about have the ffmpeg code I plan to use.
    I will create a clip if I'm satisfied with it & post it.
    It's all good as long as you are happy with it. Post it.

    I opted not to use decimate.
    Decimation removes the duplicates as I explained in post #66. Whether you are getting duplicates or not depends on the source filter.

    (Bottom line: Why are people not just putting their DVDs into the player and watch these as intended? )
    Last edited by Sharc; 5th Jul 2024 at 01:43.
    Quote Quote  
  19. @cholla
    Btw. how does this .mp4 clip play on your player/TV? Do you see the full 16:9 frame? Any lines/artifacts on the sides?
    Image Attached Files
    Quote Quote  
  20. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Sharc
    Bottom line: Why are people not just putting their DVDs into the player and watch these as intended?
    Easier to call up the MPEG2/MP4 on your network and play it on your TV.
    Quote Quote  
  21. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    how does this .mp4 clip play on your player/TV?
    Thanks for that, @Sharc. Interesting! LG 55": missing probably 0.5% off the bottom, Sharp 60": got the whole frame right on the screen edge.
    Quote Quote  
  22. You may also find that one has to turn TV sharpener settings fully down to avoid moiré/aliasing with the resolution test patterns. Happened to all TV's/brands I have tested.
    Quote Quote  
  23. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by Sharc View Post
    (Bottom line: Why are people not just putting their DVDs into the player and watch these as intended? )
    +1, unbelievable how people make things more difficult and lower quality
    Quote Quote  
  24. Member The_Doman's Avatar
    Join Date
    Feb 2004
    Location
    Netherlands
    Search PM
    Originally Posted by lollo View Post
    Originally Posted by Sharc View Post
    (Bottom line: Why are people not just putting their DVDs into the player and watch these as intended? )
    +1, unbelievable how people make things more difficult and lower quality
    Yes exactly this too, i always wonder the same when reading these kind of topics.
    Why waste all the time/effort/energy with extra conversion steps?
    If you want the convenience of playing it on your network just put it "as is" lossless in a MKV container and let the TV do it's job.
    Last edited by The_Doman; 5th Jul 2024 at 16:26.
    Quote Quote  
  25. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    If you want the convenience of playing it on your network just put it "as is" lossless in a MKV container and let the TV do it's job.
    What about the letterboxing?
    Quote Quote  
  26. Originally Posted by Sharc View Post
    @cholla
    Btw. how does this .mp4 clip play on your player/TV? Do you see the full 16:9 frame? Any lines/artifacts on the sides?
    The test pattern appeared as it was supposed to. I could see the thin white line on all sides.
    But no line on the left of my TV with this video.

    The line I am seeing on my TV seems to be only on some videos.
    It is about 1/8" wide & from top to bottom. Just one line. On the left edge of the screen.
    It is mostly translucent & from normal viewing distance I can barely see it.
    It was when I was looking for the pillar bars up close that I noticed it.

    I was able to download two different LSMASHSource.dll's .
    It made you code work I guess.
    I did a save video to a .mkv.
    I guess that is what I was supposed to do.
    The color was off a lot way to blue.
    The size of the 53 second .mkv was 7.7GB.
    So I must be doing something wrong.
    It created two files:
    HORSE(01).vob.ffindex
    HORSE(01).vob.lwi
    Quote Quote  
  27. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    The line I am seeing on my TV seems to be only on some videos.
    It sounds to me like the videos themselves have the line in them. Do a severe crop on one of those videos (so you remove any line that is in the video itself) and replay it on your TV.
    Quote Quote  
  28. Originally Posted by cholla View Post
    I was able to download two different LSMASHSource.dll's .
    It made you code work I guess.
    I did a save video to a .mkv.
    I guess that is what I was supposed to do.
    The color was off a lot way to blue.
    The size of the 53 second .mkv was 7.7GB.
    So I must be doing something wrong.
    No idea how you got the strong color offset (a lot (?) way to blue...). 601 vs 709 issue after upscaling?
    Use the Avisynth script of post#61, save it as script.avs, open it in Vdub2. Select the video compressor 'x264 8bit - H264/MPEG-4 AVC codec' and the audio compressor 'ffmpeg aac'. Select the .mp4 or .mkv container.
    The .lwi and .ffindex are just indexfiles you don't have to bother with, it just takes a little time to build these. You can delete these after the encoding job has been completed.

    Or if you don't get along with Vdub stick to the ffmpeg commandline.
    Last edited by Sharc; 6th Jul 2024 at 06:31.
    Quote Quote  
  29. Originally Posted by Alwyn View Post
    The line I am seeing on my TV seems to be only on some videos.
    It sounds to me like the videos themselves have the line in them. Do a severe crop on one of those videos (so you remove any line that is in the video itself) and replay it on your TV.
    Yes. I think @cholla is seeing the (mpeg2) border artifacts which are actually present on all 4 sides of the original .vob. He can crop these off and resize accordingly.

    In ffmpeg something like this crops the crud from all sides and resizes undistorted (cropping most from the bottom):
    Code:
    ffmpeg -i "Horse(01).vob" -vf "setfield=tff,fps=30000/1001,fieldmatch,decimate,crop=712:356:4:48,scale=1920:1080:out_colormatrix=bt601,setdar=dar=16/9" -c:v libx264 -crf 20 -c:a ac3 "HORSE(01) 1920x1080_ffmpeg_2.mp4
    Image Attached Files
    Last edited by Sharc; 6th Jul 2024 at 07:52. Reason: colormatrix added (script only)
    Quote Quote  
  30. Alwyn & Sharc,
    I'm not concerned about the line as I can't see it from where I watch the TV.
    Only very close up.

    @ Sharc,
    I got your code to work with your instructions.
    Then I tried it as I had the first time.
    No more blue & the colors looked fine.
    In both conversions.
    The .avi with no settings was still very large but the .mp4 was a normal size.
    I believe what was needed was the reboot I did.

    The "LSMASHSource-AviSynth-plugin=32bit" download has a LSMASHSource.dll its' size is 9589 KB.
    I use the one above.

    The "L-SMASH-Works-32bit" download has a LSMASHSource.dll its' size is 524KB.
    I did not try it. Since the first one worked.
    Quote Quote  



Similar Threads

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