We have a video (FLV/H.264 baseline) that was produced with the IMG Tech hardware H.264 encoder, and we're going back and forth with Intel to try and determine why it can't be played in Flash. When we attempt to play this video in any version of Flash player on any platform, we get a video with the correct duration that displays only black video. Does anyone here have the tools to take a quick peek and see what might be wrong with it? Or, if you can give me a pointer on how to debug, that would be appreciated.
The video can be downloaded from http://www.care-view.com/images/s2.flv. Sorry, I would upload it to one of the supported video sites (youtube, etc...), but didn't think that it would preserve the content.
Any help would be much appreciated.
As an additional note, my gut feel is that it's a problem with the encoder, but I'm stuck trying to prove that, and they have said that it's most likely a problem with the flash decoder. I just need something to be able to know for sure either way.
You said MP4 and FLV, these don't mix.. FLV is a very old format. It supports codecs like Sorenson Spark, On2VP6 Pro, etc. MP4? That's not supported. Chances are you just need to re-encode the FLV with a Flash supported codec such as mentioned.
I downloaded your FLV and it's clearly not a FLV. I can't load it into any FLV-supporting apps (including professional grade). In fact the only app I can load it into, which is the universal "nothing else plays this" app, is VLC player. This app does not pay attention to the file extension (FLV), it reads metadata and loads a codec if it's supported. I have thousands of codecs installed. It doesn't help me beyond saying your FLV is not valid. If it was, "Flash Video" would certainly be loadable via Flash, Adobe Media Encoder or many other apps that fully support FLV.
An option is to export to a very common format (H.264/MP4 with a .mp4 extension for lossy encoding) and then convert it to a FLV. If you have a lot of extra storage, the best practice is to export to a lossless codec (AVI Uncompressed, MOV with "None" compression, HuffyYUV, Bitjazz Sheer Video, Quicktime Animation codec with Millions+ and Best Quality, etc). Then take that file and compress it into a FLV properly.
Thanks for your reply, and for attempting to play the file. I'm not sure why it doesn't play in VLC for you. If I open up VLC, and go to File>Open Network Stream, and enter that URL in, it plays perfectly.
We're actually creating this using gSTreamer, and an IMG-tech encoder-specific plugin, so we have xome flexibility in how we create the file. Here are two more datapoints:
1) We have tried using the x264enc plugin, which uses the x264 H.264 encoding library to encode the video, and the same flvmux FLV muxer to create the FLV, and it plays perfectly in flash.
2) We have tried muxing it into an MP4 instead of an FLV, and it still does not play in flash.
Either way it's looking like the codec itself, we just can't tell why.
>>An option is to export to a very common format (H.264/MP4 with a .mp4 extension for lossy encoding) and then convert it to a FLV. If you have a lot of extra storage, the best practice is to export to a lossless codec (AVI Uncompressed, MOV with "None" compression, HuffyYUV, Bitjazz Sheer Video, Quicktime Animation codec with Millions+ and Best Quality, etc). Then take that file and compress it into a FLV properly.
Thanks for this suggestion, btw, but our application requires real-time encoding, and we don't have time to go back and compress. That's why we're trying to use this hardware encoder.
I can play it in VLC, VLC can play like just about anything.. I'm pretty sure you can feed it a hamburget and video would come out. That's why I said I COULD play it with VLC when I said:
In fact the only app I can load it into, which is the universal "nothing else plays this" app, is VLC player
Aside that, are you trying to play this with FLVPlayback? If so then just as the name describes, you can't play MP4s with "FLV"Playback. You will need to utilize the NetStream class and make a player to play MP4 files. I'd highly recommend you do just that, not use FLVPlayback (or FLV itself) and use MP4 if you can. x264 MP4 encoding is my go-to encoding container and codec.
Here's an extensive Adobe article on using the NetStream to play a H264 MP4 video:
You said MP4 and FLV, these don't mix.. FLV is a very old format. It supports codecs like Sorenson Spark, On2VP6 Pro, etc. MP4? That's not supported.
I personally would never use flv over f4v, but its possible to use H.264 & flv.
Mac Users use the standard H.264 codec, output to mov and simply rename the extension to flv, and it plays perfectly fine inside Flash.
The reason while Adobe prefers the combination of fv4/h.264 and flv/h.263 is a different one.
Details about the History of flv here
@clark_matt: It really comes down to the formats the board can handle. All boards of course support MPEG2 but I'm not sure I've used pro-grade enough boards that can compress to a FLV container. It's not the codec that's in question so much here. Almost all modern boards will encode to H.264 codec and most will contain in MP4, but I'm not sure how many can wrap that into a FLV container.
It may come down to a Flash Media Server (or any other RTMP server). Here's some information (look at the supported formats PDF also) on FMS dynamic (live) streaming:
Sorry for being unclear. The hardware encoder is only handling the h.264,
and then it is using gStreamer's flvmux plugin to wrap in FLV in software
We tried the same thing using an mp4 container, with similar result. When
we try to play that, it just doesn't start.
My gut feel is still that it's in the codec. Is there any good h264 test
Sent from my iPhone
Thanks Mocca. Yes, we have another process that produces software-encoded
FLV/h264, and that plays very reliably in Flash. That's why I'm leaning
towards this being a codec problem, and not a container problem.
Sent from my iPhone
Can you explain the nature of what you're trying to stream? Something recorded locally live off a device (camera) or a stream you're receiving that you're rebroadcasting, etc? I haven't used gStreamer but I've used FMS quite a bit with Open Broadcaster which is very good at sending a reliable live stream from a multitude of sources.
Sure. We're reading in from a camera directly attached to the unit, and
the end goal is to record it into an archive as an h264 video wrapped in
some container which can eventually be played through a flash player.
Think video surveillance system with an archive of old video. gStreamer
is just a plugin-based system that assembles video pipelines. We've
configured our pipeline to read YUV from the camera, hand off to the
encoder, received h264 back from the encoder, mux it into an FLV (or MP4),
and save it to disk. When we use the HW encoder the video won't play.
When we pull out the plugin responsible for invoking the hardware encoder
and replace it with a software encoder using libx264 (which is very
CPU-intensive), the resulting video plays fine in flash.
I very highly recommend Open Broadcaster software because it's simple and free. It allows you to set up videos in layers and record/save locally and/or stream live at the same time. You can take those videos and just run them through the encoder which is clearly working fine with x264/mp4. It supports video capture devices and will probably list both your video capture board and your webcam as sources. You can arrange unlimited layers of all sorts of overlays and save the stream, or pass to a live encoder, or broadcast directly from the software itself. I use this as a gamer myself. I broadcast games with tons of overlays (logos, webcam, other video streams, graphics, screen regions on other monitors, etc etc) live on certain sites.
I do have a decent gaming rig with an Intel i7-980x running water cooled at 5GHz with 32GB at 1333 (had to downclock FSB divisor to hit 5GHz) and save to a SSD RAID1+0 (10) with a Radeon HD7970. It does take serious CPU to pull this off with decent results. I'm also on a Verizon FIOS 50Mbit up/down line.