[FFmpeg-trac] #1382(undetermined:new): Streaming the output + saving to the local file

FFmpeg trac at avcodec.org
Thu May 31 16:15:44 CEST 2012


#1382: Streaming the output + saving to the local file
-------------------------------------+-------------------------------------
             Reporter:  burek        |                     Type:
               Status:  new          |  enhancement
            Component:               |                 Priority:  wish
  undetermined                       |                  Version:  git-
             Keywords:               |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 One way of streaming the output and saving the same output to a local file
 would be to use something like this (I guess):

 {{{
 ffmpeg -i <input> -vcodec libx264 udp://ip:port -vcodec libx264 local.mp4
 }}}

 but that way FFmpeg would use 2 (identical) encoders and consume twice the
 cpu than it is logically needed. It was suggested to me, by developers
 before, that I need some kind of source/sink implemented in ffmpeg to be
 able to do this. Recently, I figured an easy way to do this easier way:

 {{{
 ffmpeg -i <input> -vcodec libx264 -f mpegts - | ffmpeg -f mpegts -i -
 -vcodec copy local.mp4 -vcodec copy udp://bla:port
 }}}

 This way only 1 encoder is doing the encoding process and the rest is done
 using just "-vcodec copy", practically just muxing the content in
 different formats, as needed.

 My question is: if this approach can be used to add a quick/simple option
 in ffmpeg to enable users to save the content to a local file while
 streaming it at the same time, something like this:

 {{{
 ffmpeg -i <input> -vcodec libx264 -localfile local.mp4 udp://bla:port
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1382>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list