Newest 'x264' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/x264

Les articles publiés sur le site

  • OpenCV 3.4.3 - GStream not called when VideoWriting

    14 décembre 2018, par taubhi

    I'd like to succeed writing a file with OpenCV encoding with GStreamer.

    Thus I'm using the code :

    VideoWriter.open("appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=test2.mkv sync=false",
    //cv::CAP_GSTREAMER, //set or not, I get the same problem
    0, (double)25, //fourcc, fps
    cv::Size(1024, 1024), 
    true);
    

    And my problem :

    A video file called appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=test2.mkv sync=false is created (rather than test2.mkv), and it is empty. The same problem is corrected and seems to work in the following thread, without any effect for me : Opening a GStreamer pipeline from OpenCV with VideoWriter

    I tried, without success :

    • Add quotes to the file name test2 : "appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=\"test2.mkv\" sync=false" neither
    • Encode with different format : .flv rather than .mkv
    • Encode with different codec : omxh265enc rather than omxh264en

    I checked :

    • That GStreamer is well compiled with OpenCV ; the CMake of the OpenCV project outputs :

      Video I/O:Video for Windows: YES DC1394: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: YES (ver 3.7.0) GStreamer:

      base: YES (ver 1.0)

      video: YES (ver 1.0)

      app: YES (ver 1.0)

      riff: YES (ver 1.0)

      pbutils: YES (ver 1.0)

      DirectShow: YES

      Media Foundation: YES

    • That FFMpeg is installed on my computer ; for this I used VLC :

      File -> Stream -> Add a file then stream New destination : RTP/MPEG Transport Stream Profile : Video - H.264 + MP3 (MP4) Then no error happens ; Note : an error occured with Video - H.265 + MP3 (MP4), but I'm using omxh264enc in my code, not 265

    I'm struggled :/ Do you have any idea ? Thanks a lot :)

    Have a good day,

    Thibaut

    PS - Complete OpenCV CMake output :

    Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.17763.
    AVX_512F is not supported by C++ compiler
    
    AVX512_SKX is not supported by C++ compiler
    
    Dispatch optimization AVX512_SKX is not available, skipped
    
    libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-3.4.3-libjpeg-turbo
    
    Looking for Mfapi.h
    
    Looking for Mfapi.h - found
    
    found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
    
    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippicv_win
    
    found Intel IPP IW sources: 2017.0.3
    
    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippiw_win
    
    CUDA detected: 9.2
    
    CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-D_FORCE_INLINES
    
    Found apache ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (1.8.2)
    
    Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
    
    VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
    
    Caffe: NO
    
    Protobuf: NO
    
    Glog: YES
    
    freetype2: NO
    
    harfbuzz: NO
    
    Module opencv_ovis disabled because OGRE3D was not found
    
    No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
    
    Found installed version of gflags: E:/Git/gflags/BUILD-VS2015
    
    Detected gflags version: 2.2.1
    
    Checking SFM deps... FALSE
    
    Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
    
    Excluding from source files list: /modules/dnn/layers/layers_common.avx512_skx.cpp
    
    Tesseract: NO
    
    
    General configuration for OpenCV 3.4.3 =====================================
    
    Version control: unknown
    
    
    Extra modules:
    
    Location (extra): E:/OpenCV/3.4.3/opencv_contrib-3.4.3/modules
    
    Version control (extra): unknown
    
    
    Platform:
    
    Timestamp: 2018-11-07T16:57:18Z
    
    Host: Windows 10.0.17763 AMD64
    
    CMake: 3.12.0-rc2
    
    CMake generator: Visual Studio 14 2015 Win64
    
    CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
    
    MSVC: 1900
    
    
    CPU/HW features:
    
    Baseline: SSE SSE2 SSE3
    
    requested: SSE3
    
    Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
    
    requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
    
    SSE4_1 (5 files): + SSSE3 SSE4_1
    
    SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2
    
    FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
    
    AVX (6 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
    
    AVX2 (11 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
    
    
    C/C++:
    
    Built as dynamic libs?: YES
    
    C++11: YES
    
    C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24215.1)
    
    C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP16 /MD /O2 /Ob2 /DNDEBUG
    
    C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP16 /MDd /Zi /Ob0 /Od /RTC1
    
    C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
    
    C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP16 /MD /O2 /Ob2 /DNDEBUG
    
    C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP16 /MDd /Zi /Ob0 /Od /RTC1
    
    Linker flags (Release): /machine:x64 /INCREMENTAL:NO
    
    Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
    
    ccache: NO
    
    Precompiled headers: YES
    
    Extra dependencies: cudart.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/lib/x64
    
    3rdparty dependencies:
    
    
    OpenCV modules:
    
    To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dpm face features2d flann fuzzy hfs highgui img_hash imgcodecs imgproc java java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python_bindings_generator reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
    
    Disabled: js world
    
    Disabled by dependency: -
    
    Unavailable: cnn_3dobj cvv freetype hdf matlab ovis python2 python3 sfm viz
    
    Applications: tests perf_tests apps
    
    Documentation: NO
    
    Non-free algorithms: NO
    
    
    Windows RT support: NO
    
    
    GUI:
    
    Win32 UI: YES
    
    VTK support: NO
    
    
    Media I/O:
    
    ZLib: build (ver 1.2.11)
    
    JPEG: build-libjpeg-turbo (ver 1.5.3-62)
    
    WEBP: build (ver encoder: 0x020e)
    
    PNG: build (ver 1.6.34)
    
    TIFF: build (ver 42 - 4.0.9)
    
    JPEG 2000: build (ver 1.900.1)
    
    OpenEXR: build (ver 1.7.1)
    
    HDR: YES
    
    SUNRASTER: YES
    
    PXM: YES
    
    
    Video I/O:
    
    Video for Windows: YES
    
    DC1394: NO
    
    FFMPEG: YES (prebuilt binaries)
    
    avcodec: YES (ver 57.107.100)
    
    avformat: YES (ver 57.83.100)
    
    avutil: YES (ver 55.78.100)
    
    swscale: YES (ver 4.8.100)
    
    avresample: YES (ver 3.7.0)
    
    GStreamer:
    
    base: YES (ver 1.0)
    
    video: YES (ver 1.0)
    
    app: YES (ver 1.0)
    
    riff: YES (ver 1.0)
    
    pbutils: YES (ver 1.0)
    
    DirectShow: YES
    
    Media Foundation: YES
    
    
    Parallel framework: Concurrency
    
    
    Trace: YES (with Intel ITT)
    
    
    Other third-party libraries:
    
    Intel IPP: 2017.0.3 [2017.0.3]
    
    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippicv_win
    
    Intel IPP IW: sources (2017.0.3)
    
    at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippiw_win
    
    Custom HAL: NO
    
    Protobuf: build (3.5.1)
    
    
    NVIDIA CUDA: YES (ver 9.2, CUFFT CUBLAS NVCUVID)
    
    NVIDIA GPU arch: 30 35 37 50 52 60 61 70
    
    NVIDIA PTX archs:
    
    
    OpenCL: YES (no extra features)
    
    Include path: E:/OpenCV/3.4.3/opencv-3.4.3/3rdparty/include/opencl/1.2
    
    Link libraries: Dynamic load
    
    
    Python (for build): C:/ProgramData/Miniconda3/python.exe
    
    
    Java:
    
    ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (ver 1.8.2)
    
    JNI: C:/NVPACK/jdk1.8.0_77/include C:/NVPACK/jdk1.8.0_77/include/win32 C:/NVPACK/jdk1.8.0_77/include
    
    Java wrappers: YES
    
    Java tests: YES
    
    
    Matlab: NO
    
    
    Install to: E:/OpenCV/3.4.3/build/install
    
    -----------------------------------------------------------------
    
    
    Configuring done
    
  • ffmpeg does not produce smooth videos from mkv h265 [migrated]

    13 décembre 2018, par user3776738

    It's kind of subjective, but I'm not able to produce 100% smooth videos with ffmpeg. As input I use https://www.libde265.org/hevc-bitstreams/tos-1720x720-cfg01.mkv as a example.This is a h264 mkv video which is running really badly with my vlc player on my win7 laptop.Converting it to a h264 video let it play much better, but it still appears not to be 100% smooth. Especialy in Vegas 9 it even hangs like once a second.

    Other h264 videos even with 1080p or bigger run perfect with vlc and much better with Vegas, so it is not my laptop.

    its seems that there can be a lot of differences between h264 and h264?? what could i try to make them more smooth?

    I'm using following command to convert the video:

    ffmpeg.exe -i INPUT_FILE -ac 2 -vf scale=trunc\\(oh*a/2\\)*2:480 -c:v libx264 -sn -dn -map_metadata -1 -map_chapters -1 -profile:v high -level:v 4.0 -pix_fmt yuv420p OUTPUT_FILE  
    
  • Libsourcey : webrtcrecorder.mp4 file is not generated

    5 décembre 2018, par Iranna Pattar

    I am running WebRTC Native Video Recorder demo Application, but webrtcrecorder.mp4 file is not generated. As I have gone through some question and answers but unable to find the answer. I am getting some error

    here is the command of cmake

    cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_SHARED_LIBS=OFF     -DBUILD_MODULES=OFF    -DBUILD_APPLICATIONS=OFF \
       -DBUILD_SAMPLES=ON         -DBUILD_TESTS=OFF         -DWITH_WEBRTC=ON -DWITH_FFMPEG=ON    -DBUILD_MODULE_base=ON \
       -DBUILD_MODULE_crypto=ON   -DBUILD_MODULE_http=ON       -DBUILD_MODULE_json=ON               -DBUILD_MODULE_av=ON    \
       -DBUILD_MODULE_net=ON      -DBUILD_MODULE_socketio=ON   -DBUILD_MODULE_symple=ON             -DBUILD_MODULE_stun=ON   \
       -DBUILD_MODULE_turn=ON     -DBUILD_MODULE_util=ON       -DBUILD_MODULE_uv=ON                 -DBUILD_MODULE_webrtc=ON \
       -DBUILD_SAMPLES_webrtc=ON  -DWEBRTC_INCLUDE_DIR=/home/ubuntu/temp/webrtc-22215-ab42706-linux-x64/include \
       -DWEBRTC_LIBRARIES=/home/ubuntu/temp/webrtc-22215-ab42706-linux-x64/lib/ \
       -DWEBRTC_ROOT_DIR=/home/ubuntu/temp/webrtc-22215-ab42706-linux-x64    \
       -DBUILD_MODULE_openssl=ON   -DOPENSSL_ROOT_DIR=/usr/local/ssl     -DOPENSSL_LIBRARIES=/usr/local/ssl/lib/ \
       -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include/openssl/
    

    here are the logs of webrtcrecorder:

    Client state changed from Closed to Connecting
    13:31:54 [debug] [application.cpp(104)] Wait for shutdown
    13:31:54 [debug] [signaler.cpp(116)] Client state changed from Connecting to Connected
    13:31:54 [debug] [client.cpp(364)] On handshake: sid=_Wi06W8eF4GdOGn_AAAA, pingInterval=25000, pingTimeout=60000
    13:31:54 [debug] [client.cpp(387)] Peer connected:videorecorder|_Wi06W8eF4GdOGn_AAAA
    13:31:54 [debug] [signaler.cpp(116)] Client state changed from Connected to Online
    13:31:59 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:31:59 [debug] [signaler.cpp(71)] Peer connected: Ivv61MFbOi96l__ZAAAB
    13:31:59 [debug] [client.cpp(387)] Peer connected:demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peer.cpp(130)] Ivv61MFbOi96l__ZAAAB: Receive offer: v=0
    o=- 7392103695987858658 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio video
    a=msid-semantic: WMS je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:ICgM
    a=ice-pwd:hruHw+Fgaswb+slJ3/eE3Yad
    a=ice-options:trickle
    a=fingerprint:sha-256 B3:30:19:FA:91:57:CE:2B:7D:60:C4:16:27:FE:8E:CB:76:57:31:C6:75:72:72:87:36:C4:8E:30:91:01:27:D8
    a=setup:actpass
    a=mid:audio
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:111 opus/48000/2
    a=rtcp-fb:111 transport-cc
    a=fmtp:111 minptime=10;useinbandfec=1
    a=rtpmap:103 ISAC/16000
    a=rtpmap:104 ISAC/32000
    a=rtpmap:9 G722/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:106 CN/32000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:110 telephone-event/48000
    a=rtpmap:112 telephone-event/32000
    a=rtpmap:113 telephone-event/16000
    a=rtpmap:126 telephone-event/8000
    a=ssrc:1294348972 cname:G/WgJ3Ijh9QR84NI
    a=ssrc:1294348972 msid:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd 30683b54-4aef-4c98-bf11-e9f497eddafd
    a=ssrc:1294348972 mslabel:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    a=ssrc:1294348972 label:30683b54-4aef-4c98-bf11-e9f497eddafd
    m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 122 127 121 125 107 108 109 124 120 123 119 114
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:ICgM
    a=ice-pwd:hruHw+Fgaswb+slJ3/eE3Yad
    a=ice-options:trickle
    a=fingerprint:sha-256 B3:30:19:FA:91:57:CE:2B:7D:60:C4:16:27:FE:8E:CB:76:57:31:C6:75:72:72:87:36:C4:8E:30:91:01:27:D8
    a=setup:actpass
    a=mid:video
    a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
    a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:4 urn:3gpp:video-orientation
    a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
    a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
    a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:96 VP8/90000
    a=rtcp-fb:96 goog-remb
    a=rtcp-fb:96 transport-cc
    a=rtcp-fb:96 ccm fir
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96
    a=rtpmap:98 VP9/90000
    a=rtcp-fb:98 goog-remb
    a=rtcp-fb:98 transport-cc
    a=rtcp-fb:98 ccm fir
    a=rtcp-fb:98 nack
    a=rtcp-fb:98 nack pli
    a=fmtp:98 x-google-profile-id=0
    a=rtpmap:99 rtx/90000
    a=fmtp:99 apt=98
    a=rtpmap:100 H264/90000
    a=rtcp-fb:100 goog-remb
    a=rtcp-fb:100 transport-cc
    a=rtcp-fb:100 ccm fir
    a=rtcp-fb:100 nack
    a=rtcp-fb:100 nack pli
    a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
    a=rtpmap:101 rtx/90000
    a=fmtp:101 apt=100
    a=rtpmap:102 H264/90000
    a=rtcp-fb:102 goog-remb
    a=rtcp-fb:102 transport-cc
    a=rtcp-fb:102 ccm fir
    a=rtcp-fb:102 nack
    a=rtcp-fb:102 nack pli
    a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
    a=rtpmap:122 rtx/90000
    a=fmtp:122 apt=102
    a=rtpmap:127 H264/90000
    a=rtcp-fb:127 goog-remb
    a=rtcp-fb:127 transport-cc
    a=rtcp-fb:127 ccm fir
    a=rtcp-fb:127 nack
    a=rtcp-fb:127 nack pli
    a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
    a=rtpmap:121 rtx/90000
    a=fmtp:121 apt=127
    a=rtpmap:125 H264/90000
    a=rtcp-fb:125 goog-remb
    a=rtcp-fb:125 transport-cc
    a=rtcp-fb:125 ccm fir
    a=rtcp-fb:125 nack
    a=rtcp-fb:125 nack pli
    a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
    a=rtpmap:107 rtx/90000
    a=fmtp:107 apt=125
    a=rtpmap:108 H264/90000
    a=rtcp-fb:108 goog-remb
    a=rtcp-fb:108 transport-cc
    a=rtcp-fb:108 ccm fir
    a=rtcp-fb:108 nack
    a=rtcp-fb:108 nack pli
    a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
    a=rtpmap:109 rtx/90000
    a=fmtp:109 apt=108
    a=rtpmap:124 H264/90000
    a=rtcp-fb:124 goog-remb
    a=rtcp-fb:124 transport-cc
    a=rtcp-fb:124 ccm fir
    a=rtcp-fb:124 nack
    a=rtcp-fb:124 nack pli
    a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
    a=rtpmap:120 rtx/90000
    a=fmtp:120 apt=124
    a=rtpmap:123 red/90000
    a=rtpmap:119 rtx/90000
    a=fmtp:119 apt=123
    a=rtpmap:114 ulpfec/90000
    a=ssrc-group:FID 3747062777 227800175
    a=ssrc:3747062777 cname:G/WgJ3Ijh9QR84NI
    a=ssrc:3747062777 msid:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    a=ssrc:3747062777 mslabel:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    a=ssrc:3747062777 label:e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    a=ssrc:227800175 cname:G/WgJ3Ijh9QR84NI
    a=ssrc:227800175 msid:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    a=ssrc:227800175 mslabel:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    a=ssrc:227800175 label:e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    
    13:32:00 [debug] [peer.cpp(165)] Ivv61MFbOi96l__ZAAAB: On signaling state change: 3
    13:32:00 [debug] [peer.cpp(225)] Ivv61MFbOi96l__ZAAAB: On add stream
    13:32:00 [debug] [signaler.cpp(139)] -------onAddRemotestream---------
    13:32:00 [debug] [peermanager.cpp(64)] Received offer: v=0
    o=- 7392103695987858658 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio video
    a=msid-semantic: WMS je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:ICgM
    a=ice-pwd:hruHw+Fgaswb+slJ3/eE3Yad
    a=ice-options:trickle
    a=fingerprint:sha-256 B3:30:19:FA:91:57:CE:2B:7D:60:C4:16:27:FE:8E:CB:76:57:31:C6:75:72:72:87:36:C4:8E:30:91:01:27:D8
    a=setup:actpass
    a=mid:audio
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:111 opus/48000/2
    a=rtcp-fb:111 transport-cc
    a=fmtp:111 minptime=10;useinbandfec=1
    a=rtpmap:103 ISAC/16000
    a=rtpmap:104 ISAC/32000
    a=rtpmap:9 G722/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:106 CN/32000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:110 telephone-event/48000
    a=rtpmap:112 telephone-event/32000
    a=rtpmap:113 telephone-event/16000
    a=rtpmap:126 telephone-event/8000
    a=ssrc:1294348972 cname:G/WgJ3Ijh9QR84NI
    a=ssrc:1294348972 msid:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd 30683b54-4aef-4c98-bf11-e9f497eddafd
    a=ssrc:1294348972 mslabel:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    a=ssrc:1294348972 label:30683b54-4aef-4c98-bf11-e9f497eddafd
    m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 122 127 121 125 107 108 109 124 120 123 119 114
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:ICgM
    a=ice-pwd:hruHw+Fgaswb+slJ3/eE3Yad
    a=ice-options:trickle
    a=fingerprint:sha-256 B3:30:19:FA:91:57:CE:2B:7D:60:C4:16:27:FE:8E:CB:76:57:31:C6:75:72:72:87:36:C4:8E:30:91:01:27:D8
    a=setup:actpass
    a=mid:video
    a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
    a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:4 urn:3gpp:video-orientation
    a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
    a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
    a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:96 VP8/90000
    a=rtcp-fb:96 goog-remb
    a=rtcp-fb:96 transport-cc
    a=rtcp-fb:96 ccm fir
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96
    a=rtpmap:98 VP9/90000
    a=rtcp-fb:98 goog-remb
    a=rtcp-fb:98 transport-cc
    a=rtcp-fb:98 ccm fir
    a=rtcp-fb:98 nack
    a=rtcp-fb:98 nack pli
    a=fmtp:98 x-google-profile-id=0
    a=rtpmap:99 rtx/90000
    a=fmtp:99 apt=98
    a=rtpmap:100 H264/90000
    a=rtcp-fb:100 goog-remb
    a=rtcp-fb:100 transport-cc
    a=rtcp-fb:100 ccm fir
    a=rtcp-fb:100 nack
    a=rtcp-fb:100 nack pli
    a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
    a=rtpmap:101 rtx/90000
    a=fmtp:101 apt=100
    a=rtpmap:102 H264/90000
    a=rtcp-fb:102 goog-remb
    a=rtcp-fb:102 transport-cc
    a=rtcp-fb:102 ccm fir
    a=rtcp-fb:102 nack
    a=rtcp-fb:102 nack pli
    a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
    a=rtpmap:122 rtx/90000
    a=fmtp:122 apt=102
    a=rtpmap:127 H264/90000
    a=rtcp-fb:127 goog-remb
    a=rtcp-fb:127 transport-cc
    a=rtcp-fb:127 ccm fir
    a=rtcp-fb:127 nack
    a=rtcp-fb:127 nack pli
    a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
    a=rtpmap:121 rtx/90000
    a=fmtp:121 apt=127
    a=rtpmap:125 H264/90000
    a=rtcp-fb:125 goog-remb
    a=rtcp-fb:125 transport-cc
    a=rtcp-fb:125 ccm fir
    a=rtcp-fb:125 nack
    a=rtcp-fb:125 nack pli
    a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
    a=rtpmap:107 rtx/90000
    a=fmtp:107 apt=125
    a=rtpmap:108 H264/90000
    a=rtcp-fb:108 goog-remb
    a=rtcp-fb:108 transport-cc
    a=rtcp-fb:108 ccm fir
    a=rtcp-fb:108 nack
    a=rtcp-fb:108 nack pli
    a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
    a=rtpmap:109 rtx/90000
    a=fmtp:109 apt=108
    a=rtpmap:124 H264/90000
    a=rtcp-fb:124 goog-remb
    a=rtcp-fb:124 transport-cc
    a=rtcp-fb:124 ccm fir
    a=rtcp-fb:124 nack
    a=rtcp-fb:124 nack pli
    a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
    a=rtpmap:120 rtx/90000
    a=fmtp:120 apt=124
    a=rtpmap:123 red/90000
    a=rtpmap:119 rtx/90000
    a=fmtp:119 apt=123
    a=rtpmap:114 ulpfec/90000
    a=ssrc-group:FID 3747062777 227800175
    a=ssrc:3747062777 cname:G/WgJ3Ijh9QR84NI
    a=ssrc:3747062777 msid:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    a=ssrc:3747062777 mslabel:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    a=ssrc:3747062777 label:e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    a=ssrc:227800175 cname:G/WgJ3Ijh9QR84NI
    a=ssrc:227800175 msid:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    a=ssrc:227800175 mslabel:je7s7e9RhWY3cMVjVn8y0ipyOgJnTgu1bMYd
    a=ssrc:227800175 label:e64ec0a4-3603-40d3-a6c6-01c5e60c79ef
    
    13:32:00 [debug] [peer.cpp(329)] On SDP parse success
    13:32:00 [debug] [peer.cpp(255)] Ivv61MFbOi96l__ZAAAB: Set local description
    13:32:00 [debug] [peer.cpp(165)] Ivv61MFbOi96l__ZAAAB: On signaling state change: 0
    13:32:00 [debug] [peer.cpp(329)] On SDP parse success
    13:32:00 [debug] [peer.cpp(191)] Ivv61MFbOi96l__ZAAAB: On ICE gathering change: 1
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:2999745851 1 udp 2122260223 192.168.56.1 60548 typ host generation 0 ufrag ICgM network-id 2
    13:32:00 [debug] [peer.cpp(185)] Ivv61MFbOi96l__ZAAAB: On ICE connection change: 1
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:564218470 1 udp 2122194687 100.64.100.204 60549 typ host generation 0 ufrag ICgM network-id 1 network-cost 10
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:2999745851 1 udp 2122260223 192.168.56.1 60550 typ host generation 0 ufrag ICgM network-id 2
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:564218470 1 udp 2122194687 100.64.100.204 60551 typ host generation 0 ufrag ICgM network-id 1 network-cost 10
    13:32:00 [debug] [peer.cpp(191)] Ivv61MFbOi96l__ZAAAB: On ICE gathering change: 2
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:4233069003 1 tcp 1518280447 192.168.56.1 9 typ host tcptype active generation 0 ufrag ICgM network-id 2
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:1864545942 1 tcp 1518214911 100.64.100.204 9 typ host tcptype active generation 0 ufrag ICgM network-id 1 network-cost 10
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:4233069003 1 tcp 1518280447 192.168.56.1 9 typ host tcptype active generation 0 ufrag ICgM network-id 2
    13:32:00 [debug] [signaler.cpp(89)] Peer message: demo|Ivv61MFbOi96l__ZAAAB
    13:32:00 [debug] [peermanager.cpp(85)] Received candidate: candidate:1864545942 1 tcp 1518214911 100.64.100.204 9 typ host tcptype active generation 0 ufrag ICgM network-id 1 network-cost 10
    13:32:15 [debug] [peer.cpp(185)] Ivv61MFbOi96l__ZAAAB: On ICE connection change: 4```
    

    Error:

    [libx264 @ 0x7f415c001600] invalid level_idc: 8
    12:00:14 [error] [multiplexencoder.cpp(153)] Error: Cannot open the video codec: Generic error in an external library
    12:00:14 [error] [streamrecorder.cpp(87)] Failed to init encoder: std::exception
    

    How to resolve this error?

  • H264 : decode series of nal units with ffmpeg

    7 novembre 2018, par jsim

    I tried to decode a series of nal units with ffmpeg (libavcodec) but I get a "no frame" error. I produced the nal units with the guideline at How does one encode a series of images into H264 using the x264 C API?. I tried the following strategy for decoding:

    avcodec_init();  
    avcodec_register_all();  
    AVCodec* pCodec;  
    pCodec=lpavcodec_find_decoder(CODEC_ID_H264);  
    AVCodecContext* pCodecContext;  
    pCodecContext=lpavcodec_alloc_context();  
    avcodec_open(pCodecContext,pCodec);  
    AVFrame *pFrame;  
    pFrame=avcodec_alloc_frame();
    //for every nal unit:    
        int frameFinished=0;  
        //nalData2 is nalData without the first 4 bytes
        avcodec_decode_video(pCodecContext,pFrame,&frameFinished,(uint8_t*) nalData2,nalLength);
    

    I passed all units I got to this code but frameFinished stays 0. I guess there must be something wrong with the pCodecContext setup. Can someone send me a working example?

    Thank you

  • Video encoding with ffmpeg - Obtaining sizes of residuals and motion vectors

    30 octobre 2018, par Serkan S

    I am encoding videos with x264 using ffmpeg. In the output I can see the bitrate and frame size but is there a way to obtain how much of those bits are used for motion vectors and residuals separately?