Guest User

Untitled

a guest
Feb 22nd, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. export LD_LIBRARY_PATH=/opt/ffmpeg/lib/
  2. /opt/ffmpeg/bin/ffmpeg -i "/home/luoy/Videos/芳华.2017.TC720P独家高清中字.mp4" -ss 00:00:00 -t 00:00:01 -f image2 -y "./2_%04d.bmp"
  3. ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  4. built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.6) 20160609
  5. configuration: --enable-debug --enable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg
  6. libavutil 55. 78.100 / 55. 78.100
  7. libavcodec 57.107.100 / 57.107.100
  8. libavformat 57. 83.100 / 57. 83.100
  9. libavdevice 57. 10.100 / 57. 10.100
  10. libavfilter 6.107.100 / 6.107.100
  11. libavresample 3. 7. 0 / 3. 7. 0
  12. libswscale 4. 8.100 / 4. 8.100
  13. libswresample 2. 9.100 / 2. 9.100
  14. libpostproc 54. 7.100 / 54. 7.100
  15. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/luoy/Videos/芳华.2017.TC720P独家高清中字.mp4':
  16. Metadata:
  17. major_brand : isom
  18. minor_version : 1
  19. compatible_brands: isomavc1
  20. creation_time : 2017-12-15T16:28:00.000000Z
  21. encoder : Lite MP4 Tool v2.3
  22. Duration: 02:09:09.24, start: 0.000000, bitrate: 1587 kb/s
  23. Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720, 1456 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
  24. Metadata:
  25. creation_time : 2017-12-15T16:28:00.000000Z
  26. handler_name : Imported with GPAC 0.4.6-DEV (internal rev. 5)
  27. Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
  28. Metadata:
  29. creation_time : 2017-12-15T16:28:45.000000Z
  30. handler_name : GPAC ISO Audio Handler
  31. Stream mapping:
  32. Stream #0:0 -> #0:0 (h264 (native) -> bmp (native))
  33. Press [q] to stop, [?] for help
  34. Output #0, image2, to './2_%04d.bmp':
  35. Metadata:
  36. major_brand : isom
  37. minor_version : 1
  38. compatible_brands: isomavc1
  39. encoder : Lavf57.83.100
  40. Stream #0:0(und): Video: bmp, bgr24, 1280x720, q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
  41. Metadata:
  42. creation_time : 2017-12-15T16:28:00.000000Z
  43. handler_name : Imported with GPAC 0.4.6-DEV (internal rev. 5)
  44. encoder : Lavc57.107.100 bmp
  45. frame= 24 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A dup=1 drop=0 speed= 5.6x
  46. video:64801kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
  47.  
  48. #include "libavcodec/avcodec.h"
  49. #include "libavformat/avformat.h"
  50. #include <stdio.h>
  51. #include <stdarg.h>
  52. #include <stdlib.h>
  53. #include <string.h>
  54. #include <inttypes.h>
  55. #include <errno.h>
  56. #include <stddef.h>
  57. #include "libavutil/error.h"
  58. int main(int argc, const char *argv[])
  59. {
  60. av_register_all();
  61. int response = 0;
  62. char *pchar;
  63. // pchar = av_err2str(response);
  64. return 0;
  65. }
  66.  
  67. gcc -g -Wall -o build/hello_world -lz 0_hello_world.c
  68. -lavformat -lavcodec -lswscale
  69. -I/opt/ffmpeg/include -L/opt/ffmpeg/lib
  70.  
  71. gcc -g -Wall -o build/hello_world -lz 0_hello_world.c
  72. -lavformat -lavcodec -lswscale
  73. -I/opt/ffmpeg/include -L/opt/ffmpeg/lib
  74. 0_hello_world.c: In function ‘main’:
  75. 0_hello_world.c:16:9: warning: variable ‘pchar’ set but not used [-Wunused-but-set-variable]
  76. char *pchar;
  77. ^
  78. /usr/bin/ld: /tmp/ccgJJ9CV.o: undefined reference to symbol 'av_strerror@@LIBAVUTIL_55'
  79. /opt/ffmpeg/lib/libavutil.so.55: error adding symbols: DSO missing from command line
  80. collect2: error: ld returned 1 exit status
  81. Makefile:10: recipe for target 'hello_world' failed
  82. make: *** [hello_world] Error 1
  83.  
  84. $ echo $LD_LIBRARY_PATH
  85. /opt/ffmpeg/lib:
Add Comment
Please, Sign In to add comment