VideoHelp Forum
+ Reply to Thread
Page 3 of 3
FirstFirst 1 2 3
Results 61 to 78 of 78
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  



Similar Threads

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