VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Usually, the FLV file that you get directly from the recording is rather messed up. My preferred way to solve this is to demux the file (using FLV Extract) in a 264 and AAC file and a timecodes text file. I then mux all of it back together using mkvmerge and add some kind of audio delay. This works quite well, but I was wondering if there is a way to mux it back to FLV.

    I also would like to be able to open the resulting file in a program like VirtualDub so I can edit (split and join) it, without quality loss.
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    You can extract both with ffmpeg:
    FFmpeg -I "c:\path to Inputvideoname\video.flv" -vcodec copy -an outputname.flv <- for the video
    FFmpeg -I "c:\path to Inputvideoname\video.flv" -vn -acodec copy outputname.aac <- for the audio

    There are a multitude of programs to mux but a quick question if I may... I agree that most FLV are messed up upon downloading, refusing to play, copy, seek, wrong duration shown, out of sync. etc. butmost can be fixed by removing or replacing the Meta Data as shown below.
    Click image for larger version

Name:	Fix.jpg
Views:	397
Size:	225.6 KB
ID:	19837

    This can be accomplished by:
    Replace:
    FFMpeg -i "c:\path to Inputvideoname\video.flv" -vcodec copy -acodec copy "outputname.FLV"

    Remove:
    yamdi -I "c:\path to Inputvideoname\video.flv" -o "outputname.FLV" -M
    Last edited by Budman1; 31st Aug 2013 at 00:13.
    Quote Quote  
  3. Thank you very much. You seem to know a lot about this.

    I tried both the replace and remove method with ffmpeg and yamdi respectively, but they seem to have little effect. Both methods resulted in a video with wrong duration, starting in the middle and out of sync.

    In the screenshots you showed your own application. I've downloaded it but I'm not quite sure how to use it. Is it worth trying out?
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    My application basically is a gui front end and just does the remove or replace to fix FLVs so the results probably won't be much different. Any chance you can post one to examine? They are usually fairly easy to adjust once the reason is found. My appliction does use the new Check facility FLVMeta which now has a very good check facility so you could try it and see what errors it shows before and after fixing.
    I did notice one bug in my program still. I left a popup msg if you drag and drop but you just click ok and go. It was just a debug message and doesn't affect the program otherwise.

    Basically unzip the files to a folder. Run the program, open one or more files in files list. Move them as you want to working list by selecting each or select all button. Select one in working list and hit check button. Read what it says in console windows. Try remove or replace and it copies the file minus the meta or with new and adds it to working list. You can just highlight that NEW OR YAM file and test immediately.

    I'd still like one to disect if youvcan post a short one that's messed up. If there's a way to fix I will just add it to my program. Let me know.
    Quote Quote  
  5. You can download the file here so you can play with it for yourself.
    Quote Quote  
  6. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by KeyMs92 View Post
    You can download the file from mega.co.nz so you can play with it for yourself.
    no, No and NO, because the new Megaupload Megasucks Megatime:

    https://forum.videohelp.com/threads/357995-Don-t-use-mega-co-nz
    Quote Quote  
  7. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Well, must agree with El Heggunte... after trying to download with Internet Explorer, which finished, I found that no amount of searching would find the file. So I tried again and it stopped at 53% and nothing to make it take off again. Then I researched and found Mega only supports Chrome but promises to add some support for other browsers. I was curious so I installed Google Chrome and tried again...

    It's been a total of 1.5 hours trying and Chrome now stopped at 54% and, again, no buttons to refresh, restart, continue. nothing. I'll stick with my $1.99/Month 100GB online storage company advertised on TV. Sorry couldn't get the file, at least not from the Bigger, Better?, Faster? Mega.
    Quote Quote  
  8. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    The best option for 264/aac flv is to use ffmpeg to mux to a mp4 container where they belong instead of an flv container. I do folders full of these at a time.

    Code:
    for %%a in ("*.flv") do ffmpeg -i %%a -vcodec copy -acodec copy  %%~na.mp4
    Just put a copy of ffmpeg in the same folder and save the code above in a text file with a .bat extension then double click the bat file.

    You may want to run this vbs script to remove spaces from the file name or cmd.exe will skip the files with spaces...

    Code:
        dim objFileSys, file, folderName, folderObj, fileColl, objRegEx, newFile
         
        set objFileSys = CreateObject("Scripting.FileSystemObject")
        folderName = InputBox("Enter the full path where the files are located.", "Full path is required")
         
        set folderObj = objFileSys.GetFolder(folderName)
        set fileColl = folderObj.Files
        set objRegEx = new RegExp
         
        objRegEx.Pattern = " " ' the pattern is one space
        objRegEx.Global = true
         
        for each objFile in fileColl
        newFile = objRegEx.Replace(objFile.Name, "-") ' each pattern gets replaced with one dash
         
        objFileSys.MoveFile objFile, folderName & "\" & newFile
        next
    Copy the code with text editor and save as "replace-spaces-with-dashes.vbs" and double click the vbs file.
    Quote Quote  
  9. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    EDIT: Nevermind. You are talking about flv files from cam sites and such which have screwed up or no meta data and timecodes. I've heard that using Yamdi is the way to go but I could never find anything to fix these corrupt recordings. If I was lucky to get one or two to open in Virtualdub then I could fix them but most of them would not open in any software editor. If they did, I would only get two or three seconds of a file. Even with the ffmpeg option.

    Next time I run into these files I'll try and remember this thread since Budman seams to be experienced in this area.
    Quote Quote  
  10. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    The downloaded file above is severely corrupted with backward timestamps, duplicate frame timings (50 in a row) and looks like it was okay until about the middle of it when the stream went south. The original caused VirtualDub and FFMpeg to blow up but Yamdi seemed to allow a file that could be worked with but even then separating it into separate audio and video threw A LOT of errors and ended up with a frame rate half the original and twice the duration of course.

    Putting them back together and adjusting frame rates worked pretty well at least to play but the sync in the second half is still a challenge since there just seems to be missing data from original. I'm trying to find a 'neat' way to fix without all the operations but its a nice project that will keep me busy for a while. LOL
    Quote Quote  
  11. Sorry, sorry, sorry!
    From the uploader's perspective Mega seemed fine, although limited in terms of features. I guess it'll get better over time.

    So the gist is that the file is severely corrupted. I must also add that the stream buffered several times during the recording, so that might explain much of the corruption.

    The best result I got was by using FLV Extract to get the video, audio and timecodes, sorting the timecodes using Excel (because not all are in ascending order) and muxing all the tracks together with mkvmerge using this command:

    Code:
    "mkvmerge" -o "Output.mkv"  "--forced-track" "0:no" "--timecodes" "0:Sample.txt" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "Sample.264" ")" "--aac-is-sbr" "0:1" "--sync" "0:-1000" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "Sample.aac" ")" "--track-order" "0:0,1:0"
    It's pretty much 'perfect' until the 1:49:00 mark, when the audio goes of sync again. That said, it's probably far from a clean file and I'm still having a hard time opening it with a program like VirtualDub.

    Let me know if you find something. Your efforts are very much appreciated!
    Last edited by KeyMs92; 2nd Sep 2013 at 15:54.
    Quote Quote  
  12. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    NO biggie on the Mega, but we now know it isn't Bigger, Better, yada, yada, that Dot.com brags of.

    I was able to get most in sync as you mentioned but the second half is just missing video, audio, timings, etc. and not much to be done unless its broken apart in segments and timed for each and reassembled. The problem is there are some really bad spots in the second half. I was able to load the original, the Yamdi stripped version and the version with new meta, all into VirtualDub and by adjusting the delay to 1000ms and the frame rate, It played pretty well but I could see the sync go in and out as people talked.

    If it buffered several times, that's usually not good for capturing and you might just want to hit pause occasionally since that seems to help sync problems or at least not aggravate it when streaming.
    Quote Quote  
  13. Thanks for your efforts!

    So which method gave you the best result: Yamdi or the new metadata one? For that method, could you list some steps of what you've done? I'm wondering how it compares to the mkvmerge result. Finally, I'm wondering if and what kind of plugins you're using for VirtualDub, especially since you're also able to load the original.
    Quote Quote  
  14. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    OOOO, tough question... which worked better. The best results I got were with removal of Meta with Yamdi and then it pretty much was okay up to 01:49:00.000 but got out of sync in jumps up to about 1 second by the end. Since Replacing Meta used FFMpeg, it tended to rewrite timings and frames even though told to copy so the video tended to freeze here and there.

    I also tried to split the video into 2 pieces, good section and bad and worked with both but sadly their is just a lot of duplicate timings and missing data in the last part to match up. The reason the original and others load into my VirtualDub is that I have the FFDshow codecs and AAC ACM codecs loaded:
    Click image for larger version

Name:	ScreenHunter_22 Sep. 06 22.44.jpg
Views:	684
Size:	48.9 KB
ID:	19950
    You have to turn the AVC1 codec on in FFDshow and it should load okay but I'm not sure what error you got trying to load it. As far as plugins I have them all, especially the Directshowsource and FFInputSource but they weren't actually needed.

    I'm still trying to create a custom timing file and some program that will convert or copy with those timings. So far still looking...
    Quote Quote  



Similar Threads

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