# Ffmpeg transcode

**URL:** https://community.wowza.com/t/ffmpeg-transcode/42074
**Category:** Wowza Streaming Engine
**Created:** [December 8, 2014, 12:13am UTC](https://community.wowza.com/t/ffmpeg-transcode/42074 "2014-12-08T00:13:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kenji\_magto](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@kenji\_magto](https://community.wowza.com/u/kenji_magto)
#### Post date: [December 8, 2014, 12:13am UTC](https://community.wowza.com/t/ffmpeg-transcode/42074/1 "2014-12-08T00:13:39Z")

</div>

Hello everyone,

I have this problem on transcoding rtmp using ffmpeg, the command below can successfully transcode rtmp to rtmp (with lower bireate):

ffmpeg -i **rtmp://sample.com/live/mp4:STREAM-KEY-ORIGINAL** -vcodec libx264 -preset veryfast -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -b:v 600k -maxrate 600k -bufsize 3400k -sws\_flags spline -r 30 -acodec copy -f flv **rtmp://sample.com/live/mp4:STREAM-KEY-TRANSCODED**

we are actually using cdn as edge, what we want to achieve is something like this output:

basically to merge the origin and transcoded streams to generate a multi biterate output to our edge server, is that posible?

Thanks,

---

<div class="post-metadata">

### Author: ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)
#### Post date: [December 10, 2014, 8:24am UTC](https://community.wowza.com/t/ffmpeg-transcode/42074/2 "2014-12-10T08:24:03Z")

</div>

Hello.

Here is an example of how this would work:

```auto
ffmpeg -i sample.mp4 -strict -2 -c:a aac -b:a 32k -c:v libx264 -b:v 128K -f flv rtmp://localhost/live/stream_low -c:a copy -c:v libx264 -b:v 256k -f flv rtmp://localhost/live/stream_mid

```

You can modify the details as needed.

Kind regards,

Salvadore
