VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date: Mar 2008
    Location: Canada
    Search Comp PM
    Hello all,
    I have searched quite a bit and didn't find exactly what I am looking for. As the title says, I need to remux .mp4 video files into .flv.

    Here is a resumé of my workflow (don't hesitate to suggest modification ):
    - I load AVI files in avisynth to filter the file
    - I encode to lossless AVI using virtualdub
    - I load the lossless AVI in a simple .avs to open them using megui
    - I use megui to encode to x264 aac .mp4 to the final quality

    Before, the last step would have been to encode to VP6 MP3 .flv but I have discovered that our content management system (that NEEDS the .flv extension) will play flv made of x264 and aac streams.

    So I'm adding a step, which is to remux those mp4 to flv. I am able to do that using ffmpeg with a quite simple command (that I lost track of...). The thing is that there is enough of files to remux to make it unpractical to remux them one by one in the command line.

    That leads me here, asking for suggestions of something that can batch remux or a command line that could batch do it.

    So far I have looked in ffmpeg documentation, unsuccessfully, and tried avidemux, which won't accept to copy x264 video to a flv container. I also browsed the tool list with no success.

    Thanks for reading!
    Quote Quote  
  2. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    1) place a copy of ffmpeg.exe in the same directory as your files to rewrap

    2) write the following in in notepad (assuming you have x264/aac/mp4 files) , change extension of .txt to .bat, double click it

    for %%a in ("*.mp4") do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.flv
    3) normally you would inject metadata at this stage for the flv, but according to your other thread , it's not required by your application, but just for completeness for anyone else, you could use flvtool2, flvtool++, or flvmdi for example . flvmdi even has a batch GUI

    What filters in vdub are you using? You might be able to simplify everything by using avisynth filters (and avoid colorspace conversion)
    Quote Quote  
  3. Member
    Join Date: Mar 2008
    Location: Canada
    Search Comp PM
    HA!
    Awesome! This is exactly the type of operation I was looking for.
    poisondeathray, thanks a lot. How the hell do you become so familiar with this stuff?

    As for your question "What filters in vdub are you using?", the answer is none. I wrote that "I load AVI files in avisynth to filter the file" and I do that using avsp. Or maybe there is something I don't understand.

    Thanks
    Quote Quote  
  4. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    I learned through the same process of you: trying to fix/optimize streaming videos on some websites . So I'm just sharing the tidbits that helped me along the way

    Sorry I misread it and thought you were filtering in vdub ... Then why are you using vdub or lossless intermediate at all ? Why not feed avs=>megui directly ? Or is it because you are doing 2pass encoding and want the lossless intermediate for the filters (to speed encoding) ?

    You can actually batch encode using x264 through ffmpeg as well (or batch using x264.exe), but I'm not too familiar with the syntax for ffmpeg x264 encoding
    Last edited by poisondeathray; 24th Aug 2010 at 22:36.
    Quote Quote  
  5. Member
    Join Date: Mar 2008
    Location: Canada
    Search Comp PM
    Their are many reason for the intermediate lossless avi:
    - My avisynth scripts run at 1.9 to 2.5 fps
    - I do use 2 or 3 passes encoding with x264
    - I use the lossless file to encode to my final product (the discussed mp4/flv) and a very high quality x264 avi for archiving purpose.

    Hopefully I will get a new much more powerful computer soon, allowing me to skip that lossless step in some situations.

    I should look for some ffmpeg/x264 gurus to apply your idea of batch encoding my avi to x264 flv, that would be quite an improvement of the workflow.

    Thanks again for you help!
    Quote Quote  
  6. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    I haven't done the batch encoding myself (x264 or x264 though ffmpeg), but I bookmarked some threads that have examples of the code in case for the future should I need to. You 'd probably just have to modify it a bit

    http://doom10.org/index.php?topic=212.0
    http://doom10.org/index.php?topic=218.0
    http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/
    http://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping


    If you need help on the batch encoding you can post in those threads or start a new one specifically on batch encoding with x264 (or ffmpeg x264)

    Cheers
    Quote Quote  
  7. Member
    Join Date: Mar 2008
    Location: Canada
    Search Comp PM
    I will look at these resource today!
    Thanks again!
    Quote Quote  



Similar Threads