title: Remove Unwanted Rotation of video when merge audio With Video Using FFMPEG
body: <p>Actually I want to overwrite Audio Using  Recorder Audio file into Recorded Video File.For That I am Using <strong>FFMPEG</strong> Library Project from <a href="https://github.com/guardianproject/android-ffmpeg-java" rel="nofollow">this Link</a></p>
  
  <p><strong>Issue:</strong>
  When I capture video in <strong>Portrait mode</strong> and then merge video with recorded audio merging is working fine but the problem is Video is rotate 90 Degree and then merging is work.I don't Want to rotate video I want to do merge Only.</p>
  
  <p>if I capture video in Landscape Mode Then Merging audio is Working Fine.</p>
  
  <p>Below Currently FFMPEG Command is Used for merging Audio with Video File</p>
  
  <pre><code>ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0 OutputFile.mp4
  </code></pre>
  
  <p>And I Have Tried Using Below Commands also but it's Not working</p>
  
  <pre><code>ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0  -vf -metadata:s:v:0 rotate=0 OutputFile.mp4
  </code></pre>
  
  <p>And</p>
  
  <pre><code>ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0  -vf -metadata:s:v:0 translate=1 OutputFile.mp4
  </code></pre>
  
  <p>And I have Trying othe possibility also but its not work for me.</p>
  
  <p>Any Help Would be Acceptable.</p>
  
  <p>Thanks In Advance</p>
  
  <p>Log cat is displaying below</p>
  
  <pre><code>WARNING: linker: /data/data/com.informer.favoraid/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
  ffmpeg version 0.11.1 
  built on Feb  7 2015 21:39:25 with gcc 4.6 20120106 (prerelease)
  configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/josh/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/josh/android-ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --enable-muxer=md5
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.informer.favoraid/files/MP4_FAV20151002_105039_1099425693.mp4':
  
  
  
  10-01 17:15:20.056: I/System.out(6526): sxCon&gt; Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
      '/storage/emulated/0/Android/data/com.informer.favoraid/files/MP4_FAV20151001_171355_-1450037636.mp4':
  
    Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2015-10-01 11:44:06
     Duration: 00:00:04.80, start: 0.000000, bitrate: 15488 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16004 kb/s, 29.97 fps, 30 tbr, 90k tbn, 180k tbc
       Metadata:
         rotate          : 90
         creation_time   : 2015-10-01 11:44:06
         handler_name    : VideoHandle
       Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 128 kb/s
      Metadata:
         creation_time   : 2015-10-01 11:44:06
        handler_name    : SoundHandle
   Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.informer.favoraid/Audio_Recording.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
      creation_time   : 2015-10-01 11:45:13
    Duration: 00:00:05.24, start: 0.000000, bitrate: 18 kb/s
       Stream #1:0(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
       Metadata:
         creation_time   : 2015-10-01 11:45:13
         handler_name    : SoundHandle
   Output #0, mp4, to '/storage/emulated/0/Android/data/com.informer.favoraid/OutputFile.mp4':
     Metadata:
     :     major_brand     : mp42
       minor_version   : 0
      compatible_brands: isommp42
      creation_time   : 2015-10-01 11:44:06
       encoder         : Lavf54.6.100
       Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 16004 kb/s, 29.97 fps, 90k tbn, 90k tbc
       Metadata:
        rotate          : 90
       creation_time   : 2015-10-01 11:44:06
        handler_name    : VideoHandle
       Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 8000 Hz, mono, 12 kb/s
       Metadata:
         creation_time   : 2015-10-01 11:45:13
         handler_name    : SoundHandle
   Stream mapping:
     Stream #0:0 -&gt; #0:0 (copy)
     Stream #1:0 -&gt; #0:1 (copy)
   Press [q] to stop, [?] for help
   frame=  138 fps=0.0 q=-1.0 Lsize=    9008kB time=00:00:04.57 bitrate=16141.8kbits/s    
  </code></pre>