VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. I have two types of H.264/MPEG-4 AVC files recorded with both, mobile phones and digital camcorders:

    - mp4 files, 1280 x 720 at 30.000 fps

    and

    - 3gp files, 720 x 480 at 14.925 fps

    I know this is terrible quality, but I need to transcode everything to a same bag, either PAL or NTSC SD for editing in Premiere and output a DVD. Is there any specific tool to deal with this kind of files using Avisynth scripts and VirtualDub? Other than using DirectShowSource()? The 3gp files with so little pic/s are what is intriguing me the most. If I open them using DirectShowSource() and save them I get a 30.000 fps speeded up file. And if I open them using FFmpegSource2 I get a 15.399 fps file.
    Last edited by effes; 18th Sep 2012 at 22:06.
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date: Oct 2005
    Location: 666th portal
    Search Comp PM
    maybe one of these tools could encode your 3gp to a normal spec lossless avi. never tried but it's worth a shot.
    http://www.videohelp.com/tools?convert=3GP%20to%20AVI
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    It's probably variable frame rate. You're probably going to have lots of problems using it in a NLE with sync issues. The only way to keep it perfect sync with any file is to use VFR, but NLE's don't work with this type of VFR

    You can try to convert to CFR with DirectShowSource("video.3gp" fps=x, convertfps=true)

    Where x is the base frame rate (I think it should be 15 in this case) . It will insert duplicates in roughly the correct positions, but if the file has large fluctuations in frame rate, the sync issues will be noticble. Small variable deviations won't be that noticable

    A 15 fps converted to CFR file will work fine in a NLE, it will either use blends or duplicates to make up the frame rate of the project. E.g. a 29.97 NTSC project will have duplicates every 2nd frame if you have frame blend off, or blended frames if you have frame blend on

    Either PAL or NTSC SD for editing in Premiere and output a DVD
    If you have a choice, do the NTSC project instead of PAL, because 25 isn't an even multiple of 15. You're going to have irregular cadence issues with any conversion, or if you use retiming/motion interpolation methods you will have morphing artifacts . Your HD files are also 30FPS, which is more friendly to a NTSC than PAL project , and 99% of PAL DVD players can play NTSC discs.
    Last edited by poisondeathray; 18th Sep 2012 at 22:33.
    Quote Quote  
  4. Thanks aedipuss. I tried Mobile 3GP converter but I got a "Can not find "\Temp\mmctmp*.*"... whatever that means. I figure now I can just use AME and convert but I was curious if this could be achieved using VirtualDub and Avisynth. My favorite tools. But now poisondeathray has come with a very informative reply as always, so I gotta try that. I was under the impression I had to use NSTC instead of PAL but now I know exactly why. Thank you!
    Last edited by effes; 18th Sep 2012 at 22:50.
    Quote Quote  
  5. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    just to double check , can you post what mediainfo says about the 3gp files (view=>text, copy & paste report back here)
    Quote Quote  
  6. I just tried DirectShowSource("video.3gp" fps=15, convertfps=true) and it gives me the Avisynth open failure error. Here's what Mediainfo says about the file (the specs I posted earlier were using GSpot):

    General

    Complete name : E:\video.3gp
    Format : MPEG-4
    Format profile : 3GPP Media Release 4
    Codec ID : 3gp4
    File size : 84.7 MiB
    Duration : 1mn 55s
    Overall bit rate : 6 142 Kbps
    Law rating : (empty)
    Released date : 0
    Encoded date : UTC 2012-09-08 02:27:12
    Tagged date : UTC 2012-09-12 04:17:02
    Classification : (empty)

    Video


    ID : 2
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L3.0
    Format settings, CABAC : No
    Format settings, ReFrames : 1 frame
    Format settings, GOP : M=1, N=30
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 1mn 55s
    Bit rate mode : Variable
    Bit rate : 6 000 Kbps
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 3:2
    Frame rate mode : Variable
    Frame rate : 14.972 fps
    Minimum frame rate : 3.650 fps
    Maximum frame rate : 15.152 fps
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 1.160
    Stream size : 83.3 MiB (98%)
    Language : English
    Encoded date : UTC 2012-09-08 02:27:12
    Tagged date : UTC 2012-09-08 02:27:12

    Audio

    ID : 1
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 1mn 55s
    Bit rate mode : Constant
    Bit rate : 96.0 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Compression mode : Lossy
    Stream size : 1.32 MiB (2%)
    Language : English
    Encoded date : UTC 2012-09-08 02:27:12
    Tagged date : UTC 2012-09-08 02:27:1
    Last edited by effes; 18th Sep 2012 at 23:36.
    Quote Quote  
  7. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Frame rate mode : Variable
    Frame rate : 14.972 fps
    Minimum frame rate : 3.650 fps
    Maximum frame rate : 15.152 fps
    Yes, it's VFR

    If there are prolonged sections where the framerate drops, you may get sync issues when converting to CFR. It may go in and out of sync in places

    I just tried DirectShowSource("video.3gp" fps=15, convertfps=true) and it gives me the Avisyth open failure error
    You need a splitter. Try lav filters
    http://www.videohelp.com/tools/LAV-Filters

    Is the directory path correct ?

    DirectShowSource("PATH\video.3gp" fps=15, convertfps=true)
    Quote Quote  
  8. Yes, video is in the same folder as the avs script. If I skip the "fps=15, convertfps=true" part, it opens though. Do I need to change anything in the LAV Video Configuration or should I be OK with just the standard installation?
    Quote Quote  
  9. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Sorry there is a typo, it's missing a comma . You don't need to install LAV if it opens without the other part

    DirectShowSource("PATH\video.3gp" , fps=15, convertfps=true)
    Quote Quote  
  10. Ok it works now.
    Quote Quote  
  11. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Why does it get converted to 23.976 ?

    If your 2 assets are 30p and 15p, it makes more sense to make a 30p DVD

    The 1280x720p30 files can just be dropped on a 16:9 NTSC timeline. You don't need to do anything special before, it will automatically be scaled down if you use default settings


    EDIT: ughh I see your edited the post. Ignore this post then
    Quote Quote  
  12. aBigMeanie aedipuss's Avatar
    Join Date: Oct 2005
    Location: 666th portal
    Search Comp PM
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 3:2
    strange size. par=1, square pixel 720x480. normally 720x480 is 4:3 with a square pixel size of 640x480.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  13. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    You may have to interpret the AR in premiere for those files to whatever the correct AR is . Some phones actually use square pixels with those dimensions and the DAR really is 3:2 . You will have a mixed AR project if these aren't really 16:9 (since the HD files are 16:9)

    Premiere will drop 1 frame out of 1000 in the HD files (because the framerate is 30.0, not 29.97) . If you want, you can make the 720p videos exactly 30000/1001 fps which is the NTSC framerate by slowing both audio & video using:

    FFMPEGSource2("video.mp4", atrack=-1)
    AssumeFPS(30000,1001, true)
    SSRC(48000)

    But it's probably easier just to interpet the file in premiere as 29.97 in the clip bin (this does basically the same thing as AssumeFPS)
    Last edited by poisondeathray; 19th Sep 2012 at 00:30.
    Quote Quote  
  14. Originally Posted by poisondeathray View Post
    Why does it get converted to 23.976 ?

    EDIT: ughh I see your edited the post. Ignore this post then
    Sorry, I was looking at a previous test file I converted with AME. Audio issues occur though. It's Alvin and the Chipmunks!

    Originally Posted by poisondeathray View Post
    If your 2 assets are 30p and 15p, it makes more sense to make a 30p DVD

    The 1280x720p30 files can just be dropped on a 16:9 NTSC timeline. You don't need to do anything special before, it will automatically be scaled down if you use default settings
    So basically, I can just drop both the now converted CFR 15fps files and the 30fps HD files in any 16:9 timeline in Premiere and then output a 30p DVD. But just for the sake of curiosity: if I wanted all footage in 29,97 prior to editing in Premiere (since I am transcoding and doing a few quality enhancements anyway) can I just use Video -> Frame Rate -> 'Change framerate to' in VirtualDub? Or would I be destroying the footage?
    Quote Quote  
  15. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    So basically, I can just drop both the now converted CFR 15fps files and the 30fps HD files in any 16:9 timeline in Premiere and then output a 30p DVD
    Yes, but you still have to figure out the AR issues with the 3gp files .


    But just for the sake of curiosity: if I wanted all footage in 29,97 prior to editing in Premiere (since I am transcoding and doing a few quality enhancements anyway) can I just use Video -> Frame Rate -> 'Change framerate to' in VirtualDub? Or would I be destroying the footage?
    I'm not sure what vdub's frame rate does (which method it uses, blends or dupes or someting else)

    I know what avisynth's would do:

    The 30.0p footage would be treated with AssumeFPS (both audio & video slowed, but framecount unchanged) . or right clicking in the clip bin and intepreting the footage in premiere does the same thing



    The 15p CFR corrected footage could be upsampled to 29.97 by either duplicates, blends, or motion interpolated frames. Each method has pros/cons

    ChangeFPS(30000,1001) will give duplicates, ConvertFPS(30000,1001) will give blends, or you can use mvtools2 functions to use motion interpolated frames (mflowfps)

    You wouldn't use AssumeFPS on the 15p footage, because it will just play 2x faster (both audio & video will play at 29.97, but since the frame count is the same, it will sound like chipmunks and play 2x faster)

    AssumeFPS is fine to use for the 30.0 fps file, because the difference is so tiny, you can't hear the difference between 29.97 and 30. The difference is too large for 15->30fps
    Last edited by poisondeathray; 19th Sep 2012 at 01:25.
    Quote Quote  
  16. I notice that when importing the HD footage in PR CS6 it already imports automatically as 29,97 fps instead of 30 and you don't need to reinterpret? I don't know if it's a new feature or not, either way I'm done with the HD footage.
    About the 3gp files: I think I'll be fine generating duplicates with ChangeFPS(30000,1001), but how do I know what's the correct AR? Here's a grab:

    Quote Quote  
  17. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by effes View Post
    I notice that when importing the HD footage in PR CS6 it already imports automatically as 29,97 fps instead of 30 and you don't need to reinterpret?
    If it's interpreted as 29.97 already, then you don't have to

    how do I know what's the correct AR? Here's a grab:
    You shoot a known circular object straight on (not at an angle). eg. a car tire, or circular clock. Check if it looks too tall or too skinny. If it looks like an oval when viewing at 720x480 it's not square pixels

    720x480 4:3 in square pixel equivalents would be 640x480. So resize it to that and see if it looks distorted
    720x480 16:9 in square pixel equivalents would be 854x480. Same thing with the check
    Quote Quote  



Similar Threads