[FFmpeg-user] Tag mp4s incompatible with output codec ?

DopeLabs dopelabs at dubstep.fm
Sat Jun 2 15:58:36 EEST 2018


using -map 0 produced the following error

[mp4 @ 0x7ff51b806e00] Tag mp4s incompatible with output codec id '0' ([0][0][0][0])
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Error initializing output stream 0:1 --
[libfdk_aac @ 0x7ff51b802e00] 2 frames left in the queue on closing
Conversion failed!

removed -map 0 and ran again.. then got the error

Unrecognized option 'ns'.
Error splitting the argument list: Option not found

removed -ns

then removed the following options as ffmpeg seemed to output the same without them

-c:s copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a

used -c:a copy since the input is already aac and at 96k... if you still really want to transcode it to 128k you can, but your still hearing 96k audio.

added -to 00:01:00.000 for the purposes of making a 1 minute preview for you, and renamed the input and output file names for cleanliness 


behold:

https://www.dlnetworks.net/ffmpeg/output.mp4

$ ffmpeg -i input.mp4 -c:a copy -c:v hevc -preset faster -vtag hvc1 -crf 25 -profile:v main -x265-params 'me=umh:subme=5:ref=4:aq-mode=2:aq-strength=1.0:psy-rd=2.0:psy-rdoq=1.0:rd=6:log-level=1' -to 00:01:00.000 -f mp4 output.mp4

ffmpeg version N-90287-g43205df645 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-libmp3lame --enable-opencl --enable-audiotoolbox --enable-videotoolbox --enable-libx265 --enable-libx264 --enable-libxvid --enable-libfdk-aac --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-nonfree --enable-gpl --enable-libass --enable-swscale --enable-avfilter --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-avresample --enable-libsoxr --enable-libspeex --enable-libcaca --enable-opengl
  libavutil      56.  9.100 / 56.  9.100
  libavcodec     58. 14.100 / 58. 14.100
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2017-11-09T15:56:49.000000Z
    compilation     : 0
    encoder         : Sorenson Squeeze
  Duration: 00:26:06.00, start: 0.000000, bitrate: 5280 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      creation_time   : 2017-11-09T15:56:49.000000Z
      handler_name    : soun
    Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown), 1920x1080, 5002 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2017-11-09T15:56:49.000000Z
      handler_name    : vide
      encoder         : AVC Coding
    Stream #0:2(und): Data: none (mp4s / 0x7334706D) (default)
    Metadata:
      creation_time   : 2017-11-09T15:56:58.000000Z
      handler_name    : sdsm
    Stream #0:3(und): Data: none (mp4s / 0x7334706D) (default)
    Metadata:
      creation_time   : 2017-11-09T15:56:58.000000Z
      handler_name    : odsm
    Stream #0:4(eng): Data: none (rtp  / 0x20707472), 13 kb/s
    Metadata:
      creation_time   : 2017-11-10T15:56:58.000000Z
    Stream #0:5(eng): Data: none (rtp  / 0x20707472), 162 kb/s
    Metadata:
      creation_time   : 2017-11-10T15:57:00.000000Z
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> hevc (libx265))
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    compilation     : 0
    encoder         : Lavf58.10.100
    Stream #0:0(und): Video: hevc (libx265) (hvc1 / 0x31637668), yuv420p, 1920x1080, q=2-31, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2017-11-09T15:56:49.000000Z
      handler_name    : vide
      encoder         : Lavc58.14.100 libx265
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      creation_time   : 2017-11-09T15:56:49.000000Z
      handler_name    : soun
frame= 1500 fps= 10 q=-0.0 Lsize=    6264kB time=00:00:59.97 bitrate= 855.6kbits/s speed=0.408x
video:5509kB audio:704kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.829822%



> On Jun 1, 2018, at 2:19 06AM, Gabriel Zachmann <zach at informatik.uni-bremen.de> wrote:
> 
> Thanks a lot for your response.
> 
>>> Could that have any negative side effects when I try to convert some other movies?
>> 
>> It depends. If video editing was simple, it wouldn't require complex
>> tools. ;-)
>> 
>> In your case, my guess is that ffmpeg is unable to mux all the data
>> streams. If you use "map 0 -sn", ffmpeg should omit them.
> 
> I have just checked; IIUC, -sn would omit the subtitles in the output - is that correct?
> 
> OTOH, as far as I can see, the video does not have any subtitles.
> 
> 
> cgvr-8: zach/Downloads% ffprobe Neuroscience\ of\ VR,\ Congruency,\ pain\ distraction,\ presence,\ Enfacement\ effect,\ rubber\ hand,\ tools\ as\ part\ of\ the\ body,\ redirected\ walking\ -\ Bruno\ Herbelin,\ CERN,\ 2017.mp4
> ffprobe version N-87824-g25bd2f4 Copyright (c) 2007-2017 the FFmpeg developers
>  built with Apple LLVM version 9.0.0 (clang-900.0.37)
>  configuration: --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --enable-audiotoolbox --enable-sdl2 --enable-shared --enable-pthreads --enable-videotoolbox --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --extra-ldflags='-L /opt/local/lib -framework CoreVideo -lfribidi' --extra-cflags='-I /opt/local/include/ -framework CoreVideo'
>  libavutil      55. 79.100 / 55. 79.100
>  libavcodec     57.108.100 / 57.108.100
>  libavformat    57. 84.100 / 57. 84.100
>  libavdevice    57. 11.100 / 57. 11.100
>  libavfilter     6.108.100 /  6.108.100
>  libavresample   3.  8.  0 /  3.  8.  0
>  libswscale      4.  9.100 /  4.  9.100
>  libswresample   2. 10.100 /  2. 10.100
>  libpostproc    54.  8.100 / 54.  8.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Neuroscience of VR, Congruency, pain distraction, presence, Enfacement effect, rubber hand, tools as part of the body, redirected walking - Bruno Herbelin, CERN, 2017.mp4':
>  Metadata:
>    major_brand     : mp42
>    minor_version   : 0
>    compatible_brands: mp42isomavc1
>    creation_time   : 2017-11-09T15:56:49.000000Z
>    compilation     : 0
>    encoder         : Sorenson Squeeze
>  Duration: 00:26:06.00, start: 0.000000, bitrate: 5280 kb/s
>    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
>    Metadata:
>      creation_time   : 2017-11-09T15:56:49.000000Z
>      handler_name    : soun
>    Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown), 1920x1080, 5002 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
>    Metadata:
>      creation_time   : 2017-11-09T15:56:49.000000Z
>      handler_name    : vide
>      encoder         : AVC Coding
>    Stream #0:2(und): Data: none (mp4s / 0x7334706D) (default)
>    Metadata:
>      creation_time   : 2017-11-09T15:56:58.000000Z
>      handler_name    : sdsm
>    Stream #0:3(und): Data: none (mp4s / 0x7334706D) (default)
>    Metadata:
>      creation_time   : 2017-11-09T15:56:58.000000Z
>      handler_name    : odsm
>    Stream #0:4(eng): Data: none (rtp  / 0x20707472), 13 kb/s
>    Metadata:
>      creation_time   : 2017-11-10T15:56:58.000000Z
>    Stream #0:5(eng): Data: none (rtp  / 0x20707472), 162 kb/s
>    Metadata:
>      creation_time   : 2017-11-10T15:57:00.000000Z
> Unsupported codec with id 0 for input stream 2
> Unsupported codec with id 0 for input stream 3
> Unsupported codec with id 0 for input stream 4
> Unsupported codec with id 0 for input stream 5
> 
> 
> I have also tried your suggestions, like this:
> 
> % ffmpeg -nostats -nostdin -i "Neuroscience of VR, Congruency, pain distraction, presence, Enfacement effect, rubber hand, tools as part of the body, redirected walking - Bruno Herbelin, CERN, 2017.mp4" -map 0 -ns -c:s copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -c:a aac -b:a 128k -codec:v hevc -tag:v hvc1 -preset faster -crf 25 -ns -x265-params "profile=main:me=umh:subme=5:ref=4:aq-mode=2:aq-strength=1.0:psy-rd=2.0:psy-rdoq=1.0:rd=6:log-level=1" -f mp4 "Neuroscience of VR, Congruency, pain distraction, presence, Enfacement effect, rubber hand, tools as part of the body, redirected walking - Bruno Herbelin, CERN, 2017.mp4_converting"
> ffmpeg version N-87824-g25bd2f4 Copyright (c) 2000-2017 the FFmpeg developers
>  built with Apple LLVM version 9.0.0 (clang-900.0.37)
>  configuration: --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --enable-audiotoolbox --enable-sdl2 --enable-shared --enable-pthreads --enable-videotoolbox --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --extra-ldflags='-L /opt/local/lib -framework CoreVideo -lfribidi' --extra-cflags='-I /opt/local/include/ -framework CoreVideo'
>  libavutil      55. 79.100 / 55. 79.100
>  libavcodec     57.108.100 / 57.108.100
>  libavformat    57. 84.100 / 57. 84.100
>  libavdevice    57. 11.100 / 57. 11.100
>  libavfilter     6.108.100 /  6.108.100
>  libavresample   3.  8.  0 /  3.  8.  0
>  libswscale      4.  9.100 /  4.  9.100
>  libswresample   2. 10.100 /  2. 10.100
>  libpostproc    54.  8.100 / 54.  8.100
> Unrecognized option 'ns'.
> Error splitting the argument list: Option not found
> 
> 
> I must be using the option -sn wrongly.  What is the correct way?
> 
> 
>> BTW:
>>> [libx265 @ 0x7fef4901c800] Unknown option: profile.
>> 
>> Do read all of your warnings please. (I'm too lazy to check:
>> "-profile:v" should do the trick for you.)
> 
> Thanks a lot for the hint.  I tried this :
> 
> % ffmpeg -i "Neuroscience of VR, Congruency, pain distraction, presence, Enfacement effect, rubber hand, tools as part of the body, redirected walking - Bruno Herbelin, CERN, 2017.mp4" -map 0 -c:s copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -c:a aac -b:a 128k -codec:v hevc -tag:v hvc1 -preset faster -crf 25 -profile:v main -x265-params "me=umh:subme=5:ref=4:aq-mode=2:aq-strength=1.0:psy-rd=2.0:psy-rdoq=1.0:rd=6:log-level=1" -f mp4 "Neuroscience of VR, Congruency, pain distraction, presence, Enfacement effect, rubber hand, tools as part of the body, redirected walking - Bruno Herbelin, CERN, 2017.mp4_converting"
> 
> But I get the error message 
> 
> [libx265 @ 0x7fbae600ce00] Unable to parse option value "main"
> 
> 
> Maybe, I've got an older version of ffmpeg.
> 
> 
> Best regards, Gabriel
> 
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list