VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
  1. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Hello,

    I recently purchased a Panasonic camera that records HD video in the AVCHD Lite format. I need help converting in two scenarios.

    Scenario #1 - Converting to WMV
    I am doing this conversion using Sony Vegas 9.0 Pro. In the settings for the WMV codec, should I match the frame rate of the source (59 fps) or stick to 29 fps? Also, is the 1280x720 resolution that it wants to use fine (the source is the same)? FYI I will be encoded at a rather high bitrate and am doing this conversion not worrying about size but about easy playback as these files will be shared with friends.

    Scenario #2 - Converting to XviD
    I'm having trouble with this one. I couldn't find any program that does this conversion directly and have tried exporting to DV via Sony Vegas and encoding to XviD via VirtualDub but the resulting file doesn't look good and appears to be stretched (improper resolution). Is there a recommended program to do this conversion? Also, what conversion settings should be set in XviD in terms of resolution, frame rate? FYI, I am encoding to this format for a smaller file size so that I can email the video to a friend in another country.

    Any help with the scenarios above is greatly appreciated.
    Thank you.
    Quote Quote  
  2. Member
    Join Date
    Jul 2007
    Location
    United States
    Search Comp PM
    For Scenario #2 - Try using a avisynth script to feed into virtualdub. This is what I use for my AVCHD files. If the lite format is already in 1280x720 you can skip that line. You mentioned a different frame rate too, you'll want to change the fps to match it. Use MediaInfo to get your correct framerate/resolution..

    DirectShowSource("C:\filename", fps=29.97)
    Lanczos4Resize(1280, 720)
    Quote Quote  
  3. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Thank you for your reply tat2jr1.

    The source footage is 1280x720 and is recorded at 59.940 fps. I tried this simple script and successfully got it into virtualDub:

    DirectShowSource("C:\original\00007.mts", fps=59.940)

    However, upon converting the video to xvid and the audio to MP3 (LAME encoder), the video runs twice as fast as it should and repeats resulting in the same run time as the original but it does so at twice the speed. The audio stays at the correct speed so the audio and video are obviously out of sync.

    Any ideas what could be happening?

    FYI: I tried converting to to MP4 with Ripbot and the same thing happened.
    Quote Quote  
  4. Member
    Join Date
    Jul 2007
    Location
    United States
    Search Comp PM
    I have to admit that I usually just copy and paste other people's scripts until I find something that works. In other words I'm really not that knowledgeable on AVIsynth or video settings other then my cameras and my cobbled together scripts.

    Having said that - I think the problem is either a deinterlacing/interlacing issue (that would change the framerate to 59.940) or a framerate 'problem' with post production. I'm not sure how to do it, but my next step if I was you would be to find the script settings to change the framerate to 29.97. Google framerate and avisynth and you should find some stuff to try - or someone with some avisynth experience could come in here and actually try to help a fellow member....... anyone? Anyway, I could be totally wrong, but that'd be my next move.
    Quote Quote  
  5. is that one of the little point and shoot cameras? i'd check the avchd files with mediainfo. they advertise some as 60fps but the f is for fields, not frames. so some are really 30 frames per second.

    post the text output of mediainfo if you'd like.
    Quote Quote  
  6. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Thanks for the responses. The source video is from a smallish camera albeit a good one, Panasonic Lumix TZ7. It appears as though it actually records at 59.940fps, below is the video info from mediainfo:

    File size : 127 MiB
    Duration : 1mn 10s
    Overall bit rate : 15.1 Mbps
    Maximum Overall bit rate : 18.0 Mbps

    Video
    ID : 4113 (0x1011)
    Menu ID : 1 (0x1)
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.0
    Format settings, CABAC : No
    Format settings, ReFrames : 1 frame
    Duration : 1mn 10s
    Bit rate : 14.3 Mbps
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16/9
    Frame rate : 59.940 fps
    Standard : NTSC
    Resolution : 24 bits
    Colorimetry : 4:2:0
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.259
    Stream size : 120 MiB (95%)

    Audio
    ID : 4352 (0x1100)
    Menu ID : 1 (0x1)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 1mn 10s
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Stream size : 1.61 MiB (1%)
    Quote Quote  
  7. Many devices set the wrong frame rate in the file header. In all likelihood your video is 29.97 fps, not 59.94 fps.
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Have you tried Xvid4PSP ? It uses avisynth behind the scenes, so you don't have to know how to script to get the benefits.
    Read my blog here.
    Quote Quote  
  9. If ripbot failed, xvid4psp (and most other programs) are likely to fail. Both use avisynth in the back end, and likely the autodetect mechanism failed. I bet it is 29.97 frames as jagabo said (59.97 fields).

    Perhaps tarrickb can upload a sample clip to a free hosting site (e.g. mediafire, megaupload)

    Also, what decoder / splitter combo are you using for directshow (e.g. ffdshow + haali?)
    Quote Quote  
  10. i went and looked up the specs for that digicam. the sensor is 30p but the recorded format claims to be 60p. not sure why they pulled that whacky trick.
    Quote Quote  
  11. I found a few sample video from that camera (the European version which uses PAL frame rates). They were 25 fps progressive but most tools reported them as 50 fps.
    Quote Quote  
  12. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Thanks for the responses.

    Well I'm still a little confused as to what is actually happening with the original file considering that all signs are pointing to 59 fps, but I have now successfully converted to XviD.

    All I did was change the avisynth script to 29.970fps and the video converted at the proper speed. I'm positive this is what I tried before and it didn't work, but apparently I'm wrong about that.

    For general interest I have uploaded the original file (direct from the camera) if anyone is interested in taking a look. http://www.mediafire.com/download.php?zmq40qjznf5

    Thanks again for the responses, and I guess I should be fine as long as I specify the FPS in avisynth to 29.97.

    Interestingly, when converting to WMV via Sony Vegas Pro 9.0 I set the fps to 59.940 and the video converted fine, any ideas as to why this is? Also, if it works at both 59.940 and 29.97fps out of Sony Vegas which should I use?
    Quote Quote  
  13. The header(s) of the file reports one frame rate (59.94), the actual video stream has another (29.97).

    I don't use Vegas but it sounds like you are setting the output frame rate, not the source frame rate. If the source is 29.97 and you tell Vegas it's 59.94 Vegas will duplicate each frame to give you that rate.
    Quote Quote  
  14. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Thank for your response jagabo.

    I just re-encoded my WMV files with an output frame rate of 29.97fps rather than 59.94. Interestingly, I found that the motion is much more blurred with the 29.97fps video which leads me to believe that maybe the source actually does have that many frames. Said differently, it looks as though Sony Vegas is throwing some useful frames away when I tell it to output 29.970 frames per second. In both cases (like every other program) it detects the source video as having 59.94 frames.

    Any ideas why I could be seeing smoother video using the higher frame rate if the original is 29.97? Would this normally happen?

    Thanks.
    Quote Quote  
  15. I don't know what Vegas is doing. I suggest you post some short samples where the difference is obvious.
    Quote Quote  
  16. media player classic report the framerate of 30fps during playback and it looks correct.

    if you are planning to use your videos online or for portable players 30p is probably a more useful setting.
    Quote Quote  
  17. It's the wrapper that is giving difficulties. It mistakenly reports as 59.94. Whenever you have a mismatch with project settings/asset/render settings in vegas, you will get the blended frames. Vegas thinks the asset is 59.94 because of the wrapper. In order to "fool" vegas you have to set it at double ntsc. In premiere you have to ability to "interpret footage" as

    Directshowsource isn't frame accurate (especially with non linear access), and not very consistent. If you index your file with DGAVCIndex, it correctly shows 29.97 and all the frames, or if you use FFMpegSource2. If you preview your script in avsp with DirectShowSource() as above, you will see the cycle repeat as you described, because it is mistakenly taking the fps information from the wrapper. You have to manually specify the correct 29.97 to get it correct if you use DirectShowSource().

    If you extract the rawavc stream and examine it in a stream analyzer you will see that it should be 29.97
    Quote Quote  
  18. premiere pro cs4 correctly identifies the video without having to "interpret footage as". vegas pro 9 unfortunately can't use the video correctly because it won't allow the files framerate properties to be changed to 29.97



    Quote Quote  
  19. short clip, 640x360, xvid 29.97 fps, just as smooth and clean as the original:

    xvid30.avi
    Quote Quote  
  20. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Call me crazy, but I do see a noticeable difference between the two videos outputted by Sony Vegas.

    Here is my proof:
    29.97 FPS video:
    http://www.mediafire.com/download.php?wnztnzammn2


    29.97 FPS video screenshot



    59.94 FPS video:
    http://www.mediafire.com/download.php?jw0jktnhkkw

    59.94 FPS video screenshot

    Notice the ghosting in the lower frame rate video compared to the higher frame video (especially where you see the taller person's head moving).
    Any thoughts?
    Quote Quote  
  21. It happens on your 1st clip also. I replicated your results with both avisynth and vegas.

    I posted the reason why this happens in vegas above. Note this happens with 24p AVCHD in 29.97i wrapper as well. There was a similar thread on this just yesterday. Mediainfo and vegas report it incorrectly
    Quote Quote  
  22. inputting as 29.97p and rendering to 29.97p in premiere cs4 works without any changes. here is the sample rendered as mp4, sorry the bitrate is under 800kbps but that way i could just post it here. there's no ghosting. if you have the sample uploaded with the 2 people i will do that one also if you'd like to see that one also.



    panasonic_lumix_tz7_00006.mp4
    Quote Quote  
  23. Poisondeathray was right. Step through the 60 fps WMV file frame by frame. You'll see every frame is duplicated (ie, the source was 30 fps, to make it 60 fps each frame was duplicated). The reason the 30 fps video is full of double exposures is because Vegas (or maybe some h.264 decoder before it got to vegas) first duplicated each frame to make 60 fps, then reduced the frame rate to 30 fps by blending pairs of frames together. Unfortunately instead of blending a pair of frames from the same source frame (which would have looked just like the original frame) it has blended together frames from two adjacent source frames:



    On the left is a crop from frame 12-13 in the 60 fps clip. On the right is frame 14-15 of the 60 fps clip. In the middle is frame 7 from the 30 fps clip -- obviously a blending of the two others.
    Quote Quote  
  24. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Thank you to everyone, especially jagabo, for all that clarification. I finally understand the theory behind what is happening, and that was what I was struggling with.

    On the practical side of things, poisondeathray, what can I do in Sony Vegas to properly encode the the video to 29.97 fps? You mentioned, " In order to "fool" vegas you have to set it at double ntsc", could you elaborate how this is done?

    Thanks.
    Quote Quote  
  25. Originally Posted by tarrickb
    On the practical side of things, poisondeathray, what can I do in Sony Vegas to properly encode the the video to 29.97 fps?
    Try trimming away the very first frame. That might be enough to get it to blend pairs that both come from the same source frame.
    Quote Quote  
  26. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Negative, trimming the first frame then encoding to 29.97fps didn't work.
    Quote Quote  
  27. sorry but i think you're out of luck with vegas. it can't handle the panasonic acvhd lite. even setting a 720p double ntsc project ends up with blended frames/ghosting. to set a project type in vegas - start it then file/properties. set it to hdv 720p and then change the fps with the dropdown menu to 59.94 for double ntsc.

    sony not supporting a panasonic oddball file type is not uncommon, they don't give much support for weird samsung video either.
    Quote Quote  
  28. Member
    Join Date
    Feb 2006
    Location
    Canada
    Search Comp PM
    Ok, I'll accept the fact that I can't correctly output 29.97fps video from Vegas with this type of source file. However, what is the disadvantage of outputting 59.94fps wmv video considering that there is no ghosting?
    Quote Quote  
  29. Can't vegas take a frameserved video? Just use:
    DirectShowSource("yada.mts", fps=29.97)
    Quote Quote  
  30. The declared framerate is 59.94 but the actual frame rate is 29.97. This mismatch is what causes vegas to do the blends. As I mentioned earlier, whenever you have a mismatch between the a) project settings b) declared clip info c) render settings, you will see this. Vegas "thinks" it's a 59.94 clip.

    There are 1545 unique frames, you can examine this in a stream analyzer or look at the raw avc video stream. Vegas gets this part correct. As you see 1545/59.94 = ~25 seconds which is incorrect duration, so 59.94 cannot be the proper frame rate. 1545/29.97 = ~51sec which is the correct duration and matches the audio.

    In vegas, if you set project settings to 59.94 to match the "declared" 59.94, you will get frame duplicating. Instead of 1545frames, you will get 3089, but they are not unique, it will be a-a-b-b-c-c-d-d etc....

    If you set it to 29.97, you will get frame blending, because of the mismatch with the "declared" 59.94.

    The usual approach would be to re-wrap it with the correct information i.e. repackage into .mp4, .avi, or .m2ts or .ts with the correct 29.97 timing information, so vegas now "thinks" it's a proper 29.97 fps video. As I said earlier, Premiere has the function to "interpret footage as", but Minidv2dvd confirmed even that wasn't necessary. However, this clip is bizarre in that there is some timing information in the stream that you can't strip (e.g. you might use h264info to strip it). I tried the regular methods , e.g. yamb, tsmuxer (which even has a change framerate option), avc2avi, none of them work with vegas sucessfully (when re-packaging usually works for vegas importing)

    Long story short, my suggestion, if you're set on using vegas is to encode to a lossless intermediate (e.g. huffyuv or lagarith) with avisynth as import in to vegas. I would use ffmpegsource2() as that is the most current with libavcodec libraries and decodes even some broken streams.

    If you don't want a big lossless intermediate, you can frameserve in your avs script with makeavis which comes with ffdshow full install. Editing will be sluggish with makeavis compared to the intermediate. (load audio separately from a demuxed file, you can use tsmuxer to demux for example). I tested both the lossless import and makeavis , and they appear to work in vegas on your clip, without blending or dupes. DirectShowSource() as jagabo suggested above should work, but not recommended because of non-linear seeks - when you do editing and jump over the timeline, you will get desynchroniztion, compared to an indexed method
    Quote Quote  



Similar Threads

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