Answers.Body: <p>You can use ffprobe (which comes with ffmpeg) to give you info about your movie files from the command line.</p>
  
  <p>You may require some shell-fu to convert the output of ffprobe into something you can use though. I've done this in the past; basically I pipe the output of ffprobe to sed or awk to grab the bits of info I need, then use this to drive the parameters of ffmpeg.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-19T20:24:05.630Z
Answers.Text: [FFmpeg Wiki: FFprobe Tips](https://trac.ffmpeg.org/wiki/FFprobeTips) has a few examples.
Answers.UserDisplayName: llogan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-18T06:22:21.957Z
Answers.LastActivityDate: 2015-02-18T06:22:21.957Z
Answers.UserDisplayName: stib
Body: <p>Over the years I collected many movies in different container formats (avi, mp4, mkv) and encoded with different codecs too.</p>
  
  <p>Now want convert containers (or transcode them if absolutely necessary) to "iPhone compatible" movies.</p>
  
  <p>After spending long time on google, still didn't know exact answers to the next questions - so, please confirm them or please give the right answers</p>
  
  <ol>
  <li>iPhone can play only mp4 container format - so the <code>mp4</code> is the only usable container for iPhone movies</li>
  <li>In what codecs can be the streams? (video/audio and subtitles)</li>
  <li>Is possible embedd "SOFT" subtitles to mp4 container? (what i read - yes, but here is some pitfalls) - mean soft subtitles, so not "burned them into the video stream".</li>
  <li><p>What is the right logic to convert/transcode movies from different formats to wanted iPhone compatible format? My idea is roughly:</p>
  
  <ul>
  <li>fetch information from the current movie - e.g. from avi container</li>
  <li>if the <code>used codecs</code> and the used <code>video resolution</code> is compatible with iPhone (like h264), only change the container format, otherwise</li>
  <li><p>transcode the movie, with:</p></li>
  <li><p>if the current movie has smaller resolution, don't change - only transcode</p></li>
  <li>if the current movie has higher resolution, change it's resolution proportionally to match the iPhone needs</li>
  </ul></li>
  </ol>
  
  <p>All above want do from command line on Mac OS X - so, with ffmpeg or mencoder and like. (please, don't suggest me batch conversions with not-command line app)</p>
  
  <p>The questions are mainly about the <code>whole workflow</code>, what are the most common pitfalls, recommendations and etc.</p>
  
  <p>Would be happy with some external links to some good articles about the above.</p>
  
  <p>This is my 1st question here, and I hope it is OK with <a href="https://video.stackexchange.com/help/on-topic">right-question-type</a> on this site:</p>
  
  <ul>
  <li>post-production techniques</li>
  <li>asset management, media, and file formats</li>
  <li>installation, configuration, and operation of hardware or software
  related to these topics</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-10T03:10:56.953Z
Comments.Text: Which iPhone versions are you wanting to support?
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-10T10:21:43.487Z
Comments.Text: @LordNeckbeard yeah, forgot specify, mainly because most of my current movies is lower than 720p. But ok - iPhone4 and highers.
Comments.UserDisplayName: clt60
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-12T14:11:53.257Z
Comments.Text: @jm666 - I noticed your question hasn't gotten any responses in a few days.  One thing that I do notice about it is that it seems to be asking multiple questions at the same time.  You might be able to break it out in to multiple questions that are more easily answered.  For example, "What video formats should I use when targeting the iPhone?" could be its own free standing question.  Similarly, the subtitle question and transcoding questions could each be done separately.
Comments.UserDisplayName: AJ Henderson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-12T14:12:45.937Z
Comments.Text: This would do two things.  It would make the questions more broadly beneficial, since people looking for only a part of what you are doing would find an answer.  It would also make it easier to answer since someone could answer only the parts they know without feeling like they aren't really answering the question.
Comments.UserDisplayName: AJ Henderson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-12T22:18:04.617Z
Comments.Text: @AJHenderson - yeah, it is a complex problem. Asked in hope than someone already faced the problem: "converting his movie collection suitable to iPhone". Seems - not much peoples doind such silly thing.. ;) If didn't get any answer, will try break the question to smaller parts and will delete this one. Thank you for suggestion.
Comments.UserDisplayName: clt60
Tags: <file-formats><ffmpeg><conversion><transcoding><iphone>
Title: Converting container or transcode movies to iPhone from command line (os x)
UserDisplayName: clt60
ThreadText: # Converting container or transcode movies to iPhone from command line (os x)
  
  (Asked by: username_0 on 2014-03-08)
  
  Over the years I collected many movies in different container formats (avi, mp4, mkv) and encoded with different codecs too.
  
  Now want convert containers (or transcode them if absolutely necessary) to "iPhone compatible" movies.
  
  After spending long time on google, still didn't know exact answers to the next questions - so, please confirm them or please give the right answers
  
  1. iPhone can play only mp4 container format - so the `mp4` is the only usable container for iPhone movies
  2. In what codecs can be the streams? (video/audio and subtitles)
  3. Is possible embedd "SOFT" subtitles to mp4 container? (what i read - yes, but here is some pitfalls) - mean soft subtitles, so not "burned them into the video stream".
  4. What is the right logic to convert/transcode movies from different formats to wanted iPhone compatible format? My idea is roughly:
  
     * fetch information from the current movie - e.g. from avi container
     * if the `used codecs` and the used `video resolution` is compatible with iPhone (like h264), only change the container format, otherwise
     * transcode the movie, with:
     * if the current movie has smaller resolution, don't change - only transcode
     * if the current movie has higher resolution, change it's resolution proportionally to match the iPhone needs
  
  All above want do from command line on Mac OS X - so, with ffmpeg or mencoder and like. (please, don't suggest me batch conversions with not-command line app)
  
  The questions are mainly about the `whole workflow`, what are the most common pitfalls, recommendations and etc.
  
  Would be happy with some external links to some good articles about the above.
  
  This is my 1st question here, and I hope it is OK with [right-question-type](https://video.stackexchange.com/help/on-topic) on this site:
  
  * post-production techniques
  * asset management, media, and file formats
  * installation, configuration, and operation of hardware or software
    related to these topics
  
  **Tags:** file-formats, ffmpeg, conversion, transcoding, iphone
  
  > **Comments:**
  > **username_1**: Which iPhone versions are you wanting to support?  
  > **username_0**: @LordNeckbeard yeah, forgot specify, mainly because most of my current movies is lower than 720p. But ok - iPhone4 and highers.  
  > **username_2**: @jm666 - I noticed your question hasn't gotten any responses in a few days.  One thing that I do notice about it is that it seems to be asking multiple questions at the same time.  You might be able to break it out in to multiple questions that are more easily answered.  For example, "What video formats should I use when targeting the iPhone?" could be its own free standing question.  Similarly, the subtitle question and transcoding questions could each be done separately.  
  > **username_2**: This would do two things.  It would make the questions more broadly beneficial, since people looking for only a part of what you are doing would find an answer.  It would also make it easier to answer since someone could answer only the parts they know without feeling like they aren't really answering the question.  
  > **username_0**: @username_2 - yeah, it is a complex problem. Asked in hope than someone already faced the problem: "converting his movie collection suitable to iPhone". Seems - not much peoples doind such silly thing.. ;) If didn't get any answer, will try break the question to smaller parts and will delete this one. Thank you for suggestion.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2015-02-18. Score: 1
  
  You can use ffprobe (which comes with ffmpeg) to give you info about your movie files from the command line.
  
  You may require some shell-fu to convert the output of ffprobe into something you can use though. I've done this in the past; basically I pipe the output of ffprobe to sed or awk to grab the bits of info I need, then use this to drive the parameters of ffmpeg.
  
  > **Comments:**
  > **username_1**: [FFmpeg Wiki: FFprobe Tips](https://trac.ffmpeg.org/wiki/FFprobeTips) has a few examples.  
  
  ---
  
  