We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好!请教一下如题的问题。 #1实现过程: 我是摄像头拍一帧保存一帧YUV格式的图片,然后YUV图片转成.h264文件,再用ffmpeg将多个.h264文件concat成.h264视频。 #2YUV格式图片一些参数设置 fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; // 视频数据存储类型 V4L2_PIX_FMT_YUV420 fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420; fmt.fmt.pix.height = 480; fmt.fmt.pix.width = 640; //Images包含top和bottom field, 隔行交替,场序依赖于当前video的标准 fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; 帧率30。 #3 经过你的代码合成h264视频,输出信息。 root@ud710-ai:/home/unisoc/ruida/ko_camera/v4l2/h264# ffprobe -i output.h264 ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-yasm --enable-libx264 --enable-gpl --enable-pthreads --extra-cflags=-I/usr/local/x264/include --extra-ldflags=-L/usr/local/x264/lib --disable-x86asm libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, h264, from 'output.h264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x480, 30 fps, 30 tbr, 1200k tbn, 60 tbc
The text was updated successfully, but these errors were encountered:
其中avcodec_receive_packet(codecCtx, pkt):返回值is -11
Sorry, something went wrong.
其中avcodec_receive_packet(codecCtx, pkt):返回值is 0也不行
No branches or pull requests
你好!请教一下如题的问题。
#1实现过程:
我是摄像头拍一帧保存一帧YUV格式的图片,然后YUV图片转成.h264文件,再用ffmpeg将多个.h264文件concat成.h264视频。
#2YUV格式图片一些参数设置
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
// 视频数据存储类型 V4L2_PIX_FMT_YUV420
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420;
fmt.fmt.pix.height = 480;
fmt.fmt.pix.width = 640;
//Images包含top和bottom field, 隔行交替,场序依赖于当前video的标准
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
帧率30。
#3 经过你的代码合成h264视频,输出信息。
root@ud710-ai:/home/unisoc/ruida/ko_camera/v4l2/h264# ffprobe -i output.h264
ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-yasm --enable-libx264 --enable-gpl --enable-pthreads --extra-cflags=-I/usr/local/x264/include --extra-ldflags=-L/usr/local/x264/lib --disable-x86asm
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, h264, from 'output.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x480, 30 fps, 30 tbr, 1200k tbn, 60 tbc
The text was updated successfully, but these errors were encountered: