VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 42
Thread
  1. Hi, everyone!! I have a lot of files, mainly satellite backhaul/fronthaul feeds at 1080/25i that I'd like to convert to 1080/50i. (or for some, to 1080/59.94i, as I have 29.97i footage too) I know I can use Handbrake with Yadif and Bob to achieve that, but I don't want to deinterlace, I need my outputs to be interlaced. I've spent hours looking for a solution, tried ffmpeg for this, but the output always ends up progressive even when I explicitly had told it to interlace or to at least preserve the interlaced frames/fields. I also used ffmpeg Clever GUI, which was a lot less confusing, and created different files each time; once, the output would be progressive, the other time, it would come out interlaced and with interleaved fields, but also have severe scanline and combing artifacts all over the place that I couldn't seem to get rid of regardless of what deinterlacing filter or just media player was used.

    Here's the MediaInfo log of one of the files that I'm working with:
    HTML Code:
    Video 
    ID : 4113 (0x1011) 
    Menu ID : 1 (0x1) 
    Format : MPEG Video 
    Format version : Version 2 
    Format profile : Main@High 
    Format settings : BVOP 
    Format settings, BVOP : Yes 
    Format settings, Matrix : Default 
    Format settings, GOP : M=4, N=28 
    Format settings, picture structure : Field 
    Codec ID : 2 
    Duration : 4 min 15 s 
    Bit rate mode : Constant 
    Bit rate : 37.5 Mb/s 
    Maximum bit rate : 33.1 Mb/s 
    Width : 1 920 pixels 
    Height : 1 080 pixels 
    Display aspect ratio : 16:9 
    Frame rate : 25.000 FPS 
    Color space : YUV 
    Chroma subsampling : 4:2:0 
    Bit depth : 8 bits 
    Scan type : Interlaced 
    Scan order : Top Field First 
    Compression mode : Lossy 
    Bits/(Pixel*Frame) : 0.724 
    Time code of first frame : 02:57:46:18 
    Time code source : Group of pictures header 
    Stream size : 1.12 GiB (89%) 
    Color primaries : BT.709 
    Transfer characteristics : BT.709 
    Matrix coefficients : BT.709 
    And here's what I want my output to "look" like:
    HTML Code:
    Video 
    ID : 1 
    Format : AVC 
    Format/Info : Advanced Video Codec 
    Format profile : High@L4.1 
    Format settings : 3 Ref Frames 
    Format settings, CABAC : No 
    Format settings, Reference frames : 3 frames 
    Codec ID : V_MPEG4/ISO/AVC 
    Duration : 3 min 2 s 
    Bit rate mode : Constant 
    Bit rate : 31.3 Mb/s 
    Width : 1 920 pixels 
    Height : 1 080 pixels 
    Display aspect ratio : 16:9 
    Frame rate mode : Variable 
    Frame rate : 50 FPS 
    Original frame rate : 25 FPS 
    Color space : YUV 
    Chroma subsampling : 4:2:0 
    Bit depth : 8 bits 
    Scan type : Interlaced 
    Scan type, store method : Separated fields 
    Scan order : Top Field First 
    Bits/(Pixel*Frame) : 0.252 
    Stream size : 682 MiB (94%) 
    Default : Yes 
    Forced : No 
    Color range : Limited 
    Color primaries : BT.709 
    Transfer characteristics : BT.709 
    Matrix coefficients : BT.709 
    I need the scan order to be "Top Fields First," and the Scan Type, store method, "Separated fields." The video needs to be losslessly re-encoded either back to source MPEG2 or to H.264.

    I've also "heard" that AviSynth can do this better than ffmpeg can, but am not very familiar with it. If anybody knows of the right plugin and the right script to get this done, I'd be INFINITELY grateful to you. Just PLEASE, include all the tiny little steps so I don't get confused. Thanks a lot, in advance.
    Quote Quote  
  2. Member Skiller's Avatar
    Join Date
    Oct 2013
    Location
    Germany
    Search PM
    25i and 50i are two terms to describe the exact same thing, so I don't understand what you are trying to archive.

    25i = 50 fields in 25 interlaced frames
    50i = 50 fields in 25 interlaced frames
    Quote Quote  
  3. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Yes, the request is absolutely a non sense
    Quote Quote  
  4. I'm trying to increase the framerate while keeping the video interlaced.
    Quote Quote  
  5. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    With the new frames being interpolated from the existing? To what purpose?
    Quote Quote  
  6. Originally Posted by lollo View Post
    With the new frames being interpolated from the existing? To what purpose?
    To make the video "feel" smoother. I've seen files that were originally 29.97i converted to 59.97i and they look a lot smoother compared to what they originally were.
    Quote Quote  
  7. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    "I've seen things you people wouldn't believe..."
    Quote Quote  
  8. Originally Posted by lollo View Post
    "I've seen things you people wouldn't believe..."
    Okay, so, if you're going to act like a jerk, then PLEASE keep your help to yourself. Thank you!
    Quote Quote  
  9. Originally Posted by lollo View Post
    "I've seen things you people wouldn't believe..."
    Quote Quote  
  10. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Okay, so, if you're going to act like a jerk, then PLEASE keep your help to yourself. Thank you!
    Actually, who is acting like a jerk is not me. I'll STOP here. You are welcome!
    Quote Quote  
  11. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by ProWo View Post
    Originally Posted by lollo View Post
    "I've seen things you people wouldn't believe..."
    In italiano suona ancora meglio: "Ho visto cose che voi umani..."
    Quote Quote  
  12. Originally Posted by lollo View Post
    Okay, so, if you're going to act like a jerk, then PLEASE keep your help to yourself. Thank you!
    Actually, who is acting like a jerk is not me. I'll STOP here. You are welcome!
    When was I mean to you again? I'm politely asking for help, and you are being rude instead of telling me what is what.
    Quote Quote  
  13. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by simon744 View Post
    When was I mean to you again? I'm politely asking for help, and you are being rude instead of telling me what is what.
    I did not want to be rude, I just thought that Skiller's answer was clear and final.
    Quote Quote  
  14. Originally Posted by lollo View Post
    Originally Posted by simon744 View Post
    When was I mean to you again? I'm politely asking for help, and you are being rude instead of telling me what is what.
    I did not want to be rude, I just thought that Skiller's answer was clear and final.
    Thank you, but you were in fact rude. I'm sorry if I was rude, too.

    I'm just talking about something I saw myself and continue to see regularly.

    Here's the MediaInfo log of one example:
    HTML Code:
    Video 
    ID : 1 
    Format : AVC 
    Format/Info : Advanced Video Codec 
    Format profile : High@L4.1 
    Format settings : 3 Ref Frames 
    Format settings, CABAC : No 
    Format settings, Reference frames : 3 frames 
    Codec ID : V_MPEG4/ISO/AVC 
    Duration : 3 min 2 s 
    Bit rate mode : Constant 
    Bit rate : 31.3 Mb/s 
    Width : 1 920 pixels 
    Height : 1 080 pixels 
    Display aspect ratio : 16:9 
    Frame rate mode : Variable 
    Frame rate : 59.940 (60000/1001) FPS 
    Original frame rate : 29.970 (30000/1001) FPS 
    Color space : YUV 
    Chroma subsampling : 4:2:0 
    Bit depth : 8 bits 
    Scan type : Interlaced 
    Scan type, store method : Separated fields 
    Scan order : Top Field First 
    Bits/(Pixel*Frame) : 0.252 
    Stream size : 682 MiB (94%) 
    Default : Yes 
    Forced : No 
    Color range : Limited 
    Color primaries : BT.709 
    Transfer characteristics : BT.709 
    Matrix coefficients : BT.709 
    Clearly, the bitrate of this file initially wasn't 59.94fps, but now it is, and the video's interlaced too, which isn't typical. I'm just curious as to how was that achieved?
    Last edited by simon744; 30th Aug 2023 at 09:03.
    Quote Quote  
  15. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Post the sample please
    Quote Quote  
  16. I don't have the before, and am not sure if the metadata would be preserved if I were to try cutting the video myself, so am sending a link to the file:

    https://5qwt55-my.sharepoint.com/:v:/g/personal/dream66_5qwt55_onmicrosoft_com/EerRVaJ...43I8A?e=Oe3QY8

    P.S. I don't do torrents from the scene or something haha, this file's from Sharemania where people post backhauls of awards shows, performances, etc.
    Quote Quote  
  17. That video has interlaced frames and is encoded interlaced at 29.97 fps. MediaInfo shows the frame rate as variable but every frame has the same duration ~33 ms. MediaInfo also shows the frame rate as 59.95 fps -- but it is reporting the field rate, not the frame rate. This is how you can tell:

    Code:
    Scan type, store method                  : Separated fields
    When decompressed pairs of fields are woven together int frames, so 59.94 fields per second becomes 29.97 frames per second. So the video is 29.97i.

    Played back correctly you get smooth motion with 59.94 different pictures per second. It does not play correctly in my browser (Firefox). But after downloading the video and playing it with MPCHC it plays properly.
    Quote Quote  
  18. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    I don't have the before, and am not sure if the metadata would be preserved if I were to try cutting the video myself, so am sending a link to the file
    Thanks.

    Master jagabo already said everything. Once more, "I've seen things you people wouldn't believe..."
    Quote Quote  
  19. Originally Posted by jagabo View Post
    That video has interlaced frames and is encoded interlaced at 29.97 fps. MediaInfo shows the frame rate as variable but every frame has the same duration ~33 ms. MediaInfo also shows the frame rate as 59.95 fps -- but it is reporting the field rate, not the frame rate. This is how you can tell:

    Code:
    Scan type, store method                  : Separated fields
    When decompressed pairs of fields are woven together int frames, so 59.94 fields per second becomes 29.97 frames per second. So the video is 29.97i.

    Played back correctly you get smooth motion with 59.94 different pictures per second. It does not play correctly in my browser (Firefox). But after downloading the video and playing it with MPCHC it plays properly.
    Thank you very much!! That was very clear, and gave me a better understanding. Now what am interested in is how do I go on about processing/encoding the 25i and 29.97i files in my possession to be like that one, as in having a field rate that's double the frame rate? All for the video to be smoother? And WITHOUT DE-INTERLACING.
    Last edited by simon744; 30th Aug 2023 at 09:21.
    Quote Quote  
  20. Originally Posted by lollo View Post
    I don't have the before, and am not sure if the metadata would be preserved if I were to try cutting the video myself, so am sending a link to the file
    Thanks.

    Master jagabo already said everything. Once more, "I've seen things you people wouldn't believe..."
    Thanks for your help, and again sorry for the misunderstanding we first had.

    I'm no expert at this, just trying to learn, though slowly.
    Quote Quote  
  21. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Thanks for your help, and again sorry for the misunderstanding we first had.
    No problem at all
    Quote Quote  
  22. Originally Posted by simon744 View Post
    Now what am interested in is how do I go on about processing/encoding the 25i and 29.97i files in my possession to be like that one, as in having a field rate that's double the frame rate?
    Since 25p (or 25p frames encoded as 25i) only have 25 different pictures per second. Simply duplicating frames to make 50p or 60p will not give you smooth motion. You have to create new frames with motion interpolation. There are various methods of doing this but they sometimes generate gross distortions. You can try FrameRateConverter(), InterFrame(), or RIFE() in AviSynth. Topaz and Vegas have such features.
    Quote Quote  
  23. Originally Posted by jagabo View Post
    Originally Posted by simon744 View Post
    Now what am interested in is how do I go on about processing/encoding the 25i and 29.97i files in my possession to be like that one, as in having a field rate that's double the frame rate?
    Since 25p (or 25p frames encoded as 25i) only have 25 different pictures per second. Simply duplicating frames to make 50p or 60p will not give you smooth motion. You have to create new frames with motion interpolation. There are various methods of doing this but they sometimes generate gross distortions. You can try FrameRateConverter(), InterFrame(), or RIFE() in AviSynth. Topaz and Vegas have such features.
    But looks like none of these will get me what I need. Anyways, thanks a lot for your help!
    Quote Quote  
  24. Originally Posted by simon744 View Post
    Originally Posted by jagabo View Post
    Originally Posted by simon744 View Post
    Now what am interested in is how do I go on about processing/encoding the 25i and 29.97i files in my possession to be like that one, as in having a field rate that's double the frame rate?
    Since 25p (or 25p frames encoded as 25i) only have 25 different pictures per second. Simply duplicating frames to make 50p or 60p will not give you smooth motion. You have to create new frames with motion interpolation. There are various methods of doing this but they sometimes generate gross distortions. You can try FrameRateConverter(), InterFrame(), or RIFE() in AviSynth. Topaz and Vegas have such features.
    But looks like none of these will get me what I need.
    Once you double the frame rate with a motion interpolation it's easy to convert that back to interlaced video with smooth motion.
    Quote Quote  
  25. Originally Posted by jagabo View Post
    Originally Posted by simon744 View Post
    Originally Posted by jagabo View Post
    Originally Posted by simon744 View Post
    Now what am interested in is how do I go on about processing/encoding the 25i and 29.97i files in my possession to be like that one, as in having a field rate that's double the frame rate?
    Since 25p (or 25p frames encoded as 25i) only have 25 different pictures per second. Simply duplicating frames to make 50p or 60p will not give you smooth motion. You have to create new frames with motion interpolation. There are various methods of doing this but they sometimes generate gross distortions. You can try FrameRateConverter(), InterFrame(), or RIFE() in AviSynth. Topaz and Vegas have such features.
    But looks like none of these will get me what I need.
    Once you double the frame rate with a motion interpolation it's easy to convert that back to interlaced video with smooth motion.
    Thank you very much! Looks like AviSynth will be of most help to me. Do you happen to know which of the plugins you have mentioned will be best for this and what scripts should I run to increase the frame/field rate and then interlace? I'm not familiar with AviSynth.
    Quote Quote  
  26. So , how to load that posted video into avisynth/vapoursynth so it's 30i?
    Quote Quote  
  27. After making it 60p use:

    Code:
    AssumeTFF()
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    Then encode interlaced, top field first.
    Quote Quote  
  28. Assuming the frames are already progressive and you want to double the frame rate, a full script might look like:

    Code:
    LWlibavVideoSource("filename.ext")
    InterFrame(cores=4) # defaults to double frame rate
    AssumeTFF()
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    or:

    Code:
    LWlibavVideoSource("filename.ext")
    FrameRateConverter() # defaults to double frame rate
    AssumeTFF()
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    or:

    Code:
    LWlibavVideoSource("filename.ext")
    z_ConvertFormat(pixel_type="RGBPS", colorspace_op="709:709:709:l=>rgb:709:709:f")
    Rife(gpu_thread=1, model=6, sc=true, sc_threshold=0.12) # defaults to double frame rate
    z_ConvertFormat(pixel_type="YUV420P8", colorspace_op="rgb:709:709:f=>709:709:709:l")
    AssumeTFF()
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    The first two have lots of variables you can use to tune the results, bias toward blending or distortion, speed vs. quality, etc. The last one usually gives the best quality.

    But why would you want interlaced video when you can just leave your video at 50p or 60p and have smooth motion with no interlace artifacts, reduced resolution, and worse encoding?

    And as I mentioned before, motion interpolation like this often creates very ugly artifacts. I don't really recommend it.
    Quote Quote  
  29. thanks, I manage to load it as 60p by ffms2, as you mentioned, then at the end actually output it as 60p :
    Code:
    from havsfunc import QTGMC
    import vapoursynth as vs
    from vapoursynth import core
    clip = core.ffms2.Source("Bebe Rexha - I'm A Mess.mkv", fpsnum=60000, fpsden=1001)
    clip = clip.std.SeparateFields(tff=True)
    clip = clip.std.SelectEvery(cycle=4, offsets=[0, 3])
    clip = clip.std.DoubleWeave(tff=True)
    clip = clip.std.SelectEvery(cycle=2, offsets=0)
    clip = QTGMC(clip, TFF=True)
    clip.set_output()
    Last edited by _Al_; 1st Sep 2023 at 00:33.
    Quote Quote  
  30. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    And as I mentioned before, motion interpolation like this often creates very ugly artifacts. I don't really recommend it.
    That's what I tried to suggest to OP in post #5 https://forum.videohelp.com/threads/411010-Converting-1080-25i-to-1080-50i?p=2703524&v...=1#post2703524

    I failed to understand he has no knowledge on the matter, so your detailed explanation should convince him now. Thanks.
    Quote Quote  



Similar Threads

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