ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 6440|回复: 6

[Android] 各位师兄弟 加水印 输入文件没有pix_fmt 怎么写命令行?谢..

[复制链接]
发表于 2016-11-5 11:06:40 | 显示全部楼层 |阅读模式
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.6 (GCC) 20120106 (prerelease)
  configuration: --target-os=linux --prefix=../android-lib-ff-full --enable-cross-compile --enable-runtime-cpudetect --disable-asm --arch=arm --cc=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --cross-prefix=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --disable-stripping --nm=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm --sysroot=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/platforms/android-8/arch-arm --enable-gpl --enable-shared --disable-static --enable-nonfree --enable-version3 --enable-small --disable-vda --disable-iconv --enable-libx264 --enable-libfaac --enable-encoder=libx264 --enable-encoder=libfaac --enable-zlib --disable-ffprobe --disable-ffplay --disable-ffmpeg --disable-ffserver --disable-debug --extra-cflags='-I ../android-lib/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a' --extra-ldflags='-L ../android-lib/lib'
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input file with argument '/storage/emulated/0/watermark/2016110490884.mp4'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'movie=/storage/emulated/0/watermark/my_logo.png[watermark];[a][watermark]overlay=109:282[out]'.
Reading option '/storage/emulated/0/watermark/20165105829.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file /storage/emulated/0/watermark/2016110490884.mp4.
Successfully parsed a group of options.
Opening an input file: /storage/emulated/0/watermark/2016110490884.mp4.
Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
ISO: File Type Major Brand: isom
Before avformat_find_stream_info() pos: 14220513 bytes read:153181 seeks:1
max_analyze_duration 5000000 reached at 5015510 microseconds
Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 640x360, 513 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
After avformat_find_stream_info() pos: 41894 bytes read:218717 seeks:2 frames:110
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/watermark/2016110490884.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.25.101
    comment         : Converted_by_bytedance
  Duration: 00:03:22.01, start: 0.008984, bitrate: 563 kb/s
    Stream #0:0(und), 0, 1/12800: Video: h264 (avc1 / 0x31637661), none, 640x360, 513 kb/s, 25 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 110, 1/44100: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output file /storage/emulated/0/watermark/20165105829.mp4.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vf (set video filters) with argument movie=/storage/emulated/0/watermark/my_logo.png[watermark];[a][watermark]overlay=109:282[out].
Applying option pix_fmt (set pixel format) with argument yuv420p.
Successfully parsed a group of options.
Opening an output file: /storage/emulated/0/watermark/20165105829.mp4.
Successfully opened the file.
Setting 'filename' to value '/storage/emulated/0/watermark/my_logo.png'
Format png_pipe probed with size=2048 and score=99
Before avformat_find_stream_info() pos: 0 bytes read:6982 seeks:0
After avformat_find_stream_info() pos: 6982 bytes read:6982 seeks:0 frames:1
seek_point:0 format_namenull) file_name:/storage/emulated/0/watermark/my_logo.png stream_index:-1
Setting 'x' to value '109'
Setting 'y' to value '282'
Setting 'video_size' to value '640x360'
Setting 'pix_fmt' to value '-1'
Unable to parse option value "-1" as pixel format
Setting 'time_base' to value '1/12800'
Setting 'pixel_aspect' to value '0/1'
Setting 'sws_param' to value 'flags=2'
Setting 'frame_rate' to value '25/1'
Unable to parse option value "-1" as pixel format
Error setting option pix_fmt to value -1.
Error applying options to the filter.
Error opening filters!
CALLED CLEAN UP!!!
Statistics: 6982 bytes read, 0 seeks
Statistics: 0 seeks, 0 writeouts
Statistics: 218717 bytes read, 2 seeks
Quit at 1

回复

使用道具 举报

 楼主| 发表于 2016-11-5 11:19:19 | 显示全部楼层
Duration: 00:03:22.01, start: 0.008984, bitrate: 563 kb/s
    Stream #0:0(und), 0, 1/12800: Video: h264 (avc1 / 0x31637661), none, 640x360, 513 kb/s, 25 fps, 25 tbr, 12800 tbn, 25600 tbc (default)

Setting 'pix_fmt' to value '-1'
Unable to parse option value "-1" as pixel format
回复 支持 反对

使用道具 举报

发表于 2016-11-5 21:02:25 | 显示全部楼层
加个参数 -pix_fmt yuv420p
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-11-10 23:10:01 | 显示全部楼层
ffmpeg -y -i /storage/emulated/0/watermark/2016110490884.mp4 -pix_fmt yuv420p -acodec copy -vf movie=/storage/emulated/0/watermark/my_logo.png[watermark];[a][watermark]overlay=138:282[out] /storage/emulated/0/watermark/201610230920.mp4
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-11-10 23:10:55 | 显示全部楼层
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.6 (GCC) 20120106 (prerelease)
  configuration: --target-os=linux --prefix=../android-lib-ff-full --enable-cross-compile --enable-runtime-cpudetect --disable-asm --arch=arm --cc=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --cross-prefix=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --disable-stripping --nm=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm --sysroot=/home/leixiaohua1020/cdtworkspace/android-ndk-r9d/platforms/android-8/arch-arm --enable-gpl --enable-shared --disable-static --enable-nonfree --enable-version3 --enable-small --disable-vda --disable-iconv --enable-libx264 --enable-libfaac --enable-encoder=libx264 --enable-encoder=libfaac --enable-zlib --disable-ffprobe --disable-ffplay --disable-ffmpeg --disable-ffserver --disable-debug --extra-cflags='-I ../android-lib/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a' --extra-ldflags='-L ../android-lib/lib'
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input file with argument '/storage/emulated/0/watermark/2016110490884.mp4'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'movie=/storage/emulated/0/watermark/my_logo.png[watermark];[a][watermark]overlay=138:282[out]'.
Reading option '/storage/emulated/0/watermark/201610230650.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file /storage/emulated/0/watermark/2016110490884.mp4.
Successfully parsed a group of options.
Opening an input file: /storage/emulated/0/watermark/2016110490884.mp4.
Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
ISO: File Type Major Brand: isom
Before avformat_find_stream_info() pos: 14220513 bytes read:153181 seeks:1
max_analyze_duration 5000000 reached at 5015510 microseconds
Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 640x360, 513 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
After avformat_find_stream_info() pos: 41894 bytes read:218717 seeks:2 frames:110
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/watermark/2016110490884.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.25.101
    comment         : Converted_by_bytedance
  Duration: 00:03:22.01, start: 0.008984, bitrate: 563 kb/s
    Stream #0:0(und), 0, 1/12800: Video: h264 (avc1 / 0x31637661), none, 640x360, 513 kb/s, 25 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 110, 1/44100: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output file /storage/emulated/0/watermark/201610230650.mp4.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vf (set video filters) with argument movie=/storage/emulated/0/watermark/my_logo.png[watermark];[a][watermark]overlay=138:282[out].
Successfully parsed a group of options.
Opening an output file: /storage/emulated/0/watermark/201610230650.mp4.
Successfully opened the file.
Setting 'filename' to value '/storage/emulated/0/watermark/my_logo.png'
Format png_pipe probed with size=2048 and score=99
Before avformat_find_stream_info() pos: 0 bytes read:8397 seeks:0
After avformat_find_stream_info() pos: 8397 bytes read:8397 seeks:0 frames:1
seek_point:0 format_namenull) file_name:/storage/emulated/0/watermark/my_logo.png stream_index:-1
Setting 'x' to value '138'
Setting 'y' to value '282'
Setting 'video_size' to value '640x360'
Setting 'pix_fmt' to value '-1'
Unable to parse option value "-1" as pixel format
Setting 'time_base' to value '1/12800'
Setting 'pixel_aspect' to value '0/1'
Setting 'sws_param' to value 'flags=2'
Setting 'frame_rate' to value '25/1'
Unable to parse option value "-1" as pixel format
Error setting option pix_fmt to value -1.
Error applying options to the filter.
Error opening filters!
CALLED CLEAN UP!!!
Statistics: 8397 bytes read, 0 seeks
Statistics: 0 seeks, 0 writeouts
Statistics: 218717 bytes read, 2 seeks
Quit at 1
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-11-10 23:11:38 | 显示全部楼层
大师兄,命令行哪里写错了?
回复 支持 反对

使用道具 举报

发表于 2016-11-11 10:04:38 | 显示全部楼层
Setting 'pix_fmt' to value '-1'
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-12-27 13:14 , Processed in 0.047667 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表