VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 28 of 28
Thread
  1. Is it possible to do this? I want to make the beginning of my video be in 16:9 aspect ratio, and the remainder of the video should be in 4:3 aspect ratio with black bars on each side.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    What is the source resolution and what is the your intended target resolution?

    These days, mixed 16x9 and 4x3 is usually represented in a 16x9 box with black bars at the sides for the 4x3 content.
    What is the problem?
    Quote Quote  
  3. I am recording footage of a game in 320x240 resolution, which is 4:3. Iím stretching it to widescreen 16:9. I would like for the beginning of the footage to be stretched 4:3 footage, and the end of the footage to be 4:3 footage with black bars surrounding.

    Iíll post the video I want to do it with so you can understand better: https://youtube.com/watch?v=TBxwXcHPE5I
    From 0:00 until 0:36, I would like to have a 4:3 image stretched into 16:9 video. This is currently how it already is. From 0:36 to 0:40, I would like to have that 16:9 video squished into a 4:3 image, with black bars on each side of the video.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Upload your original 320x240 video directly here to this thread.

    I don't understand your goal; the Youtube image is already stretched to 16x9
    Quote Quote  
  5. Yes, I'm aware the video is already stretched to 16:9. That's the problem. I want the ending to be 4:3 with black bars on the side. Read the last sentence of my previous post to understand my goal.
    Quote Quote  
  6. You have to encode the first part as 16:9 footage, g.e. 1280x720. The second part will be encoded 960x720, with black bars of 160 pixels left and right, and aspect ratio of 16:9.
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    You mean like this?
    Image Attached Files
    Quote Quote  
  8. Yeah, exactly like that. Any way to do that just with VirtualDub, or will I need to use another program? VirtualDub is great for uploading this speedrun footage quickly with high quality (since I can rescale it to get VP9 encoding from YouTube, *and* I can stretch it to better match the widescreen setting I'm using in the game), so if I can avoid needing to use anything else, that's preferable. If I would need to use other software to do it, though, please make a recommendation.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Are you able to use the resize or some other filter to manipulate the videos the way you want?
    If so, you could always encode two separate videos using the exact same encoder settings and then join them together.

    I used an Avisynth script (very simple only 4 or 5 lines) to modify those last few seconds within the script,
    then just encode it once in Virtualdub. if you're interested in trying this I'll post the script
    Quote Quote  
  10. Yeah, post it please.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    This is the script I used, bear in mind it relates to the Youtube source dimension (640x360) that I downloaded and used.

    Code:
    lwlibavvideosource("I:\bin\Depot Agent 0_25-TBxwXcHPE5I.mp4") # open the source
    a=trim(0,1110)                           # game footage up to frame 1110
    b=trim(1111,0)                           # title at frame 1111 to the end
    b=b.spline36resize(480,360).addborders(80,0,80,0) # resize the titles/add the borders
    a+b                       # return  both parts
    Quote Quote  
  12. When attempting to run the script in VirtualDub, I receive the following error: "Error during script execution at line 1, column 19: Variable 'lwlibavvideosource' not found"
    Is there anything in particular I would need to do to set this up? I installed Avisynth with the latest build on the website.
    Last edited by Ohrami; 17th Feb 2021 at 01:23.
    Quote Quote  
  13. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Did you download and install the source filter Lsmash/LWLibAV
    https://github.com/HolyWu/L-SMASH-Works/releases/

    Otherwise post your complete script
    Quote Quote  
  14. I just downloaded the filter you sent and put it into my plugins folder in AviSynth, but didn't do any further setup. My full script:

    Code:
    lwlibavvideosource("F:\Users\Ohrami\Speedrunning Records\Depot Agent 25.avi") # open the source
    a=trim(0,2210)                           # game footage up to frame 1110
    b=trim(2210,0)                           # title at frame 1111 to the end
    b=b.spline36resize(1920,1440).addborders(320,0,320,0) # resize the titles/add the borders
    a+b                       # return  both parts
    Note that I cannot even run a script that just says "Version()" in it through VirtualDub, or anything.
    Quote Quote  
  15. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Did you create your script in Notepad and ensure it has the .avs extension?
    Put the script on the desktop,
    open Virtuldub and drag the script icon into the main window
    Quote Quote  
  16. Originally Posted by Ohrami View Post
    Code:
    b=trim(2210,0)                           # title at frame 1111 to the end
    b=trim(2211,0)
    Quote Quote  
  17. Originally Posted by davexnet View Post
    Did you create your script in Notepad and ensure it has the .avs extension?
    Put the script on the desktop,
    open Virtuldub and drag the script icon into the main window
    Yes, I did that. Your suggestion does not work, not even with a script that just says Version(). It just says "AVI Import Filter error: (Unknown) (80040154)" and opens a text file within VirtualDub called "VirtualDub2 Script Editor" which simply lists my already existing script within it.
    Quote Quote  
  18. I realized my issue. I needed AviSynth+ due to having a 64-bit operating system. It works now. Thanks for the assistance. The only question I have remaining: How do I make it maintain the audio from the original video file?
    Quote Quote  
  19. You can remux it later with the new video.
    Quote Quote  
  20. Originally Posted by ProWo View Post
    You can remux it later with the new video.
    And how can I do that using VirtualDub2?
    Quote Quote  
  21. You can do the whole operation with my clever FFmpeg-GUI.
    Load your file, main, modify video stream, continue, check Avisynth, create script. A basic Avisynth script is created. Modify them as you like, test it with virtualdub2 , set the encoder you like, set DAR to 16:9 and click convert. Then click on multiplex, the new created videostream is already loaded as video file, click on Audio file, accept the proposed file (your original file), set the container (mkv, mp4) you like, click multiplex, ALL DONE.

    Image
    [Attachment 57423 - Click to enlarge]
    Last edited by ProWo; 17th Feb 2021 at 09:14.
    Quote Quote  
  22. Originally Posted by ProWo View Post
    You can do the whole operation with my clever FFmpeg-GUI.
    Load your file, main, modify video stream, continue, check Avisynth, create script. A basic Avisynth script is created. Modify them as you like, test it with virtualdub2 , set the encoder you like, set DAR to 16:9 and click convert. Then click on multiplex, the new created videostream is already loaded as video file, click on Audio file, accept the proposed file (your original file), set the container (mkv, mp4) you like, click multiplex, ALL DONE.

    Image
    [Attachment 57423 - Click to enlarge]
    So, these recordings are part of a much larger and much longer recording that I then must cut down to size. How can I use either your tool or VirtualDub (preferably the latter) to ensure that the audio is cut properly to perfectly sync with my new, cut recording?
    Quote Quote  
  23. You can easily do it all in VirtualDub. Encode the first section as 16:9. Encode the second section with the 4:3 video in a 16:9 frame of the same size. Encode the third section as 16:9 like the first. Then open the first section, append the second section, and append the third section. Save the final result with Direct Stream Copy.
    Quote Quote  
  24. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    There's actually another way in Virtualdub, I only just found out about it myself today.
    Set up the resize filter, highlight it in the list then select the "Blending" button on the right -
    allows you set a frame range it should apply to.

    See Antons post on 2020-03-23
    https://sourceforge.net/p/vdfiltermod/tickets/314/
    Last edited by davexnet; 19th Feb 2021 at 14:27.
    Quote Quote  
  25. Originally Posted by davexnet View Post
    There's actually another way in Virtualdub, I only just found out about it myself today.
    Set up the resize filter, highlight it in the list then select the "Blending" button on the right -
    allows you set a frame range it should apply to.

    See Antons post on 2020-03-23
    https://sourceforge.net/p/vdfiltermod/tickets/314/
    When I do this, it still does it to the whole video. I don't know how to make 16:9 with borders using VirtualDub.
    Quote Quote  
  26. Originally Posted by Ohrami View Post
    Originally Posted by davexnet View Post
    There's actually another way in Virtualdub, I only just found out about it myself today.
    Set up the resize filter, highlight it in the list then select the "Blending" button on the right -
    allows you set a frame range it should apply to.

    See Antons post on 2020-03-23
    https://sourceforge.net/p/vdfiltermod/tickets/314/
    When I do this, it still does it to the whole video.
    Yes, I tried it and go the same thing. The first resize was applied to the whole video. The blending functiont works with other filters though.

    Originally Posted by Ohrami View Post
    I don't know how to make 16:9 with borders using VirtualDub.
    Resize to the 4:3 size you want in the top part of the resize dialog. Enable "Letterbox/Crop To SIze" and set the full frame size you want in the Framing Options further down in the dialog.
    Quote Quote  
  27. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    That's strange it worked for me using build 44282
    Image Attached Thumbnails Click image for larger version

Name:	vdub1.png
Views:	5
Size:	49.4 KB
ID:	57498  

    Click image for larger version

Name:	vdub2.png
Views:	6
Size:	30.4 KB
ID:	57499  

    Image Attached Images  
    Image Attached Files
    Quote Quote  



Similar Threads