title: MediaRecorder setOutputFile socket. File not Open
body: <p>Device Google Glass XE19.1</p>
  
  <p>I'm try write file on remote server:</p>
  
  <pre><code>        mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
          mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
          mMediaRecorder.setVideoEncodingBitRate(0x4c4b40);
          mMediaRecorder.setAudioChannels(2);
          mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
          mMediaRecorder.setAudioEncodingBitRate(0x17700);
          mMediaRecorder.setAudioSamplingRate(44100);
  
          ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket);
          mMediaRecorder.setOutputFile(pfd.getFileDescriptor());
  </code></pre>
  
  <p>On remote server file writes, but when i try open this, i get next error: </p>
  
  <pre><code>ftypisom isom3gp4 free
  </code></pre>
  
  <p>But when i save in sd card, it's ok. What wrong?</p>
  
  <p>P.S. this test code: Works very good. File open and play</p>
  
  <pre><code>   socket = new Socket(host,4444);
  
  
      File file = new File("C:/video.mp4");
      long length = file.length();
      byte[] bytes = null;
      bytes = new byte[1024]; 
      FileInputStream fis = new FileInputStream(file);
      BufferedInputStream bis = new BufferedInputStream(fis);
      BufferedOutputStream bos = new BufferedOutputStream(socket.getOutputStream());
      DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
      int count;
  
      while((count = bis.read(bytes))&gt;0){
          dos.write(bytes, 0, count);
      }
      System.out.println("File send");
      bos.flush();
      bos.close();
      fis.close();
      bis.close();
      socket.close();
  </code></pre>