Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#31
|
|||
|
|||
Re: FLV fixer scriptSlightly improved Yet Another FLV Fixer: C file and compiled binary.
|
#32
|
|||
|
|||
Re: FLV fixer scriptThanks for the update TubeDigger
Best flvfixer ever made for windows noobs/pros (in my opinion) just drag/drop your flv f4v on yaflvfix.exe |
#33
|
|||
|
|||
Re: FLV fixer scriptHi, I have a problem that I suppose most people don't have because I have "broken" the file I need fixed myself.
The problem is I have a series of flv files dumped with rtmpdump that I want to merge, which have identical video/audio streams with overlap so they can't simply be connected one after the other. (That is for example file1 goes from 0-1hr file2 goes 45mins to 2 hours, etc) I have linux so I am unable to try most of the merging tools I found with a google search, but avconv and ffdshow both seem to be unable to do it. The files all have identical video/audio streams and since they overlap I went and found a spot they are the same in a hex editor and simply used dd to trim them then cat to join them together. Once concatenated together the playback is perfect and seamless in the version of mplayer2 I have installed (2.1~git20120828.28228-1) from start to end, however it doesn't show total play time and the OSD time jumps backwards when it hits the join point in the files with the message: Code:
Decreasing video pts: 4.743000 < 50.986000 I was hoping these concatenated files could simply be run through ffmpeg with '-codec copy' but when ffmpeg (most recent compiled from their git) gets to the join it gives a series of errors like this: Code:
[flv @ 0x204cba0] st:0 PTS: 41471 DTS: 41471 < 50991 invalid, clipping So I have been searching around trying to figure out how to fix the timestamps. Presumably they just need to be resequenced so they line up as they should. I looked at the ffmpeg source code where the 'invalid, clipping' message is to see if I could edit it to adjust the timestamps instead of clipping but it is quite a bit over my head. So that is what brings me here. I have tried both the php script and compiled the latest yaflvfix.c which works fine on linux. The php script gives weird artefacting at the join which other attempts to fix haven't and the same large skip/too short video playback. The yaflvfix program gives seemingly identical results to ffmpeg, but the source code is a lot easier to understand so I think it is the closest I have gotten to fixing this problem. Now I am trying to work from the yaflvfix source to see if I can edit it to meet my needs, but I was hoping someone could help me as I am completely clueless about all of this. Maybe someone could do it very easily, whereas for me it is very difficult. I know nothing about video streams or editing them at all. Here is a 12000682 byte sample clip showing my problem. The first 6000000 bytes are from the first video file and contain the unmodified header, the last 6000682 bytes are from the second file which I need to join and of course are taken from the middle of some video/audio data which is identical in both files. This isn't exactly where I need to merge them but is the shortest clip I could make where they overlap. The actual files are much larger. http://www.mediafire.com/?y2h9o6dml11kaz1 Any assistance people could give with fixing this would be greatly appreciated. If the yaflvfix.c program can be modified to handle this type of file I think that seems most promising right now. As I said this file plays flawlessly in a recent mplayer2 build so there is no video or audio corruption at all, it appears to be entirely a problem with timestamps and how various software deals with the timestamps. Thank you for reading, and thank you for any help you can give. |
#34
|
|||
|
|||
Re: FLV fixer script |
#35
|
|||
|
|||
Re: FLV fixer scriptQuote:
I will try it on a much larger file soon with several "seams" and let you know how it goes, but I anticipate it would work fine. At any rate I could probably just join one file at a time then run the fix after each join if needed. Will these changes eventually be merged into the main script you host on github, or is it something too custom and alters the behaviour in a way that it no longer works for other files it was originally intended for? Thanks again. You fixed it so fast when I had been struggling with it for a long time. Your work is very much appreciated. |
#36
|
|||
|
|||
Re: FLV fixer scripti have pushed the update to the repo. hopefully it wouldn't break any previous functionality. before reporting any problem with any of my scripts make sure you are using the latest version of the script from repo.
|
#37
|
|||
|
|||
Re: FLV fixer scriptChanges:
Code:
1. improved performance of FlvFixer Code:
@echo off title KSV FlvFixer Script rem == Set input output filenames == set IN_FILE="%~dpnx1" set OUT_FILE="%~dpn1_fixed.flv" rem == Change current directory == cd "%~dp0" cd %~d0 php FlvFixer.php --in %IN_FILE% --out %OUT_FILE% --debug --nometa 2> Debug.txt |
#38
|
|||
|
|||
Re: FLV fixer scriptHey KSV,
I want to fix a FLV file which rtmpdump (live stream) generated. I get the following error: Code:
FlvFixer.php --debug --nometa --in foo.flv --out bar.flv Code:
KSV FLV Fixer Type CurrentTS PreviousTS Size Position VIDEO 0 -1 15641 13 Fixing video timestamp VIDEO 0 0 7796 VIDEO 8 0 7796 15669 Fixing video timestamp VIDEO 0 8 9197 VIDEO 16 8 9197 23480 Fixing video timestamp VIDEO 0 16 7792 VIDEO 24 16 7792 32692 Fixing video timestamp VIDEO 0 24 8003 VIDEO 32 24 8003 40499 Fixing video timestamp VIDEO 0 32 7762 VIDEO 40 32 7762 48517 Fixing video timestamp VIDEO 0 40 9007 VIDEO 48 40 9007 56294 Fixing video timestamp VIDEO 0 48 7926 VIDEO 56 48 7926 65316 Fixing video timestamp VIDEO 0 56 9196 VIDEO 64 56 9196 73257 Fixing video timestamp VIDEO 0 64 421 VIDEO 72 64 421 82468 Fixing video timestamp VIDEO 0 72 7848 VIDEO 80 72 7848 82904 Fixing video timestamp VIDEO 0 80 7474 VIDEO 88 80 7474 90767 Fixing video timestamp VIDEO 0 88 8066 VIDEO 96 88 8066 98256 Fixing video timestamp VIDEO 0 96 7232 VIDEO 104 96 7232 106337 Fixing video timestamp VIDEO 0 104 8107 VIDEO 112 104 8107 113584 Fixing video timestamp VIDEO 0 112 7724 VIDEO 120 112 7724 121706 Broken FLV tag encountered! Aborting further processing. Processed input file in 0.06 seconds Finished |
#39
|
|||
|
|||
Re: FLV fixer script@Mary Chris Smith
Well script isn't lying. rtmpdump actually saved the corrupt file. it's a known bug in official version which i fixed ages ago. you need to use my version of rtmpdump to save the proper file in such cases. if you wanna recover the already saved files you have to fix them first by hand. |
#40
|
|||
|
|||
Re: FLV fixer scriptQuote:
|
Tags: flv fixer |
Thread Tools | |
Display Modes | |
|
|