Audio/Video encode & decoding

I am very new to mac environment,
and have a background as a linux developer. I worked mostly with avcodec and avformat api's (from ffmpeg project) to manipulate media. I could reach media devices/streams using oss, alsa, v4l or v4l2 interfaces/drivers and encode/decode them with avcodec API. Now I switched to mac and I want to get audio/video frames from input devices and encode/decode them as I want. I already took a look at QTkit and QT related topics but there is no codec variation and also no control of frames which has taken from input device/file. There is no flexibilty with almost just one way to encode media (h264 and AAC, with predefined bitrates). I am using snow leopard with Xcode 4 so AVfoundations is avaliable just for IOS env. and not for Mac environment.
I can not find any detailed media encoding/decoding document or usable(flexible) framework in mac developer central. Please help me to find or give me some advice about mac environment.
Thanks in advance .

First of all thank you xnav. But I already searched for AVFoundations and related sample sources. I do not want to change my operating system and I do not want to believe that MacOS has not got a framework embracing the media related functions at all before Lion. As I mentioned in the text above I am using snow leopard.
By the way I want to reach full control over media streams/frames and codec parameters. I want to be able to decode media stream/frame if it is encoded (for example: a web cam streaming jpeg captures using hw codec) I want to decode and resize it, maybe view it in a frame and encode it again and store it in a file or directly stream over rtsp. Is it possible ? Does't Apple have such a framework which I can find in open source environment easily (for example: ffmpeg - avcodec - avformat - avdevice). Device/driver level tools and codecs can be inside different frameworks but there must be some tools for it.

Similar Messages

  • Why wont my audio/video transitions render in media encoder

    when im rendering a project from PP in media encoder the audio/video transitions i added to my project dont show up in the rendered version of the video (the affter affects compositions i added show up though) but when i open the project back up in PP there they are. am i just not applying them correctly, or is there an extra step to link them to the clips or something. im still new to the software so you'll probably have to explain this to me in very basic terms. thanks

    I don't use Photoshop for video so am having to guess here, but you say H.264 but not what preset you are using. In PremPro there are something like a 100 prest options for H.264  Try something like Vimeo HD 1080p 29.97, but instead of exporting the entire video, drag the markers under the video preview window, to contain just enough to see if it is working.  That will save you a heap of time.     Can you select VBR 2 pass from the Citrate settings in media encoder?  The Vimeo setting of 5Mbs for the target bitrate should easily give you nice transitions, but you can up that if you like, at the expense of file size.

  • Flash 8 Video Encoder, audio/video discrepancy from mpeg

    Two questions...
    First, more urgently, I've been given an origianl
    720xsomething mpeg format video, and I'm trying to bring it over to
    flash... I use the flash 8 video encoder, which does a phenomenal
    job of keeping video quality while vastly reducing file size, but
    in this case, (unlike some others in the past) I'm getting a
    bizarre discrepancy between the speed of audio vs. speed of
    video... I can't find a way to force the mpeg (or flash encoder
    software) to TELL me what the frame rate of the original mpeg is,
    and even when i attempt to force it to 24 or 25 during conversion
    to flv, it doesn't seem to bother matching it up to the audio...
    when i take the result and export it from flash, i'll try, at 24
    the video is going too fast for audio, but at 23 its going too
    slow...
    and this SEEMs related to 2nd question.. I took about 15
    solid minutes of video of a particularly nice sunset in
    progression, with the hopes of compressing it down to about 30-60
    seconds for effect... but it seemed like, no matter what frame rate
    I tried to compress it to with the encoder, it just drew each frame
    out to a set length, and even if i tried to export the flash really
    fast, it remained at the epicly slow frame rate...
    is there a relation? what am I doing wrong?
    is there a way to detect the ACTUAL frame rate of the
    original mpeg... is there a way to force the audio and video to
    remained sync'd up? Seems the that problem is, if i go with the
    default 'Same as source' I'm left to guess what that might be when
    exporting from flash, as nothing ever actually tells me what that
    source frame rate actually was! Is there some natural audio
    compression business inside mpeg video that works fine for mpeg
    video, but the flash encoder can't handle well? I've tried it with
    about a billion different frame rate, audio data rate, quality, and
    export settings, and have yet to get a sync.
    Thanks in advance!

    I should have been more clear.
    I changed the file name from .vob to .mpg and then tried to
    add the video file to Flash 8 Video Encoder and received the
    following error message:
    "You won't be able to encode this file. Your computer doesn't
    have the necessary codec or the file is corrupt."
    Currently,
    I use ffmpegx to convert the .vob to .dv and then, I import
    the .dv into Flash 8 Video Encoder and convert it to a .flv....
    I can use ffmpegx to go straight to a .flv, but the file size
    is larger b/c the compression is different, not On2 VP6...
    I would like to skip the middle step because my files are
    very large and it takes extra time.

  • FLAC or ape spi encode/decode working with audio system?

    Has anybody got a flac or monkey's audio spi actually working? I seem to be having problems when I try to getAudioInputStream (works for mp3) and I can't seem to find any examples on how to set it up so that I can encode from PCM to ape or flac.

    OK, after much thrashing around it looks like I found a project that does most of what I need. That is cut the files up the way I want to and the ability to simultaneously create different encodings based from the input file. The project is called xuggle. http://www.xuggle.com/ It's reasonably well documented. It uses ffmpeg to do audio and video encoding in a standard manner. It is written in C++. I am assuming it will be faster. It appears to be better documented than the other plugins for the SPI.
    Here is a big issue. ffmpeg does not support encoding of monkey's audio, which is a requirement for me, and the java flac implementation SPI does not support flac encoding. My current approach is to exec the encoding of monkey's audio from a command line executable ( like the subsonic project currently does), and use xuggle for everything else.
    If anybody has any opinions or suggestions please comment

  • HTML5 video encoding

    What are people using to encode video for HTML5? The players I have looked at want .mp4, .ogg, and .webm. Media Encoder (At least the CS5 version) doesn't do the last 2. I tried the Miro encoder, but that has no controls, and has quality issues. I'm looking for a professional solution (hopefully not crazy expensive) for OSX.

    heres some info re: html5 and video and various mobile devices and also browsers.. there's 2 different pastes ..first is from a doc file I have ..then theres a txt file....the info is about 9 months or a year old ...
    plenty of links in articles to follow thru
    =====
    This is all done without JavaScript and requires only two video encodes, one Ogg file, and one MP4 file. Instructions on how to convert your videos to these formats are provided further down this article.
    It’s compatible with HTML 4, HTML5 (valid markup), XHTML 1 and additionally also works when served as application/xhtml+xml.
    For a full browser compatibility list, see the Video for Everybody Test Page.
    The Code
    Here follows the full source code. It’s very large because it’s fully commented.
    You can easily compact this down (one such example follows afterwards).
    To save time you could use the Video for Everybody generator by Jonathan Neal to generate the code snippet according to your options.
    Do not miss the important notes below or you will be kicking yourself after wasting hours trying to get it to work.
    <!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise       -->
    <!-- warning: playback does not work on iPad/iPhone if you include the poster attribute! fixed in iOS4.0                 -->
    <video width="640" height="360" controls>
            <!-- MP4 must be first for iPad! -->
            <source src="__VIDEO__.MP4" type="video/mp4" /><!-- WebKit video    -->
            <source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera -->
            <!-- fallback to Flash: -->
            <object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
                   <!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
                   <param name="movie" value="__FLASH__.SWF" />
                   <param name="flashvars" value="controlbar=over&amp;image=__POSTER__.JPG&amp;file=__VIDEO__.MP4" />
                   <!-- fallback image. note the title field below, put the title of the video there -->
                   <img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
                        title="No video playback capabilities, please download the video below" />
            </object>
    </video>
    <!-- you *must* offer a download link as they may be able to play the file locally. customise this bit all you want -->
    <p>     <strong>Download Video:</strong>
            Closed Format: <a href="__VIDEO__.MP4">"MP4"</a>
            Open Format:   <a href="__VIDEO__.OGV">"Ogg"</a>
    </p>
    (If you would like your video to automatically start playing, check out the sample code on the test page.)
    Here’s a compacted version as an example:
    <video width="640" height="360" controls>
            <source src="__VIDEO__.MP4"  type="video/mp4" />
            <source src="__VIDEO__.OGV"  type="video/ogg" />
            <object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
                   <param name="movie" value="__FLASH__.SWF" />
                   <param name="flashvars" value="controlbar=over&amp;image=__POSTER__.JPG&amp;file=__VIDEO__.MP4" />
                   <img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
                        title="No video playback capabilities, please download the video below" />
            </object>
    </video>
    <p>     <strong>Download Video:</strong>
            Closed Format: <a href="__VIDEO__.MP4">"MP4"</a>
            Open Format:   <a href="__VIDEO__.OGV">"Ogg"</a>
    </p>
    And one that auto plays: (notice the changes “autoplay” and “autostart=true”)
    <video width="640" height="360" controls autoplay>
            <source src="__VIDEO__.MP4"  type="video/mp4" />
            <source src="__VIDEO__.OGV"  type="video/ogg" />
            <object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
                   <param name="movie" value="__FLASH__.SWF" />
                   <param name="flashvars" value="autostart=true&amp;controlbar=over&amp;image=__POSTER__.JPG&amp;file=__VIDEO__.MP4" />
                   <img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
                        title="No video playback capabilities, please download the video below" />
            </object>
    </video>
    <p>     <strong>Download Video:</strong>
            Closed Format: <a href="__VIDEO__.MP4">"MP4"</a>
            Open Format:   <a href="__VIDEO__.OGV">"Ogg"</a>
    </p>
    It’s advised you subscribe to the RSS to be kept informed of new releases in case you get caught out by new bugs introduced by vendors *cough*Apple*cough*. The version isn’t <1 for no reason.
    IMPORTANT Notes
    Ensure your server is using the correct mime-types. Firefox will not play the Ogg video if the mime-type is wrong. Place these lines in your .htaccess file to send the correct mime-types to browsers
    Replace __VIDEO__.MP4 with the path to your video encoded to MP4 (a warning on using H.264) and
    replace __VIDEO__.OGV with the path to your video encoded to Ogg.
    Optionally you could also include a WebM video.
    Replace __POSTER__.JPG with the path to an image you want to act as a title screen to the video, it will be shown before the video plays, and as a representative image when the video is unable to play (Also replace “__TITLE__” for the poster image’s alt text). Not all browsers support the poster attribute, it’s advisable to encode the poster image into the first frame of your video.
    2.           AddType video/ogg  .ogv
    3.           AddType video/mp4  .mp4
    AddType video/webm .webm
    DO NOT INCLUDE THE poster ATTRIBUTE (<video poster="…">) FOR iOS 3.x SUPPORT. There is a major bug with iOS 3 that means that playback will not work on any HTML5 video tag that uses both the poster attribute and <source> elements. This was fixed in iOS 4.0, but of course for now there will still be a large number of OS 3 users. This bug does not affect use of the poster image in the flashvars parameter, which you should retain
    Replace __FLASH__.SWF with the path to the Flash video player you are using. I use JW Player (download and place ‘player.swf’ in the right place), but this could be any Flash resource including YouTube. Sample code for using YouTube can be seen on the Video for Everybody YouTube Test Page
    Safari buffers the video automatically even if autobuffer is absent. This has been fixed in WebKit nightlies with a change to the HTML5 spec; the “preload="none"” attribute on the video element prevents autobuffering. A current bug in WebKit causes Safari to perpetually display “loading” until the play button is clicked
    The iPhone will not autoplay. This is done to save bandwidth which may cost some users.
    It is not a bug, it’s a feature
    HTML5 video on Android is badly broken. Resolution support varies from one handset to the next (often just 480x360), the fallback image usually doesn’t show and the code requires special adjustments. The Android emulator is completely useless as it doesn’t represent any real hardware and does not play HTML5 video. THERE IS NO WAY TO TEST ON ANDROID WITHOUT A PHYSICAL PHONE. BLAME GOOGLE.
    Android 2.3 (Gingerbread) now finally supports the controls attribute, so that VfE can work, but this still leaves all previous Android versions in the lurch. Use MediaElement.js or VideoJS for better Android support.
    Some web hosts, in trying to save bandwidth, gzip everything by default—including video files! In Firefox and Opera, seeking will not be possible or the video may not play at all if a video file is gzipped. If this is occurring to you please check your server / hosts and disable the gzipping of Ogg and other media files. You can switch off gzipping for video files in your .htaccess file by adding this line:
    SetEnvIfNoCase Request_URI \.(og[gv]|mp4|m4v|webm)$ no-gzip dont-vary
    With thanks to Bas van Bergen for this tip
    There are some instances where people will simply not be able to view the video inside the web-page (e.g. Opera Mobile / Mini). It is absolutely essential that you provide download links outside of the video to ensure your message gets through
    A current bug in Firefox means that when JavaScript is disabled (NoScript for example) the video controls do not display. For now, right-click on the video for the controls, use autoplay on your videos or rely on users allowing your site in NoScript
    The Eolas ‘Click to Activate’ issue affects Flash in Internet Explorer 6 / 7 as the ActiveX controls are not inserted using JavaScript—however Microsoft removed ‘Click to Activate’ in a later update patch. This issue will not affect users who have run Windows Update.
    Please also note that Windows XP originally shipped with Flash v6, and H.264 playback in Flash requires v9 or 10. Depending on what Flash video player you use, this may cause problems if you intend to support users with out of date Flash versions
    A parsing bug in Camino 2.0 / Firefox 3.0 means that the image element inside the video element will ‘leak’ outside of the video element. This is not visible however unless some kind of background image or colour is applied to that image element. You can stop this by either wrapping the video element in another element or modifying the code from “<source … />” to “<source …></source>”. This works, but will not validate as HTML5
    In IE9 beta, both the HTML5 video and Flash video underneath play at the same time. This does not occur in IE9 Platform Preview 7, which is newer than IE9 beta. It is assumed that an update to IE9 beta will fix this issue
    Adding Custom Controls
    Since VfE doesn’t come with any JavaScript the HTML5 video will use whatever native interface the browser provides. This is in the best interest of the user because it provides an interface best tailored to that device. For example, the iPhone always plays video fullscreen so that the edges of the video are not cut off in the browser and the user does not have to pan around to get it all in view. The iPad provides finger-friendly sized controls.
    Different native video controls in Opera 10.5 and Google Chrome
    Designers however don’t like the inconsistency and would like a unified set of controls. Both MediaElement.js and VideoJS use VfE and custom controls you can style how you please with CSS.
    Encoding the Videos
    Full instructions are beyond the scope of this article, please refer to Mark Pilgrim’s Video on the Web article for an excellent introduction to video formats and encoding instructions.
    There is no restriction on the resolution of the Ogg video
    The iPhone can play MOV and MPEG4 videos with a maximum size of 640x480 and only allows the Base Profile for H.264 (See Apple’s own instructions for the specifics). If your desired video is bigger than that, please read the instructions below for how to adjust the code to use hi-res videos whilst keeping iPhone compatibility
    The iPad can play H.264 up to 720p, 30 FPS
    Firefox will only play Ogg (WebM is also supported in Firefox 4), and it will not degrade to Flash if there is no Firefox-compatible video file
    For best results I recommend including the poster image as the first frame when you encode the video
    Using HD Video
    If you would like to use a larger video than 640x480, you can use a QuickTime reference movie to auto-select between an iPhone compatible version and the full-size video. In QuickTime Pro use the ‘File » Export for Web…’ option to output a reference movie (you can also use Apple’s MakeRefMovie tool for finer control). You’ll have three files along these lines: “video.mov”, “video-desktop.mp4” (or m4v) and “video-iphone.mp4”. Now replace the two source elements in the code with these three: (substituting the right file paths)
    <source src="video.mov" type="video/mp4"></source>
    <source src="video-desktop.mp4" type="video/mp4"></source>
    <source src="video.ogv" type="video/ogg"></source>
    What happens here is that the browser will play the QuickTime reference movie (Safari / iPhone / iPad) which will auto-select between the desktop and iPhone versions of the video automatically. If the MOV format isn’t supported by the browser (Chrome for example), we point to the same MPEG4 video that the QuickTime reference movie uses.
    A Warning About H.264
    I made Video for Everybody because since I don’t have Flash installed I wanted to create a way websites could provide me access to their videos (currently needlessly trapped inside Flash) without having to lose viewers from older browsers. VfE is not a tool I would use myself (other videos on this site are HTML5/Ogg only) because of the threat that H.264 represents to freedom on the web. Websites that are already serving H.264 video to users using Flash have already made the conscious decision to buy into H.264. I am not making that decision for you with Video for Everybody.
    Just be aware that if you decide to use H.264 video for commercial use then you will need to purchase a licence from the MPEG-LA. Be warned that ‘commercial use’ may also include the scenario where your website has advertisements, even though your use of video is unrelated to those adverts. If you are making any any money in any way from a page that also includes an H.264 video, then you should contact the MPEG-LA for help on licencing.
    On the 27th of August 2010, the MPEG-LA announced (arguably in response to growing WebM support) that the terms of “free use” of H.264 Internet broadcast would not change in 2016. This does not change a thing.
    This is similar to Nikon announcing that they will not charge you if you put your pictures up on Flickr, or HP promising that they will never charge you additionally if you photocopy something that you printed on a LaserJet.
    Mike Shaver
    Using WebM Video
    On the 19th of May 2010 Google released the VP8 codec as open-source and royalty free with the full intent to drive broad adoption via industry backing and switching YouTube over to the new format in the long term. “WebM” is a rebranded Matroska container utilising VP8 video and Vorbis audio.
    This represents major competition to H.264—Mozilla, Google and Opera have already added support into special builds of their browsers and even Microsoft have about-faced on their H.264-only policy and said that IE9 will support WebM—but only if the codec has been installed by the user. Obviously absent from any support is Apple, and this means that unfortunately codec-fragmentation will continue into the foreseeable future so that you will still need to provide more than one video encode.
    Adding a WebM video to Video for Everybody is easy, just add it to the source list! It has to go below the MP4 video due to an iPad bug that ignores anything but the first source element, and ideally above the Ogg source so that browsers that play both Ogg and WebM choose the WebM video first. Here is an example source stack:
    <source src="video.mp4"  type="video/mp4"  />
    <source src="video.webm" type="video/webm" />
    <source src="video.ogv"  type="video/ogg"  />
    Note the new mime type, which you will have to add to your server.
    At this extremely early stage for WebM I will not provide any help via e-mail on how to encode or use WebM video. If you don’t know how to use it already, it’s not for you—wait until support is added to your favourite tools and more information is readily available. I will update this article as the situation with WebM progresses.
    ================
    mobile device video info
    The options actually match those of the most recent iPod Video, which uses H.264 video, up to 1.5Mbps, 640 x 480 pixels, and 30 frames per second with low-complexity AAC audio up to 160 Kbps, 48kHz stereo audio. On the lower end, bandwidths up to 768Kbps, 320 x 240 pixels, and 30 frames per second are also used, known as Baseline Profile up to Level 1.3. Both options can be output with .m4v, .mp4, or .mov extensions.
    iTunes. The simplest way is to use iTunes built-in converter. Apple makes it fairly simple to convert videos to play on the Apple TV or iPod, which are also conversions that can be used on the iPhone. Any video that can play in iTunes, then, can be converted to play on the iPhone, and local files can also be synced directly to the iPhone via iTunes sync conduit, making for a fairly easy process. Two downsides: first, iTunes uses a "lowest common denominator" approach, meaning that there are no customized options for encoding into H.264. Also, some users have reported a bug in the most recent version of iTunes that creates video files with no audio, so don’t toss your original video clips until you’ve had a chance to test out the new H.264-compressed video clips.
    Handbrake. Handbrake is the next most-popular encoding tool for both Windows and Macintosh platforms, and it’s available in a command-line version for Linux. Handbrake does a lot more than just H.264 conversions, but for purposes of this article, Handbrake would be used to transcode an MPEG-2 transport stream or other non-H.264 formats and codecs into H.264 video files. Speed on the product is quite good, and it has the option of a single-profile conversion (like iTunes) or the ability to customize encoding or profiles and then save the tweaks for future encodings. Handbrake has made a name for itself in DVD-to-iPod conversion, so the extension of Handbrake to the iPhone is one that many users trust.
    On any of the last three products, the H.264 files output from these products can be added to the iTunes library for uploading to the iPhone. For those choosing to put their iPhone-compliant videos on the web, it’s also helpful to choose hinted streaming to allow the videos to begin playing immediately rather than waiting for the entire cache to fill.
    http://www.webmonkey.com/2010/05/embed-videos-in-your-web-pages-using-html5/
    So, you want in on the fun? Do you want to use some HTML5 video tags on your site right now? No problem. Fasten your seat belts, as we’re about to take a tour of the wonderful world of HTML5 video.
    Browser Support for HTML5
    First, let’s deal with some very basic stuff, like where this will work and where it won’t. As you can see in the table below, only the latest versions of most browsers support native video playback using HTML5’s <video> tag.
    HTML5 <video> support by browser: Fx 3.0     Fx 3.5     IE7     IE8     IE9     Safari 3     Safari 4     Chrome 3+     Opera 10.5
    Since Firefox 3.0 and IE 7 & 8 lack any support for HTML5 video, you’ll have to come up with a fallback plan for serving video to those users. Depending on what you want to do you, could fallback first to Quicktime and then, failing that, to Flash. That’s the strategy used in Video for Everyone (note that as of v0.4, Video for everyone no longer falls back to QuickTime).
    To keep things simple we’re just going to fall straight from HTML5 to Flash.
    Formats, Codecs and Technicalities
    The next thing you need to understand is what is actually happening when you load and play a video file in your web browser. You’re probably used to thinking of video as .mp4 or .mov files, but unfortunately it’s not that simple. The actual file formats are just containers. Think of them as a bit like a .zip file — they hold other stuff inside.
    Each container holds at minimum one video track and, most likely, one audio track. When you watch a movie online, your video player (most likely Flash) decodes both the audio and video and sends the information to your screen and speakers.
    Why does this matter? Well, because the process of decoding what’s inside the video container file varies. To know how to decode a movie, the player (which is your web browser in the case of HTML5 video) has to know which codec the movie was encoded with.
    When it comes to web video there are two codecs to worry about: H.264 and Theora.
    There’s a huge debate right now among web developers, browser makers and just about everyone else as to which codec is right for the web. We believe that a free, open codec without patent and licensing restrictions is the best solution for the web. Sadly, neither codec exactly fulfills that dream, so for now, let’s just skip the whole argument and be practical — we’re going to use both codecs.
    Why? Well, have a look at the table below, which shows which codecs work where and you’ll quickly see that there is no one-size-fits-all-browsers solution. Only Google Chrome can play both H.264 and Theora.
    Codec support by browser/platform:     Firefox     Opera     Chrome     Safari     IE 9     iPhone     Android
    Ogg Theora    
    H.264    
    So, you may be thinking … if HTML5 video doesn’t work in IE7 or IE8 and it means I’m going to have to encode my videos twice, then why bother at all? Well, the best answer is simple: mobile users. If you want iPhone and Android users to be able to see your video, HTML5 is the only way to do it — Flash support is coming to Android sooner or later but for now HTML5 is the only option, and we all know Flash doesn’t run on the iPhone or the iPad.
    The HTML5 Code
    Here’s how to actually embed your videos. First, we encode video in both .ogv and .mp4 containers. Encoding video is beyond the scope of this article, so instead we suggest you check out Mark Pilgrim’s online book Dive Into HTML5, which has a whole chapter devoted to understanding video encoding. Pilgrim’s encoding suggestions use free software to get the job done, and in the end you’ll have two files — one .mp4 and one .ogv.
    Now it’s time to unleash those movies in pure HTML glory. Here’s the code:
    view source
    print?
    1    <video width="560" height="340" controls>
    2      <source src="path/to/myvideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
    3    <source src="path/to/myvideo.ogv" type='video/ogg; codecs="theora, vorbis"'>
    4    </video>
    Yes, that’s it. What we’ve done here is use the <video> tag to specify the dimensions of our video, and to denote that we want to use the browser’s default controls. Then, within the video tag, we’ve added two <source> elements which link to our video files.
    The “type” attribute of the <source> tag helps the browser understand which file it should load. It’s a bit of an ugly chunk of code that needs to specify the container format, the video codec and the audio codec.
    In this case we’ve assumed standard .ogv and baseline encoded H.264 video as per Pilgrim’s tutorial. See the WHATWG wiki for more information on which video types you can specify.
    And there you have it — native web video, no plugins required.
    Dealing With Everyone Else
    What about IE7, IE8 and older versions of just about any other browser? Well, for those users, we’ll fall back on Flash. To do that, we just use an <embed> tag within our video tag:
    view source
    print?
    1    <video width="560" height="340" controls>
    2      <source src="path/to/myvideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
    3    <source src="path/to/myvideo.ogv" type='video/ogg; codecs="theora, vorbis"'>
    4      <object width="640" height="384" type="application/x-shockwave-flash"
    5            data="path/to/swf/player.swf?image=placeholder.jpg&file=path/to/myvideo.mp4">
    6            <param name="movie" value="path/to/swf/player.swf?image=placeholder.jpg&file=path/to/myvideo.mp4" />
    7        </object>
    8    </video>
    Now any browser that doesn’t understand the HTML5 video tag will just continue on its way until it hits the object tag, which it should understand (note that the order, mp4 before ogv, is important for iPad support — Apple requires that mp4 be the first video file).
    Of course for this to work you need a Flash video container. JW Player is one popular example, or you can roll your own using Adobe’s tools. Also remember that we still haven’t handled the case of an older version of Firefox with no Flash plugin installed (maybe your users are surfing your tubes with an outdated Linux machine). You can always add good old text-based links to the video files as a catch-all fix for anyone who can’t, for whatever reason, see either the HTML5 or Flash versions.
    Conclusion
    Embedding HTML5 video isn’t significantly more difficult than using Flash, especially if you’ve been using H.264 video files in your Flash player — which is exactly what YouTube has done with its HTML5 beta.
    While we’re concerned about the licensing and patent requirements of H.264, it isn’t hard to notice that if you skip Theora and make all non-H.264 fall back to Flash, you’ve still saved yourself a considerable encoding headache. In fact, that’s probably the best practical argument against Mozilla and Opera’s refusal to support H.264.
    If you’d like to use some of the more advanced aspects of HTML5 video, be sure to check the SublimeVideo player, which offers very nice JavaScript-powered set of custom controls. Also be sure to have a look at Video for Everybody, which makes for more complex code but handles just about every use case you could imagine. And there’s a handy Video for Everybody WordPress plugin as well.
    http://camendesign.com/code/video_for_everybody
    good luck

  • IDVD 08 audio/video sync drift toward end of DVD movie - fix/workaround?

    Anyone know how I can fix this issue? It's driving me crazy.
    I've just spent a few evenings in iMovie 08, editing together the video of my son's birth. All looked & amazingly good in iMovie. The "Large" .m4v file output by iMovie - Shared with the Media Browser - plays perfectly in Quicktime too.
    However, after adding that shared movie to iDVD 08, and burning a DVD, I noticed that the audio sync drifts toward the end of the Movie when plated back. At the start of the DVD all seems well, but by the end of the ~1hr 20 minute movie the audio is unbearably out of sync with the video. Completely unwatchable.
    After a little Googling I came across some reports that iDVD might not deal well with video that's been recorded with 12-bit audio. I've confirmed that my camcorder is (was!) set to 12-bit rather than 16-bit (the default, I'm sure). So if that's the problem I'm hosed... it's not like I can get a retake on that footage
    Is there a reasonable workaround for this issue? I'm obviously unable to re-take the video (or the other 10 hours of DV video tape I've yet to use in an iMovie project). Ideally I'd like Apple to release a patch for this. Shouldn't it be possible for iDVD to account for audio that was originally recorded in 12-bit... even if it's just a checkbox you have to select to tip it off?
    Then again, perhaps this is totally unrelated to the 12-bit issue, and this is just a run of the mill bug?
    As I said... iMovie generates a MPEG4 video file of the Movie that looks/sounds perfect, so it seems this sync issue's being created somewhere in iDVD as it's rendering the audio/video to burn to the DVD...
    Thanks in advance.

    I've tried most of the options I can think of, and the audio sync drift issue continues on this ~1hr 12 minute iMovie/iDVD 08 project.
    A couple of promising ideas tried used QT Pro, to export the audio track from the iMovie generated MPEG-4 file - as a WAV file, resampling to 48kHz and 16-bit... then Adding this back to the video track in the MPEG-4 file (having deleted the original audio track). In another test I also tried the Add to Selection and Scale option. Oddly enough I think the Add to Selection and Scale attempt generated more sync issues than before in the final DVD movie... so I stuck with the MPEG-4 file containing the video track and the added, resampled at 48kHz & 16 bit, WAV audio track.
    This was saved as a self contained Movie file, producing a QT .mov file. I moved this .mov file into the iDVD projects directory structure so that it was avalable in iDVD's Media Browser. I then reworked the iDVD project to use this QT large.mov file, instead of the original iMovie large.m4v file.
    As a reminder... the original large.m4v file has the following properties:
    29.97 FPS H.264 Decoder, 960 x 540, Millions
    AAC, Stereo (L R), 44.100 kHz
    0:01:12:07.16 duration
    The resampled and saved QT MOV file has the following properties:
    29.97 FPS H.264 Decoder, 960 x 540, Millions
    16-bit Integer (Little Endian), Stereo, 48.000 kHz
    0:01:12:07.16 duration
    BOTH versions of this Movie file play flawlessly within QT Pro... there's no audio sync drift evident toward the end of the movie unless I use iDVD 08 to burn either movie file to a Physical DVD (or DVD Disk Image). In both cases the resultant DVD Movie exhibits significant audio sync drift as the ~1hr 12 minute movie progresses. The sync goes out by ~ <= 1 second based on a rough visual assessment.
    I've not yet tried to burn either the original iMovie produced MPEG-4 video file or my QT Pro tweaked audio track .MOV file version to a DVD on my PC...
    ... But I have used an application called Burn (referenced in this earlier/archived iDVD sync drift forum post: http://discussions.apple.com/thread.jspa?threadID=1332100 by user F Shippey - http://burn-osx.sourceforge.net/) to take the QT Pro tweaked .mov file version of the original MPEG-4 file and burn it to a DVD...
    Results:
    The Burn app burnt DVD plays with NO audio sync issues!... Even though it was generated from the same audio tweaked (48kHz/16-bit resampled) QT Pro .mov file.
    However, whenever I burn a DVD using iDVD 08 the audio sync gradually drifts. It matters not whether I use the original iMovie 08 generated MPEG-4 movie file, or the QT Pro version of that file with the resampled audio track (the same one that works fine with Burn).
    It sure looks to me like iDVD has a problem... Again, refer to http://discussions.apple.com/thread.jspa?threadID=1332100 for someone else who seems to have run into similar challenges.
    Am I overlooking something?
    Thanks in advance.

  • Interesting performance anomaly during video encode

    I just noticed an interesting anomaly while my iDVD6 project was encoding video. I found that if I cover up the 'Creating Your DVD' progress bar and preview window with a Finder window, that video encoding seems to move a whole lot faster. I could tell by listening to the disk activity which seemed to be occurring about twice as fast. When I moved the Finder window away and exposed progress bar/preview window, then disk activity slowed down.
    I opened Activity Monitor and looked at CPU% which showed about 70-80% with progress bar/preview window exposed. After covering up, the CPU% increased from 125-150% So apparently exposing progress bar/preview window slows things down quite a bit during video encode. I tried same trick during audio encode, and it made no difference. CPU% was about 7-8% during audio encode.
    I was wondering if anyone in this discussion group noticed this performance anomaly previously.
    Paul

    Hi Paul
    Yes I noted some relatively related phenomena during the rendering process
    in FinalCutExpress that just selecting Finder seemed to speed things up.
    Second: Please don't rely on the Activity monitor and most so when it says
    iDVD doesn't answer. It's just rubisch. iDVD keeps on working - just wait and see.
    Yours Bengt W

  • How video encoder continunously

    Hello everyone!
    I have a ADSP BF533 EZ kit lite and labview embedded for blackfin 2.5 module. I would connect Analog video input(composite video) and capture video frame then display on the my car GPS navigation with A/V input by running Videoecho example.
    I was successful to build this example  and i can see video displaying on the navigation. But something i would know more:
     1. the video displayed is not continunously. I can see when i reduce the time delay for display it can change displaying faster. but it alway dispeared a blank frame before starting new frame.
    2. I am thinking that mean when Video Encoder actived, Video decoder was not actived? Am i right?. I want to display continunously the video. how i can do?
    3. Could i add any image processing algorithm in catched frame buffer then redisplay on the display?.
    Here is code for pepople viewing.
    Thank you so much for attention and please post your idea if it is possible!
    Do Van Lam!
    Attachments:
    VideoGlobal.vi ‏5 KB
    VideoEcho.vi ‏55 KB
    VideoCallback.vi ‏6 KB

    Hello !
    It is me again!
    I would like to ask anybody that can i use BF_VideoEcoder(decoder)_enable(disable) for ADSP BF537 EZ kit lite. And can i config PPI0 for decoder and PPI1 for Encoder by using AV EZ extender board? beacause ADSP BF533 has only one PPI so that is might be the reason in my above post.
    I have ever test with VideoEcho example for ADSP BF537 EZ kit lite by creating new project and config hardware for BF537 EZ kit lite and copy code to new VI and modify LED on/off control VIs for BF537. but te video out but dit not apeared.
    Could anybody help me to solve this problem?
    Thank you very much!

  • Buffering pauses and audio/video out of sync, single RTMP stream w/ simple embed

    Hello,
    I am running Flash Media Server on my dedicated CentOS host, and finally connected a single RTMP stream fine and am able to embed and play back the stream, but I am getting constant buffering pauses (approx every 5 secs) and audio/video out of sync by at least 5 seconds. My CPU with Flash Live Encoder is a powerhorse, never over 25% processor or ram usage while streaming, and my upload internet speed is averaging 6-8 mbps which should be more than adequate. I fear the issue is server side, however port 1935 is open and in use, not firewalled on CPU nor the host.
    Any suggestions would be great.

    Hello,
    Thanks for the reply, I am using embed code generated with Flash Media Playback, as follows:
    <object width="640" height="480"> <param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf"></param><param name="flashvars" value="src=rtmpt%3A%2F%2F50.62.40.55%3A1935%2Flive%2Fchristmastime&poster=http%3A%2F%2Fsq uarestream.ca%2Fpics%2Fframe.jpg&autoPlay=true&streamType=live&optimizeInitialIndex=false" ></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="480" flashvars="src=rtmpt%3A%2F%2F50.62.40.55%3A1935%2Flive%2Fchristmastime&poster=http%3A%2F% 2Fsquarestream.ca%2Fpics%2Fframe.jpg&autoPlay=true&streamType=live&optimizeInitialIndex=fa lse"></embed></object>

  • Flash video encoder slow

    I'm trying to convert a 4.5 minute *.avi to *.flv and am
    having some difficulty. Flash Video Encoder says I have about 15.5
    hours remaining (am 0.5 hours into the process). That seems wholly
    unreasonable given the fact that it took me all of maybe 5 minutes
    to save it as an XviD-encoded *.avi with VirtualDub...
    Any ideas as to how I can speed this up?

    I'm having a similar problem - but my issue has to do with
    why the time to encode on my Mac Pro is slower than on my
    associate's Power Mac G5.
    I'm using the Flash 8 Video Encoder to convert .mov files to
    flv files on a group license. On my station I have the following:
    Hardware Overview:
    Model Name: Mac Pro
    Model Identifier: MacPro1,1
    Processor Name: Dual-Core Intel Xeon
    Processor Speed: 2.66 GHz
    Number Of Processors: 2
    Total Number Of Cores: 4
    L2 Cache (per processor): 4 MB
    Memory: 12 GB
    Bus Speed: 1.33 GHz
    Boot ROM Version: MP11.005C.B08
    SMC Version: 1.7f10
    I've got 151 GB available on my system drive.
    Presently, it is taking me approximately 2 hours 45 minutes
    to convert a 6 minute 26 sec mov to a flv with custom settings of:
    Max Date Rate: 300 kbps
    Frame Rate: Same as Source
    Audio Data Rate: 48 kbps (mono)
    500 x 333 pixels.
    HOWEVER, on an associate's computer he is able to convert
    under the same specs, same files, etc. in 1 hour 40 minutes.
    His computer specs are:
    Power Mac G5
    Processor Speed - 2.3 GHz
    2-CPU's
    L2 Cache - 1 mb per CPU
    Memory - 16 GB
    Bus Speed 1.15 GHz
    My computer has much more powerful processor, so we're
    confused why it's taking longer on my computer.
    I also have a second internal drive but presently the
    programs and source file are on my system HD. Someone suggested
    that I should try to make sure that the Video Encoder has max RAM
    allocated to it as well as having the scratch disk and cache set to
    the second internal drive. I don't know how to do this or even if
    it's possible but looking for advice and suggestions on how to
    better optimize the Video Encoder and would appreciate any help
    with this ASAP.
    Thanks!

  • MPG to FLV prob using Flash video encoder

    I've been using the flash video encoder to convert videos to
    FLV to put on websites.
    Today I converted a MPG file to FLV.
    The original MPG video worked fine, the FLV file played sound
    but no picture....any ideas ?

    Hi,
    I have this problem too - I have converted wma files and mpg4 to flv. The encoder does not error but when I play the FLV there is audio but no picture. I am using Windows XP. Is there a solution to this issue?

  • CS3 Flash Video Encoder no sound

    I have been using the Macromedia Flash FLV encoder for a very
    long time, but now that I have upgraded to the CS3 Flash Video
    Encoder the video gets encoded but the audio is always missing.
    All my settings are the same as they always were and when I
    encode an AVI to FLV the audio is missing. How do I fix
    this?

    I to am having the same problem with the flash encoder. Added
    a wmv file and a mov file to the queue and I get the same results.
    I do however see the first frame of the movies. Cannot set in and
    out points because the first frame displays while scrubbing.
    Model Name: MacBook Pro
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.4 GHz
    Memory: 4 GB
    Adobe suite CS3 - all updated.

  • Best Quicktime settings for Video Encoder?

    This is to reiterate the issue originally posted under
    this
    topic.
    Summary: CS3 encoded FLV (using Quicktime movie as source)
    stops playing halfway through (likely related to the audio)...
    Solution: Set audio of Quicktime movie to 44.100 kHz (not
    22.050) sample rate before encoding to FLV.
    Continued Issue: Is Adobe working on a fix to the Flash
    Video Encoder so that all Quicktime settings are supported?
    Question: Any recommendations for the "best" Quicktime
    video/audio settings (codecs, frame rate, etc.) for FLV encoding to
    optimize quality and minimize file size?

    Voddie,
    I'm definitely no expert; so if others have better info, I
    hope they will post too. And the guidance below is from a Mac
    perspective.
    Using
    Quicktime Pro, you can export each movie and adjust the
    Options. Under the Quicktime Options (see this
    screen
    image
    for the two settings windows that you will access), the Sound
    Options is where you'll set the sample rate to 44.100 kHz, then
    save the file(s).
    If Quicktime Pro is not available, you might look into
    ffmpegX
    as an option (though I have not tried this myself).
    Note: I read that for version MX, it was recommended that the
    Quicktime sound be uncompressed, or encoded using ALaw 2:1 or ADPCM
    codecs. I'm not sure if this is true for CS3. Again, I hope others
    will chime in.
    Patrick

  • No video after Flash 8 Video Encoder

    I have read some other posts and although they are similar,
    none of the solutions posted helps me fix my specific issue.
    Using Flash 8 on Windows XP Pro SP2, I have a MPEG-2 file. I
    can play the MPEG file using Windows Media Player 11 and RealPlayer
    11 but I cannot play it using QuickTime 7.2. When I load the MPEG
    file into Flash 8 Video Encoder (to convert it to a FLV file), it
    doesn't seem to recognize that there is a video portion. It
    recognizes there is an audio portion. By this I mean:
    1. In Flash 8, click on File > Import > Import video...
    2. Browsed to the MPEG file and clicked Next
    3. Selected Progressive download... and clicked Next
    4. In the Encoding screen, the video portion (top right hand
    corner) is just blank.
    In the MPEG files that work, I see the first frame of the
    video. So, Flash 8 Video Encoder does not recognize there is a
    video portion. Also, in Advanced Settings, in the Encodign tab, the
    Encode Video checkbox is grayed out and not selectable. Only the
    Encode Audio is checkable.
    In writing this, I think the problem is my MPEG file. So I'll
    continue to search the net for solutions to this. I just hope
    someone has run into this issue in this forum and provide some
    guidance.
    Thanks.

    SuperConverter is free. Don't pay a cent for it. Are you sure
    you got it from here:
    http://updat3.free.fr/A9A272829C61A6A9D86B50FF/SUPERsetup.exe
    from this site:
    http://www.erightsoft.com/SUPER.html

  • Best Mac for fast video encoding?

    Wondering which Mac may be the best choice for fast (at at least faster) encoding of video files and creation of disc image and then burning a dvd disc. I'm doing home videos with my digital camera, about 50 minutes long.
    On my Dual 1ghz G4 PM, it seems to take forever, maybe 6-8 hours. Anyone know or can quess how long it takes for the new iMac Core 2 duo versus a low end Mac Pro?

    on my antiqué hard/software (450Mega!Hz, 1GB RAM, 10.3.) combo, iDVD encoding needs 8 - 10x of the length of project... (1h project= 8h encoding)
    sooo, to improve speed:
    * make sure, you're within specs of iApps - avoid compressed material, stay with .DV encoded video, .aiff encoded audio, .pic encoded stills...
    * make sure, you have at last 10 - 15GB free on internal drive (ext. doesn't matter for this issue)
    * make sure, all project data are located on internal drive
    * … if not, make sure ext. drive is firewire connected and formatted to "MacOsExtended/hfs"...
    * avoid other CPU/harddrive consuming tasks, as ripping CDs, rendering 4D animations, Spotlight indexing...
    I've seen überMacs, Intel quads/4GBRam, encoding in less then realtime...
    if you don't need fancy iDVD menus, playout movie (=realtime...) to some DVD/Harddrive standalone as from Pioneer (<<link to commercial website!), my 520 does the (hardware accelerated) encoding/burning of 1h video in about 5-10minutes...

Maybe you are looking for

  • Find, mix and have several aperture libraries opened?

    I had a harddisk break, so I am now with a new disk, same machine, but with backup files stored from Apple on my disk. Problem, where to find my old aperture library. I did start at new when I had my new machine this year. January I think. And then I

  • F.05 foreing valuation in SL

    I want to use ts f.05 to revaluate some account, but I need that it post only in a special ledger and not in the general ledger. Anyone knows if is it possible? thanks, Cecilia

  • Flash files displayed in browser before-don't any more

    I have already spent hours trying to figure out what's going on here, and I've searched the forums for an answer. Either I'm not searching for the right words or I'm the only person in the whole world with this problem. I have been inserting simple .

  • Reading/editing/writing midi files

    Hi, does anyone experienced how to read, edit and write midi file back to the JAR file with J2ME /MIDP 2.0? All I can do is playing the file, that's not much and not what I need :-( Thanks

  • Maping and point in Polygon ?

    Hi, I'am searching to deve. an interactive map I java: for example: (in svg) http://www.tsr-rsr.ch/index.html?siteSect=207110&elec=NC I would dev the same but in java. I want to know if there is some tools /library for make this ? (for know if a poin