ffmpeg not generating palettes - ffmpeg

I downloaded ffmpeg and ran the command found in the documentation to generate palettes:
ffmpeg -i input.mkv -vf palettegen palette.png
The only difference being my input was input.mp4 instead of input.mkv.
No file gets generated. Here's the console output from PowerShell:
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp41isom
creation_time : 2018-11-23T23:27:38.000000Z
Duration: 00:00:09.98, start: 0.000000, bitrate: 2784 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 580x328 [SAR 1:1 DAR 145:82], 2699 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
Metadata:
creation_time : 2018-11-23T23:27:38.000000Z
handler_name : VideoHandler
encoder : AVC Coding
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 79 kb/s (default)
Metadata:
creation_time : 2018-11-23T23:27:38.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'palette.png':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp41isom
encoder : Lavf57.83.100
Stream #0:0(und): Video: png, rgba, 16x16 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
Metadata:
creation_time : 2018-11-23T23:27:38.000000Z
handler_name : VideoHandler
encoder : Lavc57.107.100 png
[Parsed_palettegen_0 # 00000296510def00] 255(+1) colors generated out of 285516 colors; ratio=0.000893
[Parsed_palettegen_0 # 00000296510def00] Dupped color: FF000001
Any ideas?

So I figured out that I had two versions of ffmpeg installed and the first one inside of Path was quite outdated. So I removed the older one and it worked just fine.

Related

ffmpeg: "stream specifier '' in filtergraph description matches no streams" during concatenation audio and video

I'm trying to concatenate video and audio files, filling space between them with black frames or silence correspondingly.
I use the following command:
ffmpeg -i test/v/1.mkv -i test/v/2.mkv -i test/v/1.mka -i test/v/2.mka -filter_complex 'color=c=black:s=640x480:d=12ms[black0];
color=c=black:s=640x480:d=207725ms[black2];
aevalsrc=0:d=257495ms[silence1];
aevalsrc=0:d=114833ms[silence2];
[black0][0][black2][1][2][silence1][3][silence2]concat=n=8:v=1:a=1[v_out][a_out]' \
-map [v_out] -map [a_out] -c:v libvpx -c:a libopus result.webm
But I get the following error:
Stream specifier '' in filtergraph description matches no streams.
Full ffmpeg output:
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, matroska,webm, from 'test/v/1.mkv':
Metadata:
encoder : GStreamer matroskamux version 1.8.1.1
creation_time : 2021-02-05T16:54:38.000000Z
Duration: 00:00:52.24, start: 0.637000, bitrate: 1922 kb/s
Stream #0:0(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 29.83 tbr, 1k tbn, 1k tbc (default)
Metadata:
title : Video
Input #1, matroska,webm, from 'test/v/2.mkv':
Metadata:
encoder : GStreamer matroskamux version 1.8.1.1
creation_time : 2021-02-05T16:58:58.000000Z
Duration: 00:02:07.19, start: 260.603000, bitrate: 1966 kb/s
Stream #1:0(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 29.83 tbr, 1k tbn, 1k tbc (default)
Metadata:
title : Video
Input #2, matroska,webm, from 'test/v/1.mka':
Metadata:
encoder : GStreamer matroskamux version 1.8.1.1
creation_time : 2021-02-05T16:55:58.000000Z
Duration: 00:00:02.44, start: 0.624000, bitrate: 80 kb/s
Stream #2:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Metadata:
title : Audio
Input #3, matroska,webm, from 'test/v/2.mka':
Metadata:
encoder : GStreamer matroskamux version 1.8.1.1
creation_time : 2021-02-05T16:59:01.000000Z
Duration: 00:00:12.40, start: 260.561000, bitrate: 43 kb/s
Stream #3:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Metadata:
title : Audio
Stream specifier '' in filtergraph description color=c=black:s=640x480:d=12ms[black0];
color=c=black:s=640x480:d=207725ms[black2];
aevalsrc=0:d=257495ms[silence1];
aevalsrc=0:d=114833ms[silence3];
[black0][0][black2][1][2][silence1][3][silence3]concat=n=8:v=1:a=1[v_out][a_out] matches no streams.
Video files do not contain audio.
What I'm doing wrong? Help please.

FFMPEG command not working on MP4 files as expected

I am trying to set the output time offset for mp4 file.
ffmpeg -ss 13.554000 -i input.mp4 -c copy -t 10 -output_ts_offset 13.554000 output.mp4
This code works for WEBM file as expected but not for MP4.
In webm it delays start time of video to the specified timestamp and duration is 23.554 but in mp4 it just cuts the video, start time is set to 0 and duration is 10
Cannot find what is problem.
ffmpeg -ss 12.960000 -i v.mp4 -c copy -t 10 -output_ts_offset 12.960000 output.mp4
ffmpeg version git-2019-12-26-b0d0d7e Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig
--enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis
--enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid
--enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf
libavutil 56. 37.100 / 56. 37.100
libavcodec 58. 65.100 / 58. 65.100
libavformat 58. 35.101 / 58. 35.101
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 69.101 / 7. 69.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'v.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01T00:00:00.000000Z
encoder : Lavf53.24.2
Duration: 00:00:29.57, start: 0.000000, bitrate: 1421 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1032 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.35.101
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1032 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 250 fps=0.0 q=-1.0 Lsize= 1687kB time=00:00:09.99 bitrate=1382.7kbits/s speed=2.21e+03x
video:1212kB audio:468kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.408804%```

FFMPEG - cut video result in longer cut

I'm trying to cut the last 8 seconds of a video I got; the problem is that ffmpeg is picking the last 10 seconds instead and I don't really know why. I checked and there is no offset between "0:00:00" and the effective start of the video, so why should it take more seconds?
this is my code:
ffmpeg.exe -ss 00:01:02 -i "F:\temp\input.mp4" -c copy -t 00:00:08 "D:\temp\1_output.mp4"
this is the output:
ffmpeg version N-90893-gcae6f806a6 Copyright (c) 2000-2018 the FFmpeg
developers built with gcc 7.3.0 (GCC) configuration: --enable-gpl
--enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 17.100 / 56. 17.100 libavcodec 58. 19.100 / 58. 19.100 libavformat 58. 13.100 / 58. 13.100 libavdevice 58. 4.100 /
4.100 libavfilter 7. 21.100 / 7. 21.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Input #0,
mov,mp4,m4a,3gp,3g2,mj2, from 'F:\temp\input.mp4': Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.13.100 Duration: 00:01:10.34, start: 0.000000, bitrate: 14542 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 576x1024, 14346 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)
Metadata:
handler_name : SoundHandler Output #0, mp4, to 'D:\temp\1_output.mp4': Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.13.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 576x1024, q=2-31, 14346 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc
(default)
Metadata:
handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)
Metadata:
handler_name : SoundHandler Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 252
fps=0.0 q=-1.0 Lsize= 3089kB time=00:00:07.99 bitrate=3164.7kbits/s
speed=1e+003x video:2841kB audio:240kB subtitle:0kB other
streams:0kB global headers:0kB muxing overhead: 0.283155%
I don't really understand what i'm doing wrong
Thanks
do not use "-c copy" it sucks up everything.
just try like this and you are good to go...
ffmpeg.exe -i "F:\temp\input.mp4" -ss 00:01:02 -to 00:01:10 "D:\temp\1_output.mp4"

How to use ffmpeg to copy streams and preserve format and metadata?

I have two files with multiple streams in each.
Output.mp4 has 2 streams: video and audio (streams 0,1)
Input.mp4 has 3 streams: video, audio and data (streams 0,1,2)
I need to add stream 2 from Input.mp4 to Output.mp4 yielding Final.mov.
I tried using this command but it does seem to preserve the format and metadata for the stream that is added:
ffmpeg -y -i Output.mp4 -i Input.mp4 -c copy -map 0:0 -map 0:1 -map 1:2 Final.mov
The output from ffmpeg seems to show that it is working but the format and metadata for the streams in the Final.mov is not correct.
I would appreciate any help with how to change the command to make it work.
Thank you!
Here is the command output:
ffmpeg -y -i Output.mp4 -i Input.mp4 -c copy -map 0:0 -map 0:1 -map 1:2 Final.mov
ffmpeg version N-84679-gd65b595 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 51.100 / 55. 51.100
libavcodec 57. 86.103 / 57. 86.103
libavformat 57. 67.100 / 57. 67.100
libavdevice 57. 3.101 / 57. 3.101
libavfilter 6. 78.100 / 6. 78.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Output.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2018-04-15T21:57:13.000000Z
Duration: 00:24:25.05, start: 0.000000, bitrate: 3571 kb/s
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 7680x3840 [SAR 1:1 DAR 2:1], 3252 kb/s, 1 fps, 1 tbr, 100k tbn, 2.15 tbc (default)
Metadata:
creation_time : 2018-04-15T21:57:13.000000Z
handler_name : Alias Data Handler
encoder : HEVC Coding
Side data:
stereo3d: 2D
spherical: equirectangular (0.000000/0.000000/0.000000)
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2018-04-15T21:57:13.000000Z
handler_name : Alias Data Handler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
creation_time : 2018-04-12T12:02:32.000000Z
make : Insta360
model : Insta360 Pro
encoder : Lavf57.71.100
description : {"info":{"gyro_stabilized":false,"initial_view_changed":false}}
Duration: 00:24:25.00, start: -0.004233, bitrate: 6394 kb/s
Stream #1:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv), 7680x3840, 6196 kb/s, 1 fps, 1 tbr, 360k tbn, 5 tbc (default)
Metadata:
creation_time : 2018-04-12T12:02:32.000000Z
handler_name : VideoHandler
Side data:
stereo3d: 2D
spherical: equirectangular (0.000000/0.000000/0.000000)
Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 4.0, fltp, 129 kb/s (default)
Metadata:
creation_time : 2018-04-12T12:02:32.000000Z
handler_name : SoundHandler
Stream #1:2(und): Data: none (camm / 0x6D6D6163), 36 kb/s
Metadata:
creation_time : 2018-04-12T12:02:32.000000Z
handler_name : CameraMetadataMotionHandler
Output #0, mov, to 'Final.mov':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
encoder : Lavf57.67.100
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 7680x3840 [SAR 1:1 DAR 2:1], q=2-31, 3252 kb/s, 1 fps, 1 tbr, 100k tbn, 100k tbc (default)
Metadata:
creation_time : 2018-04-15T21:57:13.000000Z
handler_name : Alias Data Handler
encoder : HEVC Coding
Side data:
stereo3d: 2D
spherical: equirectangular (0.000000/0.000000/0.000000)
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2018-04-15T21:57:13.000000Z
handler_name : Alias Data Handler
Stream #0:2(und): Data: none (camm / 0x6D6D6163), 36 kb/s
Metadata:
creation_time : 2018-04-12T12:02:32.000000Z
handler_name : CameraMetadataMotionHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
[mov # 0000000004894f00] Unknown hldr_type for camm / 0x6D6D6163, writing dummy valuesd= 629x
frame= 1465 fps=625 q=-1.0 Lsize= 650825kB time=00:24:24.98 bitrate=3639.3kbits/s speed= 625x
video:581593kB audio:56757kB subtitle:0kB other streams:6602kB global headers:0kB muxing overhead: 0.910633%
Here are the streams in the Final.mp4 file:
ffmpeg -i Final.mov
ffmpeg version N-84679-gd65b595 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 51.100 / 55. 51.100
libavcodec 57. 86.103 / 57. 86.103
libavformat 57. 67.100 / 57. 67.100
libavdevice 57. 3.101 / 57. 3.101
libavfilter 6. 78.100 / 6. 78.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 # 0000000002726860] overread end of atom 'stsd' by 2974416 bytes
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Final.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf57.67.100
Duration: 00:24:25.00, start: 0.000000, bitrate: 3639 kb/s
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 7680x3840 [SAR 1:1 DAR 2:1], 3252 kb/s, 1 fps, 1 tbr, 100k tbn, 2.15 tbc (default)
Metadata:
handler_name : DataHandler
encoder : HEVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:2(eng): Data: none (stts / 0x73747473), 36 kb/s
Metadata:
handler_name : DataHandler

FFMPEG change audio channel tag for MOV file

I am having difficulty renaming audio stream on MOV (works fine on MP4).
As you can see during the run it shows expected result - audio stream 2 labelled as 'div', but when I check using ffprobe all the streams are labelled 'eng'.
Below is the code that I use.
PS C:\Tools\ffmpeg-20160224-git-10fa50c-win64-static\bin> .\ffmpeg.exe -i C:\Users\dan\Downloads\IceRoadDVTest2.mov -vcodec copy -acodec copy -map 0:v:0 -map 0:a:0 -map 0:a:1 -metadata:s:a:1 language=div -qp 0 TEST2_copy.mov
ffmpeg version N-78646-g10fa50c Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab
le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena
ble-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 24.106 / 57. 24.106
libavformat 57. 26.100 / 57. 26.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 35.100 / 6. 35.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Guessed Channel Layout for Input Stream #0.2 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\dan\Downloads\IceRoadDVTest2.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2015-04-23 16:12:25
com.apple.finalcutstudio.media.uuid: 34E5E804-CFCA-47F4-9F88-38A1AF158F12
Duration: 00:01:00.29, start: 0.000000, bitrate: 53086 kb/s
Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5b / 0x62356478), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 49997 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)
Metadata:
creation_time : 2015-04-23 16:12:25
handler_name : Apple Alias Data Handler
encoder : XDCAM HD422 1080i60 (50 Mb/s)
timecode : 00:00:00;00
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
creation_time : 2015-04-23 16:12:25
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
creation_time : 2015-04-23 16:12:25
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2015-04-23 16:12:42
handler_name : Apple Alias Data Handler
timecode : 00:00:00;00
Output #0, mov, to 'TEST2_copy.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
com.apple.finalcutstudio.media.uuid: 34E5E804-CFCA-47F4-9F88-38A1AF158F12
encoder : Lavf57.26.100
Stream #0:0(eng): Video: mpeg2video (xd5b / 0x62356478), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 49997 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 2997 tbc (default)
Metadata:
creation_time : 2015-04-23 16:12:25
handler_name : Apple Alias Data Handler
encoder : XDCAM HD422 1080i60 (50 Mb/s)
timecode : 00:00:00;00
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, 1536 kb/s (default)
Metadata:
creation_time : 2015-04-23 16:12:25
handler_name : Apple Alias Data Handler
Stream #0:2(div): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, 1536 kb/s (default)
Metadata:
creation_time : 2015-04-23 16:12:25
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame= 1807 fps=0.0 q=-1.0 Lsize= 390647kB time=00:01:00.29 bitrate=53076.7kbits/s speed=99.2x
video:367986kB audio:22610kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013180%
PS C:\Tools\ffmpeg-20160224-git-10fa50c-win64-static\bin> .\ffprobe.exe .\TEST2_copy.mov
ffprobe version N-78646-g10fa50c Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab
le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena
ble-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 24.106 / 57. 24.106
libavformat 57. 26.100 / 57. 26.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 35.100 / 6. 35.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\TEST2_copy.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf57.26.100
Duration: 00:01:00.29, start: 0.000000, bitrate: 53076 kb/s
Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5b / 0x62356478), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 49997 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : DataHandler
encoder : XDCAM HD422 1080i60 (50 Mb/s)
timecode : 00:00:00;00
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
Metadata:
handler_name : DataHandler
timecode : 00:00:00;00
Unsupported codec with id 0 for input stream 3

Resources