VideoHelp.com Forum
+ Reply to Thread
Results 1 to 27 of 27
Thread
  1. Member
    Join Date: Sep 2008
    Location: Hungary
    Hi there,

    I'm wondering what is the best tool/software available to encode high quality flv videos for online streaming (like movies on hulu.com just with better picture quality).
    I've been experiencing with Avidemux, Adobe's Mediaencoder, Xvid4PSP but I'm not satisfied with the results. Unfortunately mp4 is not good, I need the videos in flv format.

    If there is any idea on a software that allows me to set passes, crop, resize to custom pixels...etc, please share!

    thx
    elba
    Quote Quote  

  2. Member
    Join Date: Sep 2007
    Location: Canada
    h.264/aac/.mp4 will give you the best quality a given bitrate/filesize

    you can encode in h.264/aac/.mp4, then re-wrap into .flv with ffmpeg

    ffmpeg -i input.mp4 -vcodec copy -acodec copy output.flv

    if you want better picture quality use better settings , and higher bitrate, but filesize will increase

    is there a specific reason you need flv wrapper?
    Quote Quote  

  3. Member
    Join Date: Sep 2008
    Location: Hungary
    Thanks. I'll try to wrap the mp4 to flv as you mentioned.

    We run a VOD site with (with the proper movie rights for VOD distribution) with Microsoft's Streaming Server and DRM...but after a year analyzing the site usage found that users don't want to upgrade their WMP player with the rights management add on and sign in, deal with licenses and so on..and it is really a pain in the neck. So we are negotiating with a company that offers their Adobe streaming server with ad cabalities...(like hulu) to be able to give users free streams...The problem is that if we upload any other format than flv the server will encode it to flv ...(I'm told). That's why we only want to upload the final output in flv container, and don't want the server to encode it. It may sound stupid and comes with more work as the server after uploading the content would encode it anyway...but we just want to be sure, and really offer the best.

    The ideal video bitrate should be around 800kbs, the audio 128, and the file size around 600-800mb, and I'm talking about 90-120 min movies.
    If you have any other thought on it, please let me know.
    Quote Quote  

  4. Member
    Join Date: Sep 2007
    Location: Canada
    Many of the hulu videos are h.264/aac but in .flv . You will have to check with your specific application to see if this format is accepted (i.e. not re-encoded) , the flv wrapper might be enough to "trick" it

    The 2nd best option IMO suitable for streaming is VP7 , you may want to check that out if you can't get h.264/aac in flv working.

    When you say 800kbps video bitrate, what frame size are you using?
    Quote Quote  

  5. Member
    Join Date: Sep 2008
    Location: Hungary
    Well, I'm just told that 800mb would be an optimal rate, and just started to thinking about the whole encoding. What do you suggest?
    Quote Quote  

  6. sorenson sqeeze. it has a preset for faststart 768kbps on2 vb6 pro flv that is good for streaming and almost as compressed as h264.
    Quote Quote  

  7. Member
    Join Date: Sep 2007
    Location: Canada
    I wouldn't pick a set bitrate, unless you have severe limitations. Complex movies (eg action movies with lots of noise & movement) will require a lot more bitrate than simple movies (e.g. smooth cartoons). So you would be "wasting" bandwith (=money) on "simple" movies, but not providing enough on other movies. This isn't a case where 1 shoe fits all IMO, but it depends on your content

    If you decide to use ffmpeg , you should compile and use qt-faststart to re-arrange the moov atom to the beginning (on progressive download, it begins to stream immediately, instead of waiting for complete download). If you use mp4box and .mp4 container, this isn't a problem, because it automatically re-arranges this for you.

    vp6 is ok, but you will get pixellation on complex scenes (bitrate peaks), and right before I-frame scene changes at SD framesizes and your ~800kbps bitrate for an average Hollywood style movie. I personally wouldn't use it, but you can experiment to see what works for you and meets your needs. I would experiment on some short clips at first to see what is compatible with your web application first.
    Quote Quote  

  8. Member lacywest's Avatar
    Join Date: Aug 2001
    Location: California
    Interesting
    Quote Quote  

  9. Member
    Join Date: Sep 2008
    Location: Hungary
    Thanks for the answers. I must admit, that command line encoding is totally new for me. What GUI should I use for ffmpeg?

    The guys from the company that let us use their server also have some ideas. We'll start testing on Wednesdays.
    Quote Quote  

  10. Member ricardouk's Avatar
    Join Date: Mar 2005
    Location: PORTUGAL
    Correct me if im wrong but theres no need to wrap x264/aac in to flv, adobe flash player can decode h264 for a while now and players like:

    JW media player:
    http://www.longtailvideo.com/players/jw-flv-player/

    or

    FlowPlayer:
    http://flowplayer.org/

    support mp4 out of the box. also h264 produces better quality.

    Have a look at this one:
    640x352 with a video bitrate of 450
    http://www.ricardouk.com/2009/03/gur...nity-2008.html

    these are the settings i used to convert the video:
    Code:
    x264 --pass 1 --bitrate 450 --stats "teste.stats" --bframes 1 --subme 1 --analyse none --me dia --progress --no-psnr --filter "0,0" --output NUL "123.avs"
    
    x264 --pass 2 --bitrate 450 --stats "teste.stats" --ref 5 --bframes 1 --subme 6 --analyse p8x8,b8x8,i4x4,p4x4 --progress --no-psnr --filter "0,0" --output "video.mp4" "123.avs"
    then i converted the audio with lamexp and then muxed the audio and video with Yamb.

    Megui and AutoMkv can do all this in "one click".

    if i used the same values with flv i would get a blocky video, that one is not perfect as i didnt spend a lot of time tweaking the settings but its watchable in fullscreen with a bitrate of 450.

    if you still want to use flv i reccomend Avanti as a gui for ffmpeg, theres Winff also but i prefer Avanti.

    Hope it helps
    I love it when a plan comes together!
    Ricardo Santos
    Quote Quote  

  11. Member
    Join Date: Sep 2008
    Location: Hungary
    Thanks. The problem is that the uploaded content must be in flv container. I tried to rewrap an mp4/aac in flv but the audio sample rate was incorrect (ffmpeg)...I'm encoding a new mp4 with 44100 audio and then I'll see if this trick works.

    I'll get access to the admin interface on Wednesday. I don't have information about the player, but I guess it based JW.
    Quote Quote  

  12. Member ricardouk's Avatar
    Join Date: Mar 2005
    Location: PORTUGAL
    If filetypes is a restriction you can use www.blip.tv to store your mp4's, it wont reconvert them and it will provide a individual mp4 link that you can use with teh above 2 players, blip.tv has beebaround for ages, i doubt it will disappear anytime soon
    I love it when a plan comes together!
    Ricardo Santos
    Quote Quote  

  13. Member
    Join Date: Sep 2008
    Location: Hungary
    I encoded an avi file to mp4 with h264/aac with two pass-average bitrate 760kbs settings and 634x356 resize filter.. The mp4's video quality is great.
    I used ffmpeg and the above mentioned line to wrap this mp4 in flv, but the flv plays back choppy and squares in the video are clearly visible even if it is not set to full screen.
    It looks just like the flvs I've been encoding for testing...What did i wrong?
    Quote Quote  

  14. Member
    Join Date: Sep 2008
    Location: Hungary
    We cannot upload movies to just anywhere. These are copyrighted stuff, many of them belongs to Lionsgate, Focus, Miramax..etc. Our contracts are strict about this.
    Quote Quote  

  15. Member
    Join Date: Sep 2007
    Location: Canada
    Originally Posted by elba
    I encoded an avi file to mp4 with h264/aac with two pass-average bitrate 760kbs settings and 634x356 resize filter.. The mp4's video quality is great.
    I used ffmpeg and the above mentioned line to wrap this mp4 in flv, but the flv plays back choppy and squares in the video are clearly visible even if it is not set to full screen.
    It looks just like the flvs I've been encoding for testing...What did i wrong?
    What did you use to encode?

    What are you using for playback testing? Is this local or streaming? PC specs OK?

    You are probably using an old version of ffmpeg to re-wrap. Make sure your ffmpeg version current. Make sure it's not re-encoding - the filesize should only be a few kb different from the container swap. If there was no pixellation before , and now there is I suspect it is re-encoding. You can check mediainfo on the files to find out more. I'm using my own build, but I tested the r16595 build : http://sourceforge.net/project/showf...kage_id=248632 , and there are no playback issues on several players that I tested. As I mentioned earlier use Qt-faststart immediate streaming for placing the moov atom (google on how to do this there are guides).

    You specific player might need you to add VBV (buffer) settings to your encoding process. I'm 100% certain there are no problems using even very high quality settings - much higher than the ones given by ricardouk (high reference frames, b-frames, etc... even without VBV) with .mp4 and jw player based on Adobe Flash. Or, your specific player might not like h.264/aac wrapped in .flv - that would be a big loss for you. You're basically stuck with pixellation at low bitrates if you can't find a way to use h.264.
    Quote Quote  

  16. Member ricardouk's Avatar
    Join Date: Mar 2005
    Location: PORTUGAL
    if you have difficulty to rewrap with ffmpeg syntax try avanti and disable video and audio conversion and select flv or mp4 as a container, but Avanti wont do the "moov atom", youll have to use mp4box or its gui Yamb

    you can use the following script like i use and it will do audio/video conversion as well moving the atoom

    Code:
    "C:\Programas_2\FFMpeg\ffmpeg.exe" -i "C:\Programas_2\FFMpeg\123.avs" -r 25 -vcodec libx264  -aspect 16:9 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 450k -maxrate 450k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 56k -ar 22050 -ac 2 -an -passlogfile "C:\Programas_2\FFMpeg\123.log" -pass 1  -y "NUL.avi"
    
    "C:\Programas_2\FFMpeg\ffmpeg.exe" -y -i "C:\Programas_2\FFMpeg\123.avs" -r 25 -vcodec libx264  -aspect 16:9 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 450k -maxrate 450k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 56k -ar 22050 -ac 2 -passlogfile "C:\Programas_2\FFMpeg\123.log" -pass 2  "C:\Programas_2\FFMpeg\video_final.mp4"
    
    mp4box -inter 500 video_final.mp4
    
    del 123.log-0.log
    
    del x264_2pass.log
    i do the resizing using an avisynth script, the script does 2 passes, it uses mp4box to the atoom trick and then deletes the logs created by ffmpeg, you need to have mp4box in the same directory as ffmpeg

    We cannot upload movies to just anywhere. These are copyrighted stuff, many of them belongs to Lionsgate, Focus, Miramax..etc. Our contracts are strict about this.
    you can choose wether the videos will appear or not on the blip.tv site, whatever option you pick you still get the individual mp4 link for embeding the video on your site.
    I love it when a plan comes together!
    Ricardo Santos
    Quote Quote  

  17. flix pro is the best encoder uget what u pay 4
    Quote Quote  

  18. flash player can play h.264/aac coded mp4 files.
    So if you have to use .flv extension change the "mp4" to "flv" they'll open.
    if you encode your mp4 files again in the ffmpeg you change the coding.
    halve of my files in sarkisozu.web.tr are mp4 files (symbolic linked )
    Quote Quote  

  19. Member
    Join Date: Sep 2007
    Location: Canada
    Originally Posted by nerkn
    flash player can play h.264/aac coded mp4 files.
    So if you have to use .flv extension change the "mp4" to "flv" they'll open.
    if you encode your mp4 files again in the ffmpeg you change the coding.
    halve of my files in sarkisozu.web.tr are mp4 files (symbolic linked )
    True, flash player can play h.264/aac. It can play in .mp4 or .flv , but Adobe recommends .mp4 over .flv. JW Flash Player can use both. This is what we were discussing, but it seems elba's application is different and only accepts certain kinds of content (not necessarily the player, but the uploading API might re-encode if the uploaded content is not wrapped in .flv). Here is an example of h.264/aac in .flv container using JW:
    http://somestuff.org/flashAVC/flvpla...m-x640y352.flv

    You can use ffmpeg to re-wrap into .flv and NOT re-encode. You have to use a recent build that accepts h.264/aac in .flv. How am I 100% sure it works? 1) It takes less than a minute for a full movie, if it was re-encoding it would take hours 2) mediainfo reports identical video & audio specifications 3) filesize is the same (except few kb container overhead) 4) playing it in a media player is the same 5) hex editor examination is the same for the stream section

    @elba - I tested h.264/aac streams in .mp4 and .flv container, they play fine with most modern players including adobe flash + JW, except they play choppy in flv player - this might have been the player you tested on. It's not container specific, it's content specific - certain flash players don't fully support it.

    Flix Pro was mentioned, but it uses VP6, and will give just as poor results - in terms of both visual and audio quality (because mp3 instead of aac) - as Squeeze will give you using VP6 . (I use them both. I can post comparisions if you want). You should only use this if you can't get h.264/aac to work with your application
    Quote Quote  

  20. Member
    Join Date: Sep 2008
    Location: Hungary
    Hi,

    Thanks all of you for helping me out. Especially thanks posionsdeathrey and ricardouk.
    I've setup a demo site for my collegues. Note, that this is not the website and server we are planning to use: http://tinyurl.com/brqggz

    The fastest method to the best flv considering time and limited knowledge in converting (when the source is DVD):
    -rip DVD to huge avi with mencoder (we have a custom built GUI for that)
    -convert avi to mp4 with avidemux
    -wrap mp4 in flv with ffmpeg

    thanks again.
    Quote Quote  

  21. Member
    Join Date: Apr 2009
    Location: Sweden
    Originally Posted by elba
    The fastest method to the best flv considering time and limited knowledge in converting (when the source is DVD):
    -rip DVD to huge avi with mencoder (we have a custom built GUI for that)
    -convert avi to mp4 with avidemux
    -wrap mp4 in flv with ffmpeg
    I really like the look of your videos. What settings are you using in avidemux?
    Whenever i use avidemux to create an .mp4 i get a lot horizontal lines, especially where there is horizpnal motion in the picture.
    However I convert directly from a .VOB file, does that make a difference?

    I'm really greatful for all the help i can get as I am working on a video distribution site that's supposed to launch tomorrow and i have yet to find a reasonable convertion method from dvd to mp4/flv...
    Quote Quote  

  22. Member
    Join Date: Sep 2008
    Location: Hungary
    I really like the look of your videos. What settings are you using in avidemux?
    Whenever i use avidemux to create an .mp4 i get a lot horizontal lines, especially where there is horizpnal motion in the picture.
    However I convert directly from a .VOB file, does that make a difference?
    Try to convert the VOB with an another tool. If you have mplayer/mencoder on your PC mail me for a fast DVD to AVI gui.
    Every detail of the videos on the demo site are under the actual player...:

    format: mp4
    video codec: x264
    video resize filter: width=634
    audio: AAC, 128, resample to 441000

    For the -qt faststart I use MP4 faststart.exe (it takes about 10 seconds for a 2 hrs movie)
    Then in command line for wrapping in flv (use the ffpmeg.exe link in the thread above):

    ffmpeg -i inputvideo.mp4 -vcodec copy -acodec copy outputvideo.flv

    Note that not every flv player is able to seek (jump the playhead and stream from there) in the resulted flvs.
    Quote Quote  

  23. Video Restorer lordsmurf's Avatar
    Join Date: Jun 2003
    Location: Want my advice? PM me.
    Best?

    Adobe Flash CS3 Encoder = FLV
    MainConcept Reference = H.264 and rename to .mp4.flv for most players to see them. Flash Player 10 does MP4-held H.264
    Quote Quote  

  24. @ Elba (and anyone else): Correct me if I'm wrong, you say:
    -rip DVD to huge avi with mencoder (we have a custom built GUI for that)
    -convert avi to mp4 with avidemux
    -wrap mp4 in flv with ffmpeg

    But, as far as I know, what's on a DVD is Mpeg2 most of the time (or Mpeg1) which is a lot smaller and less qualitative than AVI, so I'm wondering why you rip to Huge AVI? You only end up with an enormous file that is not contributing to the quality of you stuff... Or am I wrong here?
    Quote Quote  

  25. Video Restorer lordsmurf's Avatar
    Join Date: Jun 2003
    Location: Want my advice? PM me.
    Your MPEG is not compress-ready. It needs processing first. If you don't process it well (most people don't, either), you end up with really crappy VP6 or H.264 encodes. You can decompress to AVI, fiddle with it as needed somewhat losslessly, then do final encodes.

    All that said, it doesn't sound like Elba is doing it correctly either. Just throwing it to AVI and recompressing from there doesn't solve noise/interlace issues.
    Quote Quote  

  26. Member
    Join Date: May 2010
    Location: Chicago
    Hey gang, forgive me for the newbie question. But i have not used Sorenson Squeeze in forever.
    I am on a clients machine, he has Squeeze 5, and when I encode the small file to an .flv file, I do
    not see the option to loop the file like you can with other formats like .swf Am I missing something
    or do you have to use a container like .swf to add such functionality to an .flv file ?

    Thanks, Darius
    Quote Quote  

  27. Member ricardouk's Avatar
    Join Date: Mar 2005
    Location: PORTUGAL
    You can use a flv player that supports the loop/repeat function.

    Try the JW flv player or Flowplayer

    http://developer.longtailvideo.com/t...ayer5FlashVars

    search for the word "repeat" on the above link
    I love it when a plan comes together!
    Ricardo Santos
    Quote Quote  




Similar Threads

  1. Whats the fastest FLV encoder?
    By last_registered_user in forum Video Conversion
    Replies: 0
    Last Post: 9th Sep 2009, 22:17
  2. Proper FLV Encoder needed - getting desperate!
    By vk_dk in forum Video Conversion
    Replies: 3
    Last Post: 28th Feb 2009, 09:43
  3. can't install FLV Encoder
    By pealia in forum ffmpegX general discussion
    Replies: 2
    Last Post: 6th Mar 2008, 11:34
  4. Encoding for Riva FLV Encoder
    By seven_deuce offsuit in forum Video Conversion
    Replies: 9
    Last Post: 11th Nov 2007, 03:47
  5. Riva FLV Encoder 2.0 Problems
    By link2009 in forum Newbie / General discussions
    Replies: 3
    Last Post: 14th Jun 2007, 12:16
Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools