Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: no sound using ffmpeg

  1. #1
    alegria1704 NNTP User

    Default no sound using ffmpeg

    Hey!



    I'm using this command to create a single mpeg file from two:

    Code:
    cat orig1.mpg orig2.mpg | ffmpeg -f mpeg -i - -vcodec copy -acodec copy merged.mp


    Unfortunately my result mpeg has no sound..



    I'm using OpenSuse10.3



    Any idea???



    P.S. lame is installed...

  2. #2
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: no sound using ffmpeg

    try this:

    mencoder orig1.mpg orig2.mpg -of mpeg -ovc copy -oac copy -o output.mpg

    you need the MPlayer package installed to obtain MEncoder

  3. #3
    alegria1704 NNTP User

    Default Re: no sound using ffmpeg

    GREAT! It works!

    Although the first minute (total 35min) I can't see/listen... There were a lot of errors like this one:
    Code:
    ERROR: scr 52.404, dts 0.000, pts 51.664
    
    ERROR: scr 52.406, dts 51.640, pts 51.760
    Pos:  52.0s   1303f ( 3%) 651.50fps Trem:   0min 995mb  A-V:0.041 [4974:192]]
    ERROR: scr 52.527, dts 0.000, pts 51.760
    
    ERROR: scr 52.570, dts 0.000, pts 51.824
    
    ERROR: scr 52.662, dts 0.000, pts 51.920
    
    ERROR: scr 52.717, dts 52.000, pts 52.120
    
    ERROR: scr 52.720, dts 0.000, pts 51.984
    
    ERROR: scr 52.786, dts 0.000, pts 52.080
    
    ERROR: scr 52.852, dts 0.000, pts 52.176
    
    ERROR: scr 52.910, dts 0.000, pts 52.240
    
    ERROR: scr 52.912, dts 52.240, pts 52.360
    Pos:  52.6s   1318f ( 3%) 652.15fps Trem:   0min 990mb  A-V:0.049 [4977:192]]
    But this can be a result of the bad input file... Who knows...

    Second (and last) step is now to convert into an flv file. mencoder can do it too?

  4. #4
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: no sound using ffmpeg

    yes, mencoder can convert it into an FLV file... you can use for example

    Code:
    mencoder inputfile -of lavf -lavfopts format=flv -ovc lavc -lavcopts vcodec=flv:vmax_b_frames=0:vbitrate=1000 -oac mp3lame -lameopts cbr:br=128 -o output.flv
    when you use the lavf muxer with mencoder, make sure that you don't use any B-Frames for encoding since the lavf muxer is currently broken and places incorrect timestamps when using B-Frames. Like in the example above, set the vmax_b_frames option to 0

  5. #5
    alegria1704 NNTP User

    Default Re: no sound using ffmpeg



    I get this error:
    Code:
    Writing header...
    [NULL @ 0x887d290]video codec not compatible with flv
    Gleitkomma-Ausnahme
    What's wrong? No other possibilities?

  6. #6
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: no sound using ffmpeg

    Quote Originally Posted by alegria1704 View Post


    I get this error:
    Code:
    Writing header...
    [NULL @ 0x887d290]video codec not compatible with flv
    Gleitkomma-Ausnahme
    What's wrong? No other possibilities?
    you need to use vcodec=flv instead of mpeg4 (my fault sorry)

  7. #7
    alegria1704 NNTP User

    Default Re: no sound using ffmpeg

    ???

    I've used it and you wrote it too!


  8. #8
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: no sound using ffmpeg

    Quote Originally Posted by alegria1704 View Post
    ???

    I've used it and you wrote it too!

    this is very strange as it works here. Copy this command line into your terminal and try again. Change only the "inputfile" at the beginning.

    Code:
    mencoder inputfile -of lavf -lavfopts format=flv -ovc lavc -lavcopts vcodec=flv:vmax_b_frames=0:vbitrate=1500:mbd=2:cmp=2:subcmp=2:trell -oac mp3lame -lameopts cbr:br=128 -o output.flv -af resample=44100 -srate 44100
    Alternatively you can use ffmpeg to convert your file to FLV, however I have no idea how to do it with ffmpeg. I'm a mencoder user

  9. #9
    alegria1704 NNTP User

    Default Re: no sound using ffmpeg

    Great!

    Now it works fine - EVERYTHING works fine!!!

    Thanks a lot...

  10. #10
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: no sound using ffmpeg

    Quote Originally Posted by alegria1704 View Post
    Great!

    Now it works fine - EVERYTHING works fine!!!

    Thanks a lot...
    I'm happy to be of assistance
    Great to hear it's working!

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •