VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Member
    Join Date
    Aug 2003
    Location
    United States
    Search Comp PM
    Alrighty. Here's what I did.

    I got a video (A) from Youtube. It plays fine with various media players. I used FLVExtract to separate it into its FLV (B) and MP3 (C) components, both of which play fine. I've got a new MP3 (D) of precisely the same duration which I want to mux back into the audio-less FLV (B) I generated with FLVExtract.

    I tried this command with ffmpeg:

    ffmpeg -i B.avi -i D.mp3 E.flv

    Ffmpeg properly recognized B.avi as an FLV file, and D.mp3 as an mp3. It generated E.flv. But it reencoded the data, and the result is highly degraded in quality. In order to overcome this, I then tried:

    ffmpeg -i B.avi -i D.mp3 -vcodec copy -acodec copy E.flv

    This time, ffmpeg was kind enough to fail, informing me that, "error, non monotone timestamps 13 >= 0". I'm quite fuzzy on what this means. But some hunting revealed that Mencoder should be able to generate timestamps without re-encoding. Accordingly, I tried this:

    mencoder B.avi -ovc copy -D.mp3 -oac copy -o E.flv

    This seemed to work, but I got a little suspicious when the output file was actually a hair smaller than the video component (never mind the combined size of video and audio). Sure enough, nothing could play the E.flv Mencoder had generated.

    Anyway, that's all I'm trying to do. Combine the FLV video with the MP3 audio without reencoding. They're both the same duration. The MP3 is a CBR with nothing fancy. Should I be using something else? Some other command line?

    Thanks. ;p
    Quote Quote  
  2. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    Location
    init 4
    Search Comp PM
    ffmpeg -i blah.avi -i blah.mp3 -vcodec copy -acodec copy out.flv
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  
  3. Member
    Join Date
    Aug 2003
    Location
    United States
    Search Comp PM
    That's one that I tried. Ffmpeg failed (see above). Hoping there's a solution.
    Quote Quote  
  4. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    Location
    init 4
    Search Comp PM
    ffmpeg doesn't fail with the non-mono tone errors. It's just informing you your source files weren't created correctly. There should be a different error message at the end to preclude what the problems is. Considering both mencoder and ffmpeg fail to do a simple copy of streams, suggests the streams are at fault?

    Why don't you use ffmpeg to process the original flv and just add a new audio file to it? -newaudio
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  
  5. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    http://ffdshow.faireal.net/mirror/ffmpeg/

    Use rev.10464 from here.
    you can also try the last build, but i've found it crashes.

    (and btw if you want to use a ffmpeg gui check Avanti)

    with mencoder you have to specify the lavf muxer

    insert into the commandline:
    Code:
    -of lavf

    tripp
    Quote Quote  
  6. Member
    Join Date
    Aug 2003
    Location
    United States
    Search Comp PM
    Originally Posted by disturbed1
    Why don't you use ffmpeg to process the original flv and just add a new audio file to it? -newaudio
    In moderate desperation, I've been trying just that.

    ffmpeg -i A.flv -i B.wav -ab 96 E.flv

    It processes the original flv alright, but it ignores the wav file and uses the original flv's audio. Furthermore, any attempt I make to undertake the - let's face it - convoluted process for 2-pass encoding fails utterly. Usually I get a complaint about not being to scale an "unsupported format", which strikes me as perhaps an inaccurate assessment.

    But before I move on to the grandiose achievement of 2-pass encoding, I'd better figure out why I can't get ffmpeg to use video from A, audio from B, and generate C. Or, rather, see if anyone's used the program enough to be able to intuit what I'm doing wrong. ;p
    Quote Quote  
  7. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    Location
    init 4
    Search Comp PM
    Did you try

    -newaudio?

    Or -

    ffmpeg -i in.flv -an out.flv

    (-an I call it short for audio no, it disables audio encoding)

    ffmpeg -i out.flv -i audio.mp3 -vcodec copy -acodec copy new.flv
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  
  8. Member
    Join Date
    Aug 2003
    Location
    United States
    Search Comp PM
    Here's the last quandry I am dealing with. I cannot get ffmpeg to encode a wav file. Not by itself (with -vn), and not as the audio component merged with a flv which it created. It recognizes the wav as audio. The wav is the same duration as the flv. Here is what it says:

    ffmpeg.exe -i trying.wav -vn -ab 96kb blah1.mp3

    Input #0, wav, from 'trying.wav':
    Duration: 00:05:29.2, bitrate: 2822 kb/s
    Stream #0.0: Audio: 0x003, 44100 Hz, stereo, 2822 kb/s
    Output #0, mp3, to 'blah1.mp3':
    Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, 96 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Unsupported codec (id=0) for input stream #0.0

    I have tried three different ffmpegs and they all say the same thing. I have also tried getting ffmpeg to combine the flv (which, again, it created) with an mp3 made from the wav with Adobe Audition, CBR so nothing fancy, and that's when it instead decides there are timestamp issues and doesn't work.

    Maybe there needs to be a front-end for ffmpeg, called "Ffmpeg baby" or something, whose sole purpose is to ensure that the hygiene of the input files aren't going to generate ambiguous failure messages.
    Quote Quote  
  9. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    44100 Hz, stereo, 2822 kb/s
    That means a 32-bit audio file.
    HTH.
    Quote Quote  
  10. Member
    Join Date
    Aug 2003
    Location
    United States
    Search Comp PM
    Okay. Thanks. That fixed that hurdle. I stand by what I said about ambiguous error messages, though. ;p

    "Ffmpeg Baby says, 'Ffmpeg doesn't like 32-bit audio - shall I convert the file for you now? [No!] [Yes] [Yes to all (Do whatever; just make it happy)]"
    Quote Quote  



Similar Threads

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