View Full Version : FLV Extract
Moitah
18th July 2006, 00:02
FLV Extract (http://www.moitah.net/) extracts video and audio from FLV files without decompressing or recompressing. The video is saved to AVI (H.263/FLV1 and VP6/FLV4 are supported) and the audio is saved to MP3.
The AVIs will not play unless you have the right decoders. The ffdshow-tryout builds from 2006-Oct-02 or newer can decode both FLV1 and FLV4. I'm not sure how useful the video extraction is, it's more of a "because I can" type thing I guess :). Also, FLVs can be variable framerate. FLV Extract calculates the average framerate for the AVI so you might have synch issues.
On the other hand, I think it's pretty useful to be able to directly extract the MP3 audio stream.
.NET Framework 2.0 required
foxyshadis
18th July 2006, 01:18
Is it possible to do it the ffmpeg way, with an enormous base framerate and avi drop frames filling in the gaps?
Moitah
19th July 2006, 03:36
Sure but I doubt I will actually do it :p.
MeteorRain
24th July 2006, 18:55
or output timecodes if possible? maybe more useful then a 120fps avi output~
Moitah
24th July 2006, 21:38
Yeah, outputting timecodes sounds like a good idea. I'm busy with something else but I'll do it when I get a chance.
Moitah
28th July 2006, 00:07
1.1.0 released! Changes:
* Ability to write timecode files.
* Shows estimated true frame rate (ignores gaps in timestamps).
mgh
21st October 2006, 16:07
very very useful utility with you tube etc.
:thanks:
unskinnyboy
30th October 2006, 19:46
FLV Extract gives the following error with this (http://www.mediacollege.com/video-gallery/testclips/barsandtone.flv) file:
http://maxupload.com/img/FD855A21.jpg
My wild guess would be the framerate, because ffmpeg gives the framerate of the file to be 1000.00 fps(r), but then again UInt32 should support values 0 to 4,294,967,295, so I'm not sure what is happening. The video and audio do get demuxed though.
Moitah
30th October 2006, 23:01
Ah, yes it's the frame rate causing that error (found a copy of the file via Google to test with). The frame rate denominator is calculated as nanoseconds per frame, which in this case overflows because there are only 2 frames spaced 6 seconds apart. Maybe I can find a better way to calculate the fraction, this (http://www.virtualdub.org/blog/pivot/entry.php?id=81) looks helpful.
Moitah
31st October 2006, 08:39
1.2.0 released:
Improved frame rate calculation.
Doesn't freeze Explorer while extracting.
unskinnyboy
31st October 2006, 13:15
That was quick, thanks. The Uint32 error is gone, but are the reported values correct?
http://img333.imageshack.us/img333/9082/flvextractdoubtqs4.png
Note that ffmpeg says the framerate is 1000.00 fps. I see a world of difference here. Or was ffmpeg totally off the mark?
Moitah
31st October 2006, 18:58
It's correct. If you have FLV Extract write the timecodes you'll see there's only 2 frames in that file. And I checked the video renderer properties while playing it in MPC, it's not 1000 fps :).
foxyshadis
31st October 2006, 19:41
ffmpeg claims every flv is 1000 fps, because it has no way of detecting their framerate. So it just upsamples every conversion to 1000 fps so it won't ever lose anything.
drbuzz0
31st October 2006, 21:56
FLV Extract (http://www.moitah.net/) extracts video and audio from FLV files without decompressing or recompressing. The video is saved to AVI (H.263/FLV1 and VP6/FLV4 are supported) and the audio is saved to MP3.
The AVIs will not play unless you have the right decoders. ffdshow contains a decoder for FLV1 and Media Player Classic contains a decoder for FLV4. I'm not sure how useful the video extraction is, it's more of a "because I can" type thing I guess :). Also, FLVs can be variable framerate. FLV Extract calculates the average framerate for the AVI so you might have synch issues.
On the other hand, I think it's pretty useful to be able to directly extract the MP3 audio stream.
.NET Framework 2.0 required
Is there anyway that an FLV file can be reformated into a native H.263 (sorenson) or VP6 file?
This tool converts the file to the AVI container, but the codec is still FLV. The FLV codec is basically the same as the Sorenson-3 codec or the VP6 codec, but it's muxed in a way that's just different enough to not allow for playback of the files with a regular h.263 or vp6 player.
The reason I ask is that I'm looking for a way to play FLV files on a PDA, by use of CGI on a server (preferably written in PHP).
Having to completely transcode the video would be way too resource intensive. Any chance that FLV could be rewritten into h.263 or vp6??
Moitah
31st October 2006, 22:32
If you change the fourCC from FLV4 to VP62, VP6 decoders work fine except the video is upside down. As for H.263 I don't really know, it was asked (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-July/013079.html) on the ffmpeg-devel list but I don't think anything happened. It's a feature I would never use so I don't have a lot of incentive to look into it.
unskinnyboy
1st November 2006, 00:35
ffmpeg claims every flv is 1000 fps, because it has no way of detecting their framerate. So it just upsamples every conversion to 1000 fps so it won't ever lose anything.Nope.
This is Sorenson FLV1...
Duration: 00:00:07.4, start: 0.000000, bitrate: 56 kb/s
Stream #0.0: Audio: mp3, 22050 Hz, stereo, 56 kb/s
Stream #0.1: Video: flv, yuv420p, 320x240, 20.00 fps(r)
This one is On2 FLV4...
Duration: 00:00:07.4, start: 0.000000, bitrate: 56 kb/s
Stream #0.0: Audio: mp3, 22050 Hz, stereo, 56 kb/s
Stream #0.1: Video: vp6f, yuv420p, 320x240, 20.00 fps(r)
foxyshadis
1st November 2006, 07:06
Must be new then, it still does that with the flvs I tested. Oh, I bet it just sets it to 1000 if it can't detect the framerate, for whatever reason, maybe it'll keep getting better in the future. Good news though.
Or maybe the flvs I have really do mark their framerate as 1000, even if they're not, I didn't investivate hard enough.
unskinnyboy
1st November 2006, 18:09
FPS detection for FLVs were possible for like a long time now (the oldest build I have in my directory of archive builds is from 04/10/06) but some revs in between were really b0rked (r6375, for example). The problem is probably the files you tested itself. Funny thing is, the sample barsandtone.flv which showed up as 1000.0 fps with r6830, shows up as 0.17 fps with r6375 (which is the correct value). Bottom line being that, the underlying code seems to be rapidly changing so sometimes the fps detection works, sometimes it doesn't.
thuongshoo
14th September 2007, 05:01
Was header of mp3 written by a wrong value ?
http://img260.imageshack.us/my.php?image=flvextract1vu1.png
http://img207.imageshack.us/my.php?image=flvextract2wi5.png
Thank Moitah! I like it very much! :)
SealTooGreat
14th September 2007, 08:28
Moitah, thanks for the very easy and useful tool. I am using it for extracting mp3 only from .flv, the rest i re-encode via avisynth and xvid_encraw. I also like fps value which your tool provides.
Moitah
14th September 2007, 18:12
Was header of mp3 written by a wrong value ?
FLV Extract doesn't generate headers or any other data for MP3 files, it simply copies chunks of data from the FLV audio 'tags' into the MP3 file. The frame headers are already present inside the FLV file and not modified by FLV Extract, so if something is wrong with the output then it is likely the fault of whatever created the FLV file.
smok3
14th September 2007, 19:52
is there a working muxer for flv (vp6) + mp3?
my problem: http://forum.doom9.org/showthread.php?t=129871
Moitah
27th February 2008, 04:18
FLV Extract 1.3.0 released (http://www.moitah.net/). Surprisingly FLV Extract is now the most popular download from my site with ~50,000 downloads a month. Now I need to finish the VirtualDub FLV input plugin :).
* Added dialog that lists the status of all files to replace the message box
that was shown for each file.
* Doesn't leave files open upon error.
* Better handling of incomplete files.
* Changed VP6 FourCC from FLV4 to VP6F.
* A few fixes for rare files.
Lorax2161
27th February 2008, 04:43
50,001. :)
Only tried it on a few clips, but so far so good. Thanks!
dimzon
27th February 2008, 14:02
any chance to get proper oneclick flv->mkv remuxer? or even better command line tool?
Moitah
27th February 2008, 17:20
@dimzon: No, but maybe a command line version. That would allow you to use it in a batch file along with mkvmerge.
cobo
22nd March 2008, 01:12
When I play the avi produced by FLV extract with MediaPlayerClassic it has sound. Three audio tracks according to MPC file properties - two MP2 and one MP3. Where is MPC getting the audio from - is it in the avi? FLV extract only extracted the MP3.
If I change the name of the avi and play it, then there's no audio.
Moitah
22nd March 2008, 01:28
AVIs written by FLV Extract do not contain audio. MPC automatically loads an audio file that has the same filename as the video. If you want to add the audio inside the AVI, you can use VirtualDub 1.8.0 or newer.
DaMaven
31st March 2008, 01:50
Is this program meant to work with flv files with AAC audio?
I got a recent video off Youtube which has AAC audio according to MPC, but FLV extract won't recognize it as a flv file.
Moitah
31st March 2008, 03:32
Can you post a link to the video (the page on YouTube is fine)?
Placio74
31st March 2008, 10:34
I got a recent video off Youtube which has AAC audio according to MPC, but FLV extract won't recognize it as a flv file.
Probably it's just MP4.
Check used MediaInfo.
Try Yamb (MP4Box) to demux.
Actual can download some video files from YouTube as FLV and MP4.
Dmitry Vergheles
25th April 2008, 18:17
Hello Moitah,
Thank you for your tool. Very usefull:)
Don't you want to add ASF output fetaure?
Simonjp
19th August 2008, 09:26
just wanted to add my voice to the choir - thank you, a very useful tool! Now that the BBC seems to be changing its radio streams from Real Media to mp3 through FLV, this will be very useful to be able to continue to listen to BBC radio shows on my morning commute!
Moitah
17th November 2008, 03:02
FLV Extract 1.4.0 released (http://www.moitah.net/):
* Supports H.264/AVC, written as a raw elementary stream.
* Supports AAC, written as .aac with ADTS headers.
* Extracts VP6 alpha channel to a separate file.
* Prompts before overwriting files.
weaker
17th November 2008, 23:52
Thank you! Always useful.
Taurus
19th November 2008, 13:28
FLV Extract 1.4.0 released (http://www.moitah.net/):
* Supports H.264/AVC, written as a raw elementary stream.
* Supports AAC, written as .aac with ADTS headers.
* Extracts VP6 alpha channel to a separate file.
* Prompts before overwriting files.
Boah, almost missed this :p
Thank you Moitah, really appreciated :thanks:
Alwayscamp
20th November 2008, 00:37
wow! and thanks.
using this to demux flv tutorial files so that I can play them on iphone.
THANKS
flebber
24th January 2009, 06:14
HI I like the program.
NerdWithNoLife
25th February 2009, 02:08
Sorry if this is against rule 11, but thanks very much for the AVC support! I couldn't find a way to open one of those odd AVC flv's, then I found this program was updated. You help me to keep with the times.
Moitah
29th May 2009, 05:13
FLV Extract 1.6.0 released (http://www.moitah.net/). Recent features (from 1.5.0 and 1.5.1 as well):
Generates VBR header for VBR MP3 audio streams
Supports Speex audio streams
Suggests cropping parameters for VP6 videos that were mod-16 padded by the encoder
Command line version
fuxxi
26th June 2010, 16:46
Hi Moitah,
thank You for this great small and perfect working tool!
Can You update the program to support extraction via context menu in windows explorer or at least automatically extraction if I open an flv file with the program?
Maybe You can add some options to set some parameters like handling for files automatically opened by FLV Extract?
I use it only to extract audio files and its not the fastest way to open the program and then drag files to the program. This can be done faster.
Foofaraw
7th August 2010, 01:31
Yes, excellent and simple - thanks Moitah just what I needed :)
Lighto
6th March 2011, 06:33
Excellent project, is it possible to add support for nellymoser audio extraction?
BugiBugBug
20th April 2012, 11:40
I've noticed something with FLV Extract that could be strange or maybe intended behaviour; at least I do not get it.
I got two parts of a clip in FLV - it contains H264 and AAC (LC) streams.
According to FLV Extract, the framerate is 29,70 (average frame rate is a bit lower with 29,661).
If I remux the FLVExtracted H264&AAC using the timecode file in MKVmerge, the resulting file has a 30.003 frame rate and is 1h20min. long - regardless of whether I set the frame rate to 29.97.
If I remux the streams without using the timecode nor the framerate setting, the resulting file is 29.70 fps, duration however -still- 1h20min.
If I remux the streams without the timecode file, but with the 29.70 setting, the resulting fps is actually 29.70, and the total duration is -still- 1h20min.
Mediainfo tells me all files are CFR. Results are the same regardless of using FLVJoiner before extracting and muxing.
Do you think this could be a bug in timecode file generation?
sneaker_ger
20th April 2012, 15:22
The first two or three timecodes of flv files are often "0", while all other timecodes equal 1000/(30/1.001) (there's some jitter due to limited precision). That's why these strange average framerates, like "30.003", are displayed. I don't really know if that can be considered a bug. It could be a problem that people encounter during the creation process of the flv. A test I've done once showed no a/v sync problems when assuming constant 30/1.001, but I don't know if this applies to all flv files. I'm also interested in a definite explanations on this issue.
Mosu
21st April 2012, 09:21
Also read my FAQ entry about "frame rate" in Matroska files (https://www.bunkus.org/answers/?qa=205/why-is-the-fps-frame-rate-wrong). Short answer: there is no frame rate in a Matroska file.
BugiBugBug
19th May 2012, 11:42
Also read my FAQ entry about "frame rate" in Matroska files (https://www.bunkus.org/answers/?qa=205/why-is-the-fps-frame-rate-wrong). Short answer: there is no frame rate in a Matroska file.
Thank you for the heads-up. I would understand this to mean that a setting like 29,70 in the second tab of mkvmerge is actually not directly used, but translated in internal frame duration.
Still this does not explain why the duration of the files stays the same with any setting, since 30.003-29.70 is 2,3 frames per second faster. on a 1 hour 20 min. file, this should show differences in length, it seems to me.
Since the FLV is clearly CFR, I've ultimately muxed the file without using the timecode file, and setting 30/1001. This produced a fine mkv with a/v in sync.
sneaker_ger
19th May 2012, 12:57
Still this does not explain why the duration of the files stays the same with any setting, since 30.003-29.70 is 2,3 frames per second faster. on a 1 hour 20 min. file, this should show differences in length, it seems to me.
30.003 fps - 29.97 fps = 0.033 fps, not 2.3 fps
Also don't forget that the duration is usually the difference of time between the start and the end of the longest track, which could be the audio track. You wouldn't see any difference then.
And 30.003 fps is the average framerate, not necessarily a constant framerate. In this case constant 29.97 fps with a negative delay at the beginning (as mentioned in my other post), so you should never just fill in the average framerate into mkvmerge GUI's fps field.
Thank you for the heads-up. I would understand this to mean that a setting like 29,70 in the second tab of mkvmerge is actually not directly used, but translated in internal frame duration.
That is correct.
Still this does not explain why the duration of the files stays the same with any setting
Because timecode files always override the --default-duration setting.
GimmeAreason
28th May 2012, 23:38
Wow. I remembered about this tool today when trying for a while to get the audio out of a file that claimed to be flv video yet had no video apparently. I had downloaded it from the bbc stream..supposedly an audio file but they made it video and most players except mpc (which I use anyway) wouldn't touch it! Your program instantly left me with an ACC file and that's it!
THANK YOU, great software :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.