Results 1 to 5 of 5

Thread: Problem with buggy/laggy VBR video conversion

  1. #1

    Default Problem with buggy/laggy VBR video conversion

    Hi

    I've got some unstable VBR from USTREAM (not standard, as it varies from the uploader's camera) and when i use FLV extract or FFmpeg to copy out the video which is AVC

    Problem is the resulting video gets out in constant bit rate and loses frames where the video lags when the livestream network lag occured, audio is fine.
    Insead of lagging and displaying the last frame for the time, the video cuts and plays like the lag didn't happened, the original FLV has also timing glitches, sometimes 2 seconds pass in only 0,5 real-time.

    Basically I made half of the video in ... most of the time I spent banging into a wall by filling out the missing frames in the video to match audio length which has came out largely intact.
    The problem is not exactly the editing part, it's the HUMONGOUS PREVIEW LAG once I get past the half of the timeline of the 200MB video.

    I see FLVExtract has timecodes and saves as TXT but I don't know how to use them to delay frames when the laggies occur so i don't have to PAINSTAKINGLY search out, and you know how that is when I have to wait 30 secs or more for the preview to load and to seek out all the random laggies.

    This is the original FLV
    Mediainfo (standalone, updated it a week ago)
    Code:
    Format                                   : Flash Video
    File size                                : 197 MiB
    Duration                                 : 32mn 31s
    Overall bit rate                         : 846 Kbps
    Writing application                      : Ustream.Tv
    Tagging application                      : Yet Another Metadata Injector for FLV - Version 1.8
    
    Video
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Baseline@L3.1
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 1 frame
    Codec ID                                 : 7
    Duration                                 : 32mn 28s
    Bit rate                                 : 802 Kbps
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 28.823 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.091
    Stream size                              : 192 MiB (97%)
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.601
    
    Audio
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 10
    Duration                                 : 32mn 31s
    Bit rate                                 : 19.9 Kbps
    Channel(s)                               : 1 channel
    Channel positions                        : Front: C
    Sampling rate                            : 11.025 KHz
    Compression mode                         : Lossy
    Stream size                              : 4.95 MiB (3%)
    This is FLVExtract .264
    Code:
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    File size                                : 191 MiB
    
    Video
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Baseline@L3.1
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 1 frame
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.601
    This is FFMPEG copy and copyts
    Code:
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom
    File size                                : 196 MiB
    Duration                                 : 32mn 31s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 844 Kbps
    Writing application                      : Lavf55.10.100
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Baseline@L3.1
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 1 frame
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 32mn 28s
    Bit rate                                 : 821 Kbps
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Variable
    Frame rate                               : 28.822 fps
    Minimum frame rate                       : 0.500 fps
    Maximum frame rate                       : 16 000.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.093
    Stream size                              : 191 MiB (97%)
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.601
    
    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 32mn 31s
    Bit rate mode                            : Variable
    Bit rate                                 : 20.3 Kbps
    Channel(s)                               : 1 channel
    Channel positions                        : Front: C
    Sampling rate                            : 11.025 KHz
    Compression mode                         : Lossy
    Stream size                              : 4.69 MiB (2%)
    I later realized that FFMPEG produces the proper playback and I can play great in MPC an WMP ... but then the other programs make issues.

    Later I also realized that AAC is not supported by VEGAS so I thought getting rid of audio, so I did.

    But still Vegas doesn't want to open the MP4 from FFMPEG, neither AVI.
    For the intermediary as I did before with MP4Cams2AVI (which was the program that caused the "lost frames" and sync) i didn't use it but just used AVI directly in FFMPEG, but still nothing, Vegas accepts it but it's all black frames, unfortunately same thing in VDUB, it's all black frames and I can't convert them to lagarith or cineform.

    Also Cineform Studio crashes when I try to open the MP4 from FFMpeg.

    I need to read them, and convert to intermediate and then vegas will surely play them, i just want to preserve timecodes as it will save A TON of time.

    SPECS:
    Intel Core i7 3820
    Asus P9X79
    16GB DDR3 Corsair Vengeance
    Radeon HD5850

    The reason why I wanted to get the video out is to preserve quality because it's not that great already at all. I did a ton of research on my own (I know PCs a lot but not in this field yet) but I'm getting tired now, need a break!

    And I know I could just convert these files left handed but I already tried and the quality was bad and also I think It had same sync issues, forgot exactly, but I don't have that kind of experience to reconvert with absolute best settings and options for a very good covert. It would require same amount of research and time I know would like to do it, but not right now. And now I don't even want to go that path as the sync issues are totally out of my league.

  2. #2

    Default

    I use FFMPEG, but don't use Vegas. And I am not an expert in these matters, so my assumptions may be wrong:

    Your 'conversion' using FFMEG has only changed the container for the data. It was a Flash file; and now it is an MP4 file.
    According to the OP's details from Mediainfo:

    File format : Flash Video
    ___Video Format : AVC
    ___Video Frame rate : 28.823 fps
    ___Audio Format : AAC

    File format: MPEG-4
    ___Video Format : AVC
    ___Frame rate mode : Variable
    ___Audio Format : AAC

    The only difference which I can see if that the file now has a variable video framerate.

  3. #3

    Default

    Also Vegas reports it as 29,790 .. not the flv thought.

    I am relatively new to this so when i started the project a few days ago I didn't expect that much lag in the preview windows but it's getting above ridicolous so I had to go research more, i had no idea I was going to trap my self, but the problem started that vegas doesn't support FLV and then I was going haywire why not if the video is AVC inside the FLV container, I didn't had much of the programs before nor FFMPEG, so it worked when i extracted the AVC with FLVExtract which created a .264 file, and this worked with Vegas.


    The problem is I can't back off now unless i can get the FLV converted to either an intermediary or lower-quality proxy version with the same laggy/buggy frame structure intact so I don't have to do manual frame delaying which is a very lengthy process.

    Since i have tried to use intermediary, but the remuxers i used in Avidemux and MP4toAvi-and-Vdub-to-lagarith-or_cineform did cut out the laggy moments, the timecode structure was not preserved, frame rates could possibly be modified and so it didn't work, it messed the delays.
    And I used so many combination, some of them were so broken that actually FPS or what the heck changed that the video didn't even playback at the same rate so it kind of get synced with audio then it got out of sync again during playback.


    I was trying to convert the .264 or the FLV to a proxy but I am still unsucessful, even when I have successfuly converted then Vegas doesn't want to recognize the file. It's a bit tricky as I had to learn the FFMPEG (nothing else i have even opened this formatless file)
    The Ustream files are totally random, from the same source, some are 23,xxx or 24,xxx this one is 28,xxxx some are 30 and

    Looks like that 29,790 is the real frame rate i think, because i made an MPEG2 with FFMPEG and it did well and with same times hoever vegas doesn't accept it. had to do it a few times, mpeg2 conversion ended up 6 minutes more than the original ... i'm quite new to these weird clusterfuck annomalies and glitches and ah.

    The problem is also, the 264 file is largest and it's like 65% of the whole project ... so i can't just throw away and start over.

    Either mediainfo is wrong or the other programs can't detect 28 ... since i haven't found ANY mention of 28 fps on the whole internet lol.
    Last edited by Stewox; 07-07-2013 at 06:17 PM.

  4. #4

    Default

    I think a container may hold a different FrameRate to the actual video steam, possibly as a result of poor programming. In effect, an 'AVI' might claim to be 25fps, but an MPEG4 inside the AVI may claim it is at 30fps.

    With FFMPEG, one can force the conversion to encode the new video using a different codec. The following example reads an FLV file (myfile.flv), and using the same quality level (-sameq), it must convert the video to use the mpeg4 codec (-vcodec mpeg4) and convert the audio using an mp3 format (-acodec libmp3lame); and to create a new video (myNewVideo.mp4).

    ffmpeg -i myfile.flv -sameq -vcodec mpeg4 -acodec libmp3lame myNewVideo.mp4

  5. #5

    Default

    well I already got that far to know about sameq but the one i have it's not called sameq anymore, the FFMPEGs across platforms seem different.

    Also there's documentation poor and old, so i had to rely on random thread on net howevermuch I found, I know there's some superguide burried deep down but I didn't even found all the codec commands for FFMPEG.

    Anyways thanks for your input, you're right that mediainfo can get confused with this non-standard stuff.

    Basically i went for it and just used the FLV to try to get it converted with ImToo converter and try more combinations out ... I ended up with .AVI format with plain MPEG4 VISUAL, set up same quality command left everything else on defaul (VBR)

    The thing ended up nicely, just 1.3 GB, clean and nice in player, when I got it into Vegas, all i had to do was to move it by 14 frames in one way to match audio (as i have extracted and re-encoded that could got a pushed a bit) and the thing worked perfectly, all the laggies, all the artifacts were there and present and the timing was spot on like in the original, i checked key areas for sync, all matched great, ahh finally this THING is over! The preview is ice smooth, not even a single dot of loading.

    This AVC thing sure caused me ONE WEEK WORTH OF HEADACHE. I know, that's how it goes, I was expecting this, that's how I learn, but I'm glad i learned a lot. But maybe it could took me some more time and learn more stuff along the way lol ... well there's always next time.


    And I think the root of this trap was the damn NELLYMOSER audio, which was in another ustream account, also FLV but total different kind of video cam, different video too, so i had to get FLVExtract to get the audio out and somehow managed to get it to WMA. I probably wouldn't found FLVExtract and probably could figured out the AVC fix before getting into the trap.

Similar Threads

  1. .MPO video format conversion problem
    By teepee in forum General video editing software help and advice
    Replies: 1
    Last Post: 11-20-2011, 01:17 AM
  2. Laggy video in preview??
    By Defiancey in forum Sony Vegas video editing apps
    Replies: 2
    Last Post: 10-22-2010, 11:03 PM
  3. Slow Motion in Sony Vegas 8.0 Laggy/Choppy Problem
    By FeaReD-x in forum Sony Vegas video editing apps
    Replies: 12
    Last Post: 06-19-2009, 07:19 PM
  4. Replies: 7
    Last Post: 07-18-2005, 06:12 PM
  5. VHS to DVD CONVERSION PROBLEM
    By sandeep in forum General video editing software help and advice
    Replies: 2
    Last Post: 06-09-2005, 12:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •