Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ffmpeg [2019/06/27 04:51]
beandog
ffmpeg [2023/04/09 21:27] (current)
beandog
Line 1: Line 1:
 ====== ffmpeg ====== ====== ffmpeg ======
  
 +  * [[ffplay]]
 +  * [[ffprobe]]
   * [[frameinfo]]   * [[frameinfo]]
   * [[framecount]]   * [[framecount]]
Line 6: Line 8:
   * [[yadif]]   * [[yadif]]
   * [[bwdif]]   * [[bwdif]]
 +  * [[Subtitles]]
  
 +  * [[https://​amiaopensource.github.io/​ffmprovisr/​|ffmprovisr]] - excellent page to help you "​build"​ an ffmpeg command
   * [[https://​en.wikibooks.org/​wiki/​FFMPEG_An_Intermediate_Guide]]   * [[https://​en.wikibooks.org/​wiki/​FFMPEG_An_Intermediate_Guide]]
 +  * [[http://​wiki.indie-it.com/​wiki/​FFmpeg_DVD]] - lots of good, detailed ffmpeg examples
  
-To do a clean MPG copy from a DVD:+To do a clean MPG [[dvd_copy|copy]] from a DVD:
  
 <​code>​ <​code>​
-dvd_copy -o - | ffmpeg -i - -map 0:v -map i:0x80 -c:v copy -c:a copy -metadata:​s:​a:​0 language=eng ​-f vob dvd_copy.mpg ​+dvd_copy -o - | ffmpeg -i - -map 0:v -map 0:-map 0:-codec copy -f vob dvd_copy.mpg ​
 </​code>​ </​code>​
  
 +Or into Matroska:
  
 +<​code>​
 +dvd_copy -o - | ffmpeg -fflags +genpts -i - -codec copy dvd_copy.mkv ​
 +</​code>​
 +
 +''​ffmpeg''​ can copy a Blu-ray directly as well, once you know the playlist number (see [[bluray_info]]).
 +
 +<​code>​
 +ffmepg -playlist 800 -i bluray:/​dev/​sr0 -codec copy bluray_playlist.mkv
 +</​code>​
 +
 +** Adding Chapters **
 +
 +  * See [[https://​ffmpeg.org/​ffmpeg-formats.html#​Metadata-1]]
 +
 +Create a file with the metadata. This example here has chapters at each minute mark.
 +
 +<​code>​
 +;​FFMETADATA1
 +[CHAPTER]
 +TIMEBASE=1/​1000
 +START=0
 +END=60000
 +title=Chapter 1
 +[CHAPTER]
 +TIMEBASE=1/​1000
 +START=60000
 +END=120000
 +title=Chapter 2
 +[CHAPTER]
 +TIMEBASE=1/​1000
 +START=120000
 +END=180000
 +title=Chapter 3
 +[CHAPTER]
 +TIMEBASE=1/​1000
 +START=180000
 +END=240000
 +title=Chapter 4
 +</​code>​
 +
 +Use the file as input with the encode, and map the metadata:
 +
 +<​code>​
 +ffmpeg -i video.mpg -i chapters.txt -map_metadata 1 video.mkv
 +</​code>​
 +
 +You can extract the metadata as well:
 +
 +<​code>​
 +ffmpeg -i dvd_copy.mkv -f ffmetadata metadata.txt
 +</​code>​
  
 === archives: Wrong audio track by default === === archives: Wrong audio track by default ===
Line 90: Line 146:
  
 Also, MV1234.MP4 is the old supported format. ​ My PSP (firmware >5) supports "​movie.mp4"​ naming scheme, as well as folder structures just fine! Also, MV1234.MP4 is the old supported format. ​ My PSP (firmware >5) supports "​movie.mp4"​ naming scheme, as well as folder structures just fine!
- 
-=== archives: Muxing to Matroska === 
- 
-ffmpeg seems to have issues creating MKV files. ​ For one, they are much larger than an AVI with the same encoding options. ​ Secondly, they don't seem to work well when AC3 is placed in there. ​ I'd recommend encoding to AVI (or MP4) and then using mkvmerge. 

Navigation