VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Hi. I work for a law enforcement agency and we're trying to make videos available on our case management system. All videos are captured and encoded in xvid or mpeg, depending on the camera. Because of flash's smaller file size, we would like to convert our videos to flash so they can be streamed to the user instead of having to download the video everytime.

    I tried ffmpeg and it works okay. The main problem I have with it is it doesn't support multi-cores. The file server has two 64-bit Xeon 3.0 GHz processors and when it's converting 1.0 GB files, it takes a while to convert 40+ videos. I would like a converter that can take advantage of all the cores. We batch process the videos at night which is the main reason why I need something that can take advantage of the command line.

    Can anyone recommend something that can take advantage of our setup? I just want to be able to process our videos faster. Thanks for your help!
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    increasing -threads does nothing?

    just sort out into multiple job batches and run in parallel...?

    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  3. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Any ideas how I could try increasing threads?
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    just add -threads 2 (3,4..) to the commandline
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  5. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Thanks! Works perfectly! MUCH MUCH faster!
    Quote Quote  
  6. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Okay. I just realized I have a problem. After I added the "-threads 4" argument, I thought it had processed all my videos very fast. What seems to have happened is it created a bunch of 0 KB flash files. No errors were reported. Do you know what's causing this? Thanks!
    Quote Quote  
  7. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Try -threads auto . Also, you might not have a build of ffmpeg that allows multiple threads. If you're doing this on a Windows based machine, there are more recent versions of ffmpeg here: http://tirnanog.fate.jp/mirror/ffmpeg/
    Quote Quote  
  8. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    I tried -threads auto and I get the same error: I end up with 0 KB files. I downloaded the latest version of ffmpeg from the site you listed--ffmpeg.rev12665.7z. Any ideas for what's causing the problem?

    Here's the command I'm using:

    ffmpeg -threads auto -i "video1.avi" -ar 22050 -ab 32 -f flv -s 320x240 "video1.flv"
    Quote Quote  
  9. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Edit: figured it out - Multithreads Not supported for flv encoding



    It's still encoding at around 200fps on my system.

    Save yourself some work and use this batch file to process a whole folder of files. It'll convert them all into flv from AVI. Just put it in the same folder as your .AVI files. Place the contents of the ffmpeg files in there as well, or put them somewhere in your path, such as c:\windows\system32

    process.zip
    Quote Quote  
  10. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    i wasn't sure, I should have checked.

    he's already batching, so like i said in my first post,
    if threads don;t work, sort into smaller batches and run in parallel.

    also upgrade ffmpeg
    http://arrozcru.no-ip.org/tripp/


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  11. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Cool. Didn't read the whole thread.
    Quote Quote  
  12. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Now I'm using the very latest build mentioned in 45tripp's post. So, as it stands, ffmpeg doesn't support multi-threaded processing when converting to flv? Is there an alternative? Thanks!
    Quote Quote  
  13. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    that's how it stands.

    flix pro,
    sorenson squeeze?

    you could use h264 which would increase quality,
    allow multithreading,
    but still be a lot slower

    and (again)
    split into 2 batches, assign each to a core,
    run in parallel.


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  14. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    We use an embedded flash video player to view the videos. Could I start encoding in h264 and still use the flv container and have the video play in the flash player? Would that work? Thanks!
    Quote Quote  
  15. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    as long as there's flash 9 yes
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  16. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Do you know how I could change this to make it use h264 instead? I tried adding "-vcodec h264" and I get an error.

    ffmpeg -i "video1.avi" -ar 22050 -ab 32 -f flv -s 320x240 "video1.flv"

    Thanks!
    Quote Quote  
  17. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    the newer versions of ffmpeg use -vcodec libx264
    Quote Quote  
  18. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    you're not setting video bitrate, why?
    and what are your goals regarding bitrate?

    then using libx264, you'll have to also set -rc_eq "blurCplx^(1-qComp)"
    unless using my last build in which case you don;t have to.

    also,
    -threads auto is not a valid option.
    use a numerical value.

    you did take note that i said h264 will be slower yes?

    if you're gonna throw bitrate at it,
    then you don;t have to bother with settings much, but
    you might try something like this:

    Code:
    ffmpeg -i input.avi -s 320x240 -vcodec libx264 -crf 22 
    -flags +loop+trell -cmp +chroma -partitions 
    -parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -flags2 +dct8x8+mixed_refs 
    -me hex -subq 5 -refs 4 -directpred 3 -coder 1 -me_range 16 -g 250 
    -i_qfactor 0.7 -qcomp 0.7 -rc_eq "blurCplx^(1-qComp)" -acodec libfaac 
    -ar 22050 -ab 32k -threads 4 flv3.flv

    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  19. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    tripp--that works perfectly! I have it using all 8 cores and it seems to be a lot faster than my previous method. Thanks again for all your help!
    Quote Quote  
  20. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    tripp--

    I've noticed some of my videos aren't working properly. I see this error while some of them are bring processed:

    Code:
    [mpeg4 @ 041CEFA0] Invalid and inefficient vfw-avi packed B frames detected
    What's causing this? Thanks!
    Quote Quote  
  21. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    define not working properly.

    it means it has a packed bitstream,
    you could try unpacking with mpeg4modifier,
    then encoding to see if there's a difference
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!