Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th July 2006, 00:02   #1  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
FLV Extract

FLV Extract 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
__________________
moitah.net

Last edited by Moitah; 1st November 2006 at 07:14.
Moitah is offline   Reply With Quote
Old 18th July 2006, 01:18   #2  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,550
Is it possible to do it the ffmpeg way, with an enormous base framerate and avi drop frames filling in the gaps?
foxyshadis is offline   Reply With Quote
Old 19th July 2006, 03:36   #3  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Sure but I doubt I will actually do it .
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 24th July 2006, 18:55   #4  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
or output timecodes if possible? maybe more useful then a 120fps avi output~
MeteorRain is offline   Reply With Quote
Old 24th July 2006, 21:38   #5  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
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.net
Moitah is offline   Reply With Quote
Old 28th July 2006, 00:07   #6  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
1.1.0 released! Changes:

* Ability to write timecode files.
* Shows estimated true frame rate (ignores gaps in timestamps).
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 21st October 2006, 16:07   #7  |  Link
mgh
Registered User
 
Join Date: Oct 2004
Location: India
Posts: 322
very very useful utility with you tube etc.
__________________
A shut mouth gathers no foot
mgh is offline   Reply With Quote
Old 30th October 2006, 19:46   #8  |  Link
unskinnyboy
Registered User
 
unskinnyboy's Avatar
 
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,047
FLV Extract gives the following error with this file:



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.
__________________
unskinnyboy is offline   Reply With Quote
Old 30th October 2006, 23:01   #9  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
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 looks helpful.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 31st October 2006, 08:39   #10  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
1.2.0 released:
  • Improved frame rate calculation.
  • Doesn't freeze Explorer while extracting.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 31st October 2006, 13:15   #11  |  Link
unskinnyboy
Registered User
 
unskinnyboy's Avatar
 
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,047
That was quick, thanks. The Uint32 error is gone, but are the reported values correct?



Note that ffmpeg says the framerate is 1000.00 fps. I see a world of difference here. Or was ffmpeg totally off the mark?
__________________
unskinnyboy is offline   Reply With Quote
Old 31st October 2006, 18:58   #12  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
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 .
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 31st October 2006, 19:41   #13  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,550
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.
foxyshadis is offline   Reply With Quote
Old 31st October 2006, 21:56   #14  |  Link
drbuzz0
Registered User
 
Join Date: Jan 2006
Posts: 46
Quote:
Originally Posted by Moitah View Post
FLV Extract 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??
drbuzz0 is offline   Reply With Quote
Old 31st October 2006, 22:32   #15  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
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 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.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 1st November 2006, 00:35   #16  |  Link
unskinnyboy
Registered User
 
unskinnyboy's Avatar
 
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,047
Quote:
Originally Posted by foxyshadis View Post
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...
Code:
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...
Code:
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)
__________________
unskinnyboy is offline   Reply With Quote
Old 1st November 2006, 07:06   #17  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,550
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.
foxyshadis is offline   Reply With Quote
Old 1st November 2006, 18:09   #18  |  Link
unskinnyboy
Registered User
 
unskinnyboy's Avatar
 
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,047
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.
__________________
unskinnyboy is offline   Reply With Quote
Old 14th September 2007, 05:01   #19  |  Link
thuongshoo
Registered User
 
Join Date: Mar 2006
Posts: 197
Was header of mp3 written by a wrong value ?

http://img207.imageshack.us/my.php?i...xtract2wi5.png

Thank Moitah! I like it very much!
thuongshoo is offline   Reply With Quote
Old 14th September 2007, 08:28   #20  |  Link
SealTooGreat
Registered User
 
Join Date: Dec 2006
Posts: 302
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.
SealTooGreat is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.