This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
ffmpeg [2024-11-17 19:21:37] mi [Delay track] |
ffmpeg [2026-02-09 15:40:29] (current) mi [Other options] |
||
|---|---|---|---|
| Line 286: | Line 286: | ||
| - | == Add pseudo-timecode | + | == Timecode |
| + | === Change existing timecode | ||
| + | |||
| + | f=OriginalFile.mxf | ||
| + | newtc="00:00:00:00" | ||
| + | out=NewTC_File.mxf | ||
| + | ffmpeg -i "$f" -map 0:v -map 0:a -codec copy -movflags use_metadata_tags -timecode "$newtc" "$out" | ||
| + | |||
| + | === Add pseudo-timecode | ||
| Example with Fuji .MOV files, to add the "Create Date" time as a timecode: | Example with Fuji .MOV files, to add the "Create Date" time as a timecode: | ||
| Line 317: | Line 325: | ||
| <code bash>t=$(exiftool -api largefilesupport=1 -CreateDate "$f" | awk '{print $NF}');</code> | <code bash>t=$(exiftool -api largefilesupport=1 -CreateDate "$f" | awk '{print $NF}');</code> | ||
| + | |||
| + | For .wav files from a Zoom, instead of ''-CreateDate'', use ''-DateTimeOriginal'' : | ||
| + | <code bash>t=$(exiftool -DateTimeOriginal "$f" | awk '{print $NF}'); tc="$t:00";</code> | ||
| ==Diff | ==Diff | ||
| Line 373: | Line 384: | ||
| -hide_banner -loglevel info -stats</code> | -hide_banner -loglevel info -stats</code> | ||
| - | ===Edit metadata=== | + | ===Add metadata for .mkv=== |
| + | |||
| + | ffmpeg -i "$mkv_in" -c copy -map 0 -metadata title="$New_Title" -metadata artist="$New_Artist" -metadata comment="$New_Comment" "$mkv_new" | ||
| + | |||
| + | ===Set metadata per track=== | ||
| See [[https://superuser.com/questions/834244/how-do-i-name-an-audio-track-with-ffmpeg/835069|How do I name an audio track with ffmpeg]]: | See [[https://superuser.com/questions/834244/how-do-i-name-an-audio-track-with-ffmpeg/835069|How do I name an audio track with ffmpeg]]: | ||
| ffmpeg -i input.mp4 -map 0 -c copy -metadata:s:a:0 title="One" -metadata:s:a:1 title="Two" -metadata:s:a:0 language=eng -metadata:s:a:1 language=spa output.mp4 | ffmpeg -i input.mp4 -map 0 -c copy -metadata:s:a:0 title="One" -metadata:s:a:1 title="Two" -metadata:s:a:0 language=eng -metadata:s:a:1 language=spa output.mp4 | ||
| + | |||
| ==Examples | ==Examples | ||