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 18:26:44] mi [faststart] |
ffmpeg [2025-03-20 19:39:18] (current) mi [Add pseudo-timecode] |
||
|---|---|---|---|
| Line 264: | Line 264: | ||
| For example, to merge an audio and a video file, but having the audio start 440 ms. later (11 frames at 25 fps): | For example, to merge an audio and a video file, but having the audio start 440 ms. later (11 frames at 25 fps): | ||
| - | ffmpeg -i "$video.mp4" -itsoffset 0.440 -i "audio.m4a" -map 0:v -map 1:a -c copy "resynced-video_audio.mp4" | + | ffmpeg -i "$video_file" -itsoffset 0.440 -i "$audio_file" -map 0:v -map 1:a -c copy "ff-resync-video_audio.mp4" |
| ===Syntax for time duration | ===Syntax for time duration | ||
| ''[-][HH:]MM:SS[.m...]'' or ''[-]S+[.m...][s|ms|us]'' | ''[-][HH:]MM:SS[.m...]'' or ''[-]S+[.m...][s|ms|us]'' | ||
| Line 287: | 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 318: | 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 | ||