VideoHelp Forum
+ Reply to Thread
Results 1 to 28 of 28
Thread
  1. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    hi, i have a HDR-XR150 handycam which records videos with the following information
    ID : 0 (0x0)
    Complete name : --------------------------------------
    Format : BDAV
    Format/Info : Blu-ray Video
    File size : 296 MiB
    Duration : 1mn 50s
    Overall bit rate mode : Variable
    Overall bit rate : 22.4 Mbps
    Maximum Overall bit rate : 24.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 : Yes
    Format settings, ReFrames : 2 frames
    Format settings, GOP : M=2, N=13
    Codec ID : 27
    Duration : 1mn 50s
    Bit rate mode : Variable
    Bit rate : 21.2 Mbps
    Maximum bit rate : 22.0 Mbps
    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
    Bits/(Pixel*Frame) : 0.410
    Stream size : 280 MiB (95%)

    Audio
    ID : 4352 (0x1100)
    Menu ID : 1 (0x1)
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Codec ID : 129
    Duration : 1mn 50s
    Bit rate mode : Constant
    Bit rate : 256 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Delay relative to video : -80ms
    Stream size : 3.38 MiB (1%)

    Text
    ID : 4608 (0x1200)
    Menu ID : 1 (0x1)
    Format : PGS
    Codec ID : 144
    Duration : 1mn 50s
    Delay relative to video : -80ms

    as you can see it has caption which is recording time and date. i want to edit this clip in vegas pro and make this caption appear on the video permanently, like a water mark. not a caption stream which you can select to see the caption or not.
    Quote Quote  
  2. Some retail options:

    DVMP Pro 5
    https://www.videohelp.com/tools/DV-Media-Player
    http://www.dvmp.co.uk/

    Visual AVCHD Time Stamp (vATS)
    https://www.videohelp.com/tools/Visual-AVCHD-Time-Stamp
    http://www.dts8888.com/vATS/vats.htm



    A more difficult but free way to do is to use avchd2srt to extract srt subs (which will contain the date,time & GPS info if applicable), then you can hardcode a transparent clip with masksub() in avisynth to use as an overlay in vegas (there are some GUI's at the end of the thread)
    https://forum.videohelp.com/threads/316229-Export-AVCHD-frame-specific-metadata-to-subtitles

    Or you can import srt subs direct with vegasaur
    http://vegasaur.com/text-generation-wizard
    Quote Quote  
  3. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Some retail options:

    DVMP Pro 5
    https://www.videohelp.com/tools/DV-Media-Player
    http://www.dvmp.co.uk/

    Visual AVCHD Time Stamp (vATS)
    https://www.videohelp.com/tools/Visual-AVCHD-Time-Stamp
    http://www.dts8888.com/vATS/vats.htm



    A more difficult but free way to do is to use avchd2srt to extract srt subs (which will contain the date,time & GPS info if applicable), then you can hardcode a transparent clip with masksub() in avisynth to use as an overlay in vegas (there are some GUI's at the end of the thread)
    https://forum.videohelp.com/threads/316229-Export-AVCHD-frame-specific-metadata-to-subtitles

    Or you can import srt subs direct with vegasaur
    http://vegasaur.com/text-generation-wizard
    the two programs you just mentioned at first, do they work with vegas or i should edit in them?
    Quote Quote  
  4. Originally Posted by darknesslord View Post
    the two programs you just mentioned at first, do they work with vegas or i should edit in them?

    I don't understand what you are asking

    They don't work directly with vegas (they are separate programs) . You can hardcode the data, then import into vegas. Vegasaur is sort of a plugin for vegas that directly works within vegas that you can import srt subs (if you extracted the date/time/gps info with other methods)
    Quote Quote  
  5. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    i downloaded the avchd2srt, how to i extract merdata in srt?
    Quote Quote  
  6. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    i extracted the captions, continuing the rest

    thanks alot
    Last edited by darknesslord; 30th Apr 2014 at 14:44.
    Quote Quote  
  7. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    i downloaded avisynth and 32bit version of vsfilter.dll
    and made a .avs file like this:

    loadplugin("VSFilter.dll")
    FlipVertical(MaskSub("day1.srt",1920,1080,25,13832 ))

    but the .avs files can not be imported to the vegas.
    Last edited by darknesslord; 1st May 2014 at 06:40.
    Quote Quote  
  8. Originally Posted by darknesslord View Post
    i downloaded avisynth and 32bit version of vsfilter.dll
    and made a .avs file like this:

    loadplugin("VSFilter.dll")
    FlipVertical(MaskSub("day1.srt",1920,1080,25,13832 ))

    but the .avs files can not be imported to the vegas.


    .avs cannnot import directly to vegas. You have 2 options:

    1) You can re-encode the subs with masksub() to a transparent background video (e.g. lagarith or ut video codec in RGBA mode - You can do that with vdub), use that imported into vegas as an overlay over your original video .

    2) You can use avfs (avisynth virtual frame server)

    Usually #1 is better, because avfs can bog down your system if you have many instances/layers
    Quote Quote  
  9. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    thank you, you have been very helpful so far
    i re-encoded that .avs file with lagarith RGBA and imported that into vegas, but the video was only transparent in subtitle part instead of background. so i had to add invert to the avisynth function and re-encode again and import into vegas. it worked the only problem is that i only can get black subtitle
    what i want to do now is:
    1- have white subtitle
    2- have subtitle boxed( e.g. white sub in black box)
    3- have subtitle positioned in a plac other that lower middle
    Quote Quote  
  10. Originally Posted by darknesslord View Post
    thank you, you have been very helpful so far
    i re-encoded that .avs file with lagarith RGBA and imported that into vegas, but the video was only transparent in subtitle part instead of background. so i had to add invert to the avisynth function and re-encode again and import into vegas. it worked the only problem is that i only can get black subtitle
    No, you just interpret the alpha channel in vegas -

    Right click the clip in the clip bin, properties, media tab, under "alpha channnel" set it to "straight" instead of "none" . "None" means vegas "thinks" the clip is RGB, not RGBA . The alpha channel is for transparency


    what i want to do now is:
    1- have white subtitle
    2- have subtitle boxed( e.g. white sub in black box)
    3- have subtitle positioned in a plac other that lower middle
    SRT subs are text only, no formatting

    If you want to adjust positioning , any fancy effects, colors , fonts ,size ,etc.... I would convert them to ASS subs . With ASS subs you have control over everything. You can use a subtitle editor like aegisub and make them look any way you want. You do this BEFORE hardsubbing the transparent video to import to vegas

    Or you can just make adjustments to the overlay layer in vegas (you can position the overlay, scale, change colors) . You have some control, but not as much control than if you did it the subs in aegisub . For example, you can alter the position in vegas (and they should already be white subs if you interpret the alpha channel) , but you can't automatically put a black box behind them unless you use ASS subs (unless you want an ugly static box in vegas)
    Last edited by poisondeathray; 2nd May 2014 at 11:15.
    Quote Quote  
  11. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by darknesslord View Post
    thank you, you have been very helpful so far
    i re-encoded that .avs file with lagarith RGBA and imported that into vegas, but the video was only transparent in subtitle part instead of background. so i had to add invert to the avisynth function and re-encode again and import into vegas. it worked the only problem is that i only can get black subtitle
    No, you just interpret the alpha channel in vegas -
    there was guid here, use i use this method or you suggest another one for my specific purpose
    Quote Quote  
  12. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by darknesslord View Post
    thank you, you have been very helpful so far
    i re-encoded that .avs file with lagarith RGBA and imported that into vegas, but the video was only transparent in subtitle part instead of background. so i had to add invert to the avisynth function and re-encode again and import into vegas. it worked the only problem is that i only can get black subtitle
    No, you just interpret the alpha channel in vegas -
    there was guid here, use i use this method or you suggest another one for my specific purpose
    http://forums.creativecow.net/sonyvegas
    Quote Quote  
  13. Originally Posted by darknesslord View Post
    No, you just interpret the alpha channel in vegas -
    there was guid here, use i use this method or you suggest another one for my specific purpose
    http://forums.creativecow.net/sonyvegas[/QUOTE]


    I don't understand what you're trying to say

    Use whatever method works for your goals. There were several suggestions listed in this thread
    Quote Quote  
  14. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    sorry for bad link.
    the reason i asked you is because you said to change "alpha channel to straight instead of none"
    but i tried every method and that suggestion didnt effect anything
    here is the method suggested in that link
    Click image for larger version

Name:	text_composite_mask.png
Views:	180
Size:	81.0 KB
ID:	24928
    Quote Quote  
  15. Originally Posted by darknesslord View Post
    the reason i asked you is because you said to change "alpha channel to straight instead of none"
    but i tried every method and that suggestion didnt effect anything
    The answer was posted above:

    Right click the clip in the clip bin, properties, media tab, under "alpha channnel" set it to "straight" instead of "none" . "None" means vegas "thinks" the clip is RGB, not RGBA . The alpha channel is for transparency
    If you tried that and it's still "black" in the background - not transparent - then you probably did not follow the other instructions correctly. Make sure lagarith or ut video is set to RGBA mode . The "A" is important
    Quote Quote  
  16. Try this sample below in vegas. The sample is lagarith RGBA 1920x1080 25fps, 2secs

    Click image for larger version

Name:	alpha_none.jpg
Views:	249
Size:	27.7 KB
ID:	24933

    Click image for larger version

Name:	alpha_straight.jpg
Views:	248
Size:	30.3 KB
ID:	24934




    Even if you "forgot" to use the alpha channel in vdub or lagarith or ut video configuration , you can use the same black/white video as a luma matte , or key out the black using luma key . If you've inverted the colors for some reason, invert the colors then use the luma key

    But it's better to do it the first way with the RGBA with embedded alpha, because there are fewer effects applied, thus fewer resources being used by vegas

    If nothing works, post a small sample of your encoded masksub clip (cut a small section using video=>direct stream copy , file=>save as avi in vdub )
    Image Attached Files
    Quote Quote  
  17. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Shouldn't the Alpha be set to "Pre-Multiplied"?
    Quote Quote  
  18. Originally Posted by budwzr View Post
    Shouldn't the Alpha be set to "Pre-Multiplied"?
    Not in this situation - it's a straight alpha , pure black/white

    You use premultiplied alpha when the clip has variable (semi)transparency, maybe feathered edges
    Quote Quote  
  19. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Oh, I see. It's a 100% Density Map? Hahaha.
    Quote Quote  
  20. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    thanks man, you helped me do exactly what i wanted to do
    and since you know every thing, do i have any chance of compressing these clips without any quality loss?
    Quote Quote  
  21. Originally Posted by darknesslord View Post
    do i have any chance of compressing these clips without any quality loss?
    The subs are already compressed

    In that example, lagarith is used. Lagarith is an example of lossless video compression

    If you had used uncompressed RGBA instead, that clip would be 1.72MB clip would become 395MB. That's about 230x the size. It achieves so much compression because blank areas are easy to compress, low complexity. It's just a small time/date overlay. If you tried to compress "regular" content, you would not achieve such a large compression ratio .

    Native AVCHD clips are already compressed, so when you use lagarith, they actually become 5-10x larger. (Because the lossless compression is applied to the uncompresssed stream from the AVCHD - it's decoded and uncompressed before being re-compressed by lagarith)
    Quote Quote  
  22. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    i meant the compressing overall output, in other words clips captured by my handycam which information is mentioned in the beginning of thread.
    they have bitrate of 22Mbps, they are rather big files, so i look for a lossless (or unnoticeable loss) re-compression.
    Quote Quote  
  23. Lossless (mathematically lossless) compression will just increase the filesize

    You can reduce the filesize with minimal quality loss by re-encoding using x264 or some GUI for it (e.g. megui, ripbot, xvid4psp). You can frameserve out of vegas using debugmode frameserver. You can use <search> because there are many guides describing how to do this
    Quote Quote  
  24. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You already have lossy-compressed files (~30:1). You will be uncompressing them to do the overlay of the subs, then re-compressing them. This will LOSE quality. No ifs, ands or buts.

    How much quality you lose will depend on the compression settings & bitrate you give it when re-compressing. Again, if you re-compress to Lagarith, etc., your size will likely be 5x or more what it is now (though the only quality you will lose would be from the overlay operation's bitdepth rounding calculations). If you recompress back to an AVC of form & bitrate similar to your source file, you will have similar sizes to your source and will have only SLIGHT or MILD quality losses. How much is MILD? Is MILD too much for you? You have to decide that. If you try to do the recompress AND you try to go for even LOWER sizes, your losses will be even more noticeable. How much noticeable depends again on the material and on YOU.

    Scott
    Quote Quote  
  25. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    Originally Posted by Cornucopia View Post
    You already have lossy-compressed files (~30:1). You will be uncompressing them to do the overlay of the subs, then re-compressing them. This will LOSE quality. No ifs, ands or buts.

    How much quality you lose will depend on the compression settings & bitrate you give it when re-compressing. Again, if you re-compress to Lagarith, etc., your size will likely be 5x or more what it is now (though the only quality you will lose would be from the overlay operation's bitdepth rounding calculations). If you recompress back to an AVC of form & bitrate similar to your source file, you will have similar sizes to your source and will have only SLIGHT or MILD quality losses. How much is MILD? Is MILD too much for you? You have to decide that. If you try to do the recompress AND you try to go for even LOWER sizes, your losses will be even more noticeable. How much noticeable depends again on the material and on YOU.

    Scott
    actually this clip is codec with this parameters and possibly with fast algorithm
    Format profile : High@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames

    i think re-encoding it with higher reframe, b-frame, format profile and ... can result in smaller file with unnoticeable quality loss
    Quote Quote  
  26. Member
    Join Date
    Apr 2014
    Location
    ardabil, iran
    Search Comp PM
    Originally Posted by poisondeathray View Post
    You can frameserve out of vegas using debugmode frameserver. You can use <search> because there are many guides describing how to do this
    1-what is that?

    and by the way i use mediacoder for encoding.
    2-how good is that? i mean should i stick to this or i should choose another encoder?

    3- i also have handbrake which seem to have more options than mediacoder for h264!!! why?
    Quote Quote  
  27. Originally Posted by darknesslord View Post
    Originally Posted by poisondeathray View Post
    You can frameserve out of vegas using debugmode frameserver. You can use <search> because there are many guides describing how to do this
    1-what is that?
    It's a frameserver. It allows you to "connect" vegas to other programs. So it allows vegas to use other encoders. You can use x264 (or some GUI for x264), because it potentially offers better compression (better quality per filesize) than vegas's mainconcept or sony AVC encoders

    and by the way i use mediacoder for encoding.
    2-how good is that? i mean should i stick to this or i should choose another encoder?
    It depends what settings and encoder you use. Mediacoder is just a GUI or front end for other encoders


    3- i also have handbrake which seem to have more options than mediacoder for h264!!! why?
    Ask the programmer, Stanley Huang. Or learn to use x264 commandline (more options than handbrake) . Having more options is only better if you know how to use them and in what situations - otherwise it can get confusing
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!