Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
ffmpeg [2013/06/28 15:13] beandog |
ffmpeg [2019/07/08 18:48] beandog |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== ffmpeg ====== | ====== ffmpeg ====== | ||
+ | |||
+ | * [[ffplay]] | ||
+ | * [[ffprobe]] | ||
+ | * [[frameinfo]] | ||
+ | * [[framecount]] | ||
+ | * [[detelecine]] | ||
+ | * [[yadif]] | ||
+ | * [[bwdif]] | ||
+ | * [[Subtitles]] | ||
+ | |||
+ | * [[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 [[dvd_copy|copy]] from a DVD: | ||
+ | |||
+ | <code> | ||
+ | dvd_copy -o - | ffmpeg -i - -map 0:v -map 0:a -map 0:s -codec copy -f vob dvd_copy.mpg | ||
+ | </code> | ||
+ | |||
+ | Or into Matroska: | ||
+ | |||
+ | <code> | ||
+ | dvd_copy -o - | ffmpeg -fflags +genpts -i - -codec copy dvd_copy.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 32: | Line 98: | ||
</code> | </code> | ||
- | === archvies: From Letterbox to Anamorphic Widescreen === | + | === archives: From Letterbox to Anamorphic Widescreen === |
<code> | <code> | ||
Line 53: | Line 119: | ||
If you looked at a widescreen and a fullscreen video, the original display size is actually the same: 720x480. They are just stretched differently based on the aspect ratio. | If you looked at a widescreen and a fullscreen video, the original display size is actually the same: 720x480. They are just stretched differently based on the aspect ratio. | ||
+ | |||
+ | === archives: Convert image to video === | ||
+ | |||
+ | <code> | ||
+ | ffmpeg -i snapshot.jpg -sameq -s 720x480 video.mp4 | ||
+ | </code> | ||
+ | |||
+ | That will create a one frame video. Then I copy it to about 200 frames to make a 6 second video. | ||
+ | |||
+ | Avidemux has problems opening a single frame file, so create a long MP4 before trying to create a VOB to burn to DVD. | ||
+ | |||
+ | === archives: PSP Format w/ffmpeg === | ||
+ | |||
+ | Finally found a working solution: | ||
+ | |||
+ | <code>ffmpeg -y -i 101._The_Force_Phantom.mkv -s 320x240 -ar 24000 -r 29.97 -f psp -title "The Force Phantom" M4V12345.MP4</code> | ||
+ | |||
+ | You *can* encode to 480x272 (or 270) and it will playback fine, but for some reason the title tag won't be read anymore. Seems to be a PSP bug, since a video I downloaded (SWTFU stuff) also won't display it. | ||
+ | |||
+ | Also, MV1234.MP4 is the old supported format. My PSP (firmware >5) supports "movie.mp4" naming scheme, as well as folder structures just fine! |