VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. The attached video, downloaded from YouTube, has a resolution of 854x480 according to MediaInfo and various other media players / editors — but for some reason, it is imported in the editing software I'm using (Magix Video Deluxe 2016) as 844x480, with an aspect ratio of 1.758333. If I change that aspect ratio in the clip's properties to 16:9, the height is reduced, but the frame remains incomplete. If that MP4 file is remuxed to a new MP4 file with mp4box, ffmpeg or Avidemux, the resulting files are also imported with an erroneous 844x480 resolution. Only a conversion to a lossless AVI file gets imported with the correct 854x480 resolution. Is there any weasonable explanation for such wandom weirdness ?

    (Since it's a relatively simple editing task, which involves mostly appending a bunch of short sequences together, with a few fade-in effects, I could do it with Avisynth, but since they're in different resolutions it's more convenient to do it from full-fledged NLE, also one sequence needs to have the audio slightly offset for proper synchronization, I don't know how to do that with Avisynth.)

    Click image for larger version

Name:	Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4 -- fichier MP4 chargé dans MVD.png
Views:	560
Size:	597.7 KB
ID:	51713
    Click image for larger version

Name:	Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4 -- fichier AVI Lagarith dans MVD.png
Views:	549
Size:	603.3 KB
ID:	51714
    Click image for larger version

Name:	YT - Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4 -- MVD info.png
Views:	460
Size:	27.9 KB
ID:	51715
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    it imports into magix vegas pro 16 as 854x480 just fine. but it's f'd up anyway as that resolution is ntsc and it imports as 25fps which is pal, not ntsc.

    Image
    [Attachment 51716 - Click to enlarge]
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. So, seeing that it was imported with "MPEG Import Module", I disabled this module in the software's global settings, then re-imported that file... At first it didn't change anything, most likely because it was still associated with a .H0 file (don't know exactly what they're for but apparently they keep track of each imported file's metadata and whatnot), then I created a hard link of that file (or I could have just renamed it but it would have required to first close the editor) and re-imported it — and now it appears with the correct 854x480 resolution, while the Information panel indicates that it was imported with "Internal DirectShow AVI".
    Click image for larger version

Name:	MVD MPEG Import Module.png
Views:	452
Size:	32.0 KB
ID:	51719
    Click image for larger version

Name:	Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4 -- Internal DirectShow AVI.png
Views:	404
Size:	27.7 KB
ID:	51717
    Is this a known issue ? Are the importing modules in editing softwares somewhat standardized components, or does each one have its own brands and flavours ? Generally speaking, is there a way to control which file types are imported with which specific module in editing softwares, or is it something that is not meant to be tampered with ?

    it imports into magix vegas pro 16 as 854x480 just fine. but it's f'd up anyway as that resolution is ntsc and it imports as 25fps which is pal, not ntsc.
    Well, generally speaking, there are a lot of f'd up things on YouTube... é_è
    Last edited by abolibibelot; 29th Jan 2020 at 22:17. Reason: added a screenshot
    Quote Quote  
  4. So, I went the Avisynth route after all, and managed to approximately reproduce the editing work made within the NLE.

    Script :
    Code:
    PunkV = FFVideoSource("E:\TEMP\MrT BSOBSF\YouTube - Snickers - Mr T CTV - Park Punk.flv").BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001)
    PunkA = FFaudioSource("E:\TEMP\MrT BSOBSF\YouTube - Snickers - Mr T CTV - Park Punk.flv")
    Punk = AudioDub(PunkV,PunkA)
    SurveillanceV = FFVideoSource("E:\TEMP\MrT BSOBSF\YouTube - Official Mr. T Snickers Surveillance Teaser.flv").BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001)
    SurveillanceA = FFAudioSource("E:\TEMP\MrT BSOBSF\YouTube - Official Mr. T Snickers Surveillance Teaser.flv")
    Surveillance = AudioDub(SurveillanceV,SurveillanceA).Trim(17,0).FadeIn(16)
    PoolV = FFVideoSource("E:\TEMP\MrT BSOBSF\YouTube - Mr. T - Snickers Helicopter and Pool Advert - Mr. T is Back! .flv" ).BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001)
    PoolA = FFAudioSource("E:\TEMP\MrT BSOBSF\YouTube - Mr. T - Snickers Helicopter and Pool Advert - Mr. T is Back! .flv" )
    Pool = AudioDub(PoolV,PoolA).Trim(16,0).FadeIn(16)
    FootballV = FFVideoSource("H:\Mr. T YouTube\YT - Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4").BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001)
    FootballA = FFAudioSource("H:\Mr. T YouTube\YT - Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4")
    Football =AudioDub(FootballV,FootballA).Trim(16,0).FadeIn(16)
    black = DirectShowSource("H:\Mr. T YouTube\YT - Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4").BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001).Trim(0,15)
    SukaV1 = FFVideoSource("E:\TEMP\MrT BSOBSF\YouTube - Snickers & Mr. T are back - getsomenuts.tv.flv" ).BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001).Trim(0,405)
    SukaV2 = FFVideoSource("E:\TEMP\MrT BSOBSF\YouTube - Mr T Snickers advert coming to get ya Suka.flv").crop(0,38,0,-36).BicubicResize(720,362).AddBorders(0,58,0,60).ChangeFPS(30000,1001).Trim(389,0)
    SukaA = FFAudioSource("E:\TEMP\MrT BSOBSF\YouTube - Mr T Snickers advert coming to get ya Suka.flv")
    SukaV = SukaV1 ++ SukaV2
    Suka = AudioDub(SukaV,SukaA).DelayAudio(0.28).Trim(17,0).FadeIn(16)
    SpeedwalkerV = FFVideoSource("H:\Mr. T YouTube\YT - Snickers Mr T - Speedwalker July 08 [OkT_d2OTgv0 -f 134+140].mp4").BicubicResize(720,360).AddBorders(0,60,0,60).ChangeFPS(30000,1001)
    SpeedwalkerA = FFAudioSource("H:\Mr. T YouTube\YT - Snickers Mr T - Speedwalker July 08 [OkT_d2OTgv0 -f 134+140].mp4")
    Speedwalker = AudioDub(SpeedwalkerV,SpeedwalkerA).Trim(1,0).FadeIn(10)
    
    Punk ++ Surveillance ++ black ++ Pool ++ black ++ Football ++ black ++ Suka ++ black ++ Speedwalker
    Main characteristics of the source videos :
    Code:
    YouTube - Snickers - Mr T CTV - Park Punk.flv
    512x288 25.000 FPS
    YouTube - Official Mr. T Snickers Surveillance Teaser.flv
    640x360 25.032 FPS
    YouTube - Mr. T - Snickers Helicopter and Pool Advert - Mr. T is Back! .flv
    640x360 25.000 FPS
    YT - Mr T Snickers commercial [NySN_plfiNI -f 135+140].mp4
    854x480 25.000 FPS
    YouTube - Snickers & Mr. T are back - getsomenuts.tv.flv
    428x240 25.048 FPS
    YouTube - Mr T Snickers advert coming to get ya Suka.flv
    400x300 25.050 FPS
    YT - Snickers Mr T - Speedwalker July 08 [OkT_d2OTgv0 -f 134+140].mp4
    640x360 25.000 FPS
    Some questions remain.
    – Is there any blatant issue in the script above ?
    – At first I used DirectShowSource as the import filter, to avoid the hassle of importing the video, then the audio, then mixing video and audio, but starting from the second clip the audio was out of sync ; is it a known issue ?
    – To put this on a NTSC DVD, do I need to convert the video from progressive to interlaced ? (I already asked a similar question but the answers weren't clear enough and I'm still confused on that matter.) Since there's a slight jerkiness introduced by the framerate conversion whenever there's constant motion, would there be a way to convert the original 25.XXX FPS progressive to 29.97 FPS interlaced with a smoother playback, by using a specific interlacing pattern ?
    – When I originally made that enhanced DVD, at first I rendered that video in 16:9 aspect ratio, since almost all the clips (originally TV commercials) were in 16:9 (except one which had been partly cropped). But the other videos that I wanted to add as "bonus" were in 4:3 aspect ratio, and DVDStyler didn't allow to mix 16:9 content with 4:3 content within the same menu or "title". Is this indeed mandatory for DVD-video compliance ? The problem is that, as it currently is, on a 16:9 display these videos would appear in a small frame with 4 large black borders...
    Quote Quote  
  5. Originally Posted by abolibibelot View Post
    – At first I used DirectShowSource as the import filter, to avoid the hassle of importing the video, then the audio, then mixing video and audio, but starting from the second clip the audio was out of sync ; is it a known issue ?
    DirectShowSource() has many known problems. Basically you're asking Windows' DirectShow to perform the decompression for you. You'll get different results on different computers depending on what DirectShow components are installed.

    Originally Posted by abolibibelot View Post
    Since there's a slight jerkiness introduced by the framerate conversion whenever there's constant motion, would there be a way to convert the original 25.XXX FPS progressive to 29.97 FPS interlaced with a smoother playback, by using a specific interlacing pattern ?
    You can encode those sections 25 fps progressive then use DgPulldown to add 3:2:3:2:2 pulldown flags (the program also accounts for the 1 extra frame out of every 1001 for 30 to 29.97 fps). That looks about the same as 23.976 fps progressive with 3:2 pulldown flags.

    Or you can slow those sections to 23.976 fps and encode with the usual 3:2 pulldown flags (audio will have to be adjusted too).

    Or you can use hard pulldown and encode 29.97 fps interlaced (no audio adjustment necessary):

    Code:
    # 25 p to 29.97i
    ChangeFPS(60000,1001)
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    Quote Quote  
  6. You can encode those sections 25 fps progressive then use DgPulldown to add 3:2:3:2:2 pulldown flags (the program also accounts for the 1 extra frame out of every 1001 for 30 to 29.97 fps). That looks about the same as 23.976 fps progressive with 3:2 pulldown flags.

    Or you can slow those sections to 23.976 fps and encode with the usual 3:2 pulldown flags (audio will have to be adjusted too).

    Or you can use hard pulldown and encode 29.97 fps interlaced (no audio adjustment necessary):
    So DgPulldown doesn't touch the streams and only adds flags ? Are these flags interpreted the same by software players and standalone players ?
    Also, would it work fine even though the framerates of the source clips apparently aren't quite the same ? Some are 25.032 FPS or 25.048 FPS according to MediaInfo -- but Avisynth Info() identifies them all as 25.0000 FPS, except the first one which is identified as 24.9788 FPS by Avisynth Info() but 25.000 FPS by MediaInfo, how puzzling. So Avisynth lets me append the clips without prior framerate conversion, except the first one -- with the first one there's an error warning : "Video framerate doesn't match". In this case would it be "cleaner" to convert the framerate of that one clip to exactly 25 FPS, or to convert them all to 29.97 FPS before appending as I did in the script above ?
    Does it matter if the (five) other videos intended to be put in the same "title" are in 29.97 or 30.00 FPS (progressive) ?


    DirectShowSource() has many known problems. Basically you're asking Windows' DirectShow to perform the decompression for you. You'll get different results on different computers depending on what DirectShow components are installed.
    So beside DirectShowSource (which is apparently unreliable) and AVISource (which obviously works only with AVI sources), is there another import filter which can import video and audio simultaneously and reliably ? I thought FFmpegSource2 behaved like this but apparently it does not import audio (so I don't know how it differs from FFVideoSource).
    Quote Quote  
  7. You should convert all your sources to the same frame rate before appending them.

    The hard pulldown method I gave will work for any source frame rate.

    To load audio and video:
    Code:
    a = ffAudioSource(...)
    v = ffVideoSource(...)
    AudioDub(v,a)
    or
    Code:
    a = LSmashAudioSource(...)
    v = LSmashVideoSource(...)
    AudioDub(v,a)
    or
    Code:
    a = LWlibavAudioSource(...)
    v = LWlibavVideoSource(...)
    AudioDub(v,a)
    Quote Quote  
  8. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    me i'd do it all in vegas. import the source files, render them out to lossless sonyuv one at a time to the exact same format. use all the lossless sonyuv files on the timeline to do the editing. then render out to your final destination format.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  9. You should convert all your sources to the same frame rate before appending them.
    But in this case there are two possibilities as I explained : either convert the one identified as 24.9788 FPS to 25 FPS and then append the clips in 25 FPS, or convert them all to 29.97 FPS before appending. The question was, in such a case, what would be considered the best approach, generally speaking, if the end result should be DVD-video compliant MPEG2 ?

    To load audio and video...
    AudioDub...
    That I already knew, but it complicates the scripts quite a bit as I mentioned in this thread. So apparently the straightforward answer is no, there's no reliable import filter which can import video and audio simultaneously and reliably for sources other than AVI.
    Then what are the differences between FFxxSource, LSmashxxSource and LWLibavxxSource, their respective known strengths / weaknesses ? For instance I've had issues with LWLibavVideoSource which didn't happen with FFVideoSource (although the latter is otherwise reputed as less reliable), and issues with LWLibavVideoSource which could be fixed using LSmashVideoSource.
    Quote Quote  
  10. me i'd do it all in vegas. import the source files, render them out to lossless sonyuv one at a time to the exact same format. use all the lossless sonyuv files on the timeline to do the editing. then render out to your final destination format.
    That's how I did it originally (except for the intermediate lossless rendering step), using the Magix editor to append / edit the clips, then export directly as 29.97 FPS MPEG2. This time, since I'm attempting to improve the end result as much as possible, I'm trying to do it in Avisynth (then HCEnc / AVStoDVD) so as to have maximum control over each step of the process, and avoid unnecessary colorspace conversions. Based on the name, "sonyuv" is a codec specific to Vegas editing softwares -- originally designed by Sony, but now sold under the Magix brand -- which deals with YUV colorspaces. As far as I know, the Magix designed editor I'm currently using doesn't have that codec or anything equivalent, therefore (unless I'm mistaken) doing any editing from a YUV source to a YUV output involves two colorspace conversions.
    What would be the benefit of first converting each file to a lossless intermediate, then re-import those files, then render the edited footage ? Couldn't it be done just the same by converting the framerate "on-the-fly" ? And can Vegas work in YUV all the way through ?
    Quote Quote  
  11. That Sony YUV is uncompressed 422 8bit, same as most default uncompressed formats set for export. Maybe it was a bit faster than regular uncompressed, not sure. There was also 10bit Sony YUV. That would swallow RGB to YUV difference, except you'd need to finally bring it back again to 420.

    But anyway, it is all overkill I think. Youtube videos, as they are, not sure if it makes any sense to treat it to those details. Any almost lossless is perhaps just fine. If storing those, even some low latency H264 (short GOP, fast presets, lower CRF by x264) to save space.
    Quote Quote  
  12. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    The question was, in such a case, what would be considered the best approach, generally speaking, if the end result should be DVD-video compliant MPEG2 ?

    convert them all to the framerate of the dvd you want to make 25fps if pal or 29.97 if you want ntsc.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  13. Originally Posted by abolibibelot View Post
    You should convert all your sources to the same frame rate before appending them.
    But in this case there are two possibilities as I explained : either convert the one identified as 24.9788 FPS to 25 FPS and then append the clips in 25 FPS, or convert them all to 29.97 FPS before appending. The question was, in such a case, what would be considered the best approach, generally speaking, if the end result should be DVD-video compliant MPEG2 ?
    In such a case I'd probably convert the 24.9788 fps clip to 25 fps and encode the entire video as 25p and use DgPulldown to apply pulldown flags. Unless that clip was a very large percentage of the video or was very very important.

    Originally Posted by abolibibelot View Post
    To load audio and video...
    AudioDub...
    That I already knew, but it complicates the scripts quite a bit as I mentioned in this thread.
    What a lame excuse. You can just create your own function to open and combine the audio and video.

    Code:
    function LW_AVSource(string name)
    {
        a = LWlibavAudioSource(name)
        v = LWlibavVideoSource(name)
        AudioDub(v,a)
    }
    You now have a single function you can call to get both audio and video via LWlibav -- just like AviSource() or DirectShowSource().

    And by the way, ffmpegsource2 does import the audio as well as the video if you use it correctly. Read the instructions.
    Quote Quote  
  14. In such a case I'd probably convert the 24.9788 fps clip to 25 fps and encode the entire video as 25p and use DgPulldown to apply pulldown flags. Unless that clip was a very large percentage of the video or was very very important.
    Actually the 24.9788 FPS one is identified as 25.0000 if using LWLibavVideoSource instead of FFVideoSource... While another clip is identified as 25.0500 FPS with LWLibavVideoSource and 25.0000 FPS with FFVideoSource... So using either one of the import filters to get each damn file identified as 25.0000 FPS, it works with no framerate conversion, go figure !

    convert them all to the framerate of the dvd you want to make 25fps if pal or 29.97 if you want ntsc.
    So, after some more reading, I encoded all those videos with AVStoDVD, and it did encode everything to 29.97 FPS, with various patterns of partial interlacing. Does it mean that it is “more compliant” than the alternative solution of preserving the original framerate and applying pulldown flags ? I read among other things that no, it was not required to encode MPEG2 for DVD as interlaced (although some seem to say that it is required for NTSC DVD, how confusing), that it was generally better to preserve the original framerate of the source, among other reasons because it makes a better use of a given bitrate (from here : "it actually looks better since you can take the fixed amount of bits and spread them across fewer frames" — but it's not perfectly clear if it applies only to 23.976 FPS sources or if any bitrate can be encoded as-is with the right pulldown flag).

    Also :
    – Why does HCEnc GUI (not AVStoDVD) indicate that "resolution is not DVD-compliant for frame rate 25 fps" ? I don't see any "NTSC" setting, but I do want to create a NTSC DVD, so the 720x480 resolution is compliant.
    – Why is "3:2 pulldown" greyed-out in HCEnc GUI
    – Why is the maximum bitrate limited to 9000kbps in AVStoDVD ? (And not 9500 as in other MPEG2 compression utilities, or adjusted relative to the audio bitrate to max out the bitrate as close to DVD specifications as possible.)
    – Is it indeed impossible / non-compliant to mix a clip in 16:9 AR and others in 4:3 AR in the same DVD "title" ? If it is not allowed, is it the best method to add black borders in Avisynth so as to get the 16:9 picture inside a 4:3 frame ?
    – What's the difference between "4:3" and "4:3 PanScan" ?
    – Why did I get a warning about a missing "d3dx9_43.dll" each time a Wavi / Aften command prompt was opened, yet it did work anyway once I pressed "OK" ?
    Quote Quote  



Similar Threads

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