Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to get the audio and video from a WebRTC stream using ffmpeg on server

    11 juin 2016, par elshnkhll

    I am trying to get the audio and video from a WebRTC stream and handle it (transcode or dump) with ffmpeg on ubuntu server. I have naively expected it to simply interpret the sdp offered by WebRTC, but was mistaken. I suspect ffmpeg is not capable of signaling back the answer sdp and it is must be done manually. Here is an offer sdp:

    v=0
    o=Mozilla-SIPUA-33.1 3662 0 IN IP4 0.0.0.0
    s=SIP Call
    t=0 0
    a=ice-ufrag:5e0a74d1
    a=ice-pwd:7446c0eb445117d0018ca2afc5f3ca54
    a=fingerprint:sha-256 76:1B:19:CE:3F:41:C5:4D:64:E6:FD:72:D2:FC:42:E1:98:D4:0F:2B:73:AE:C7:F4:2C:73:2C:E7:9E:DC:6A:EB
    m=audio 23063 RTP/SAVPF 109 0 8 101
    c=IN IP4 188.253.146.208
    a=rtpmap:109 opus/48000/2
    a=ptime:20
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-15
    a=sendrecv
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=setup:actpass
    a=candidate:0 1 UDP 2128609535 192.168.1.100 4130 typ host
    a=candidate:1 1 UDP 1692467199 188.253.146.208 23063 typ srflx raddr 192.168.1.100 rport 4130
    a=candidate:0 2 UDP 2128609534 192.168.1.100 4131 typ host
    a=candidate:1 2 UDP 1692467198 188.253.146.208 23064 typ srflx raddr 192.168.1.100 rport 4131
    a=rtcp-mux
    m=video 23065 RTP/SAVPF 120 126 97
    c=IN IP4 188.253.146.208
    a=rtpmap:120 VP8/90000
    a=rtpmap:126 H264/90000
    a=fmtp:126 profile-level-id=42e01f;packetization-mode=1
    a=rtpmap:97 H264/90000
    a=fmtp:97 profile-level-id=42e01f
    a=sendrecv
    a=rtcp-fb:120 nack
    a=rtcp-fb:120 nack pli
    a=rtcp-fb:120 ccm fir
    a=rtcp-fb:126 nack
    a=rtcp-fb:126 nack pli
    a=rtcp-fb:126 ccm fir
    a=rtcp-fb:97 nack
    a=rtcp-fb:97 nack pli
    a=rtcp-fb:97 ccm fir
    a=setup:actpass
    a=candidate:0 1 UDP 2128609535 192.168.1.100 4132 typ host
    a=candidate:1 1 UDP 1692467199 188.253.146.208 23065 typ srflx raddr 192.168.1.100 rport 4132
    a=candidate:0 2 UDP 2128609534 192.168.1.100 4133 typ host
    a=candidate:1 2 UDP 1692467198 188.253.146.208 23066 typ srflx raddr 192.168.1.100 rport 4133
    a=rtcp-mux
    

    Is anybody have succeeded in it? Thanks.

  • Sync end of audio and video in ffmpeg ?

    11 juin 2016, par barbierocks

    I'd like to sync an audio and video file together so that they end at the same time. Is there an easy way to do this with ffmpeg?

    The only ideas I have are 1) finding the lengths of the two (which is annoying) and delaying the shorter one by the difference between the two lengths, and 2) reversing the two, syncing them, then reversing again. There's got to be a better way...

  • Set text rotated to a given angle in FFMPEG

    10 juin 2016, par Garry

    I want to set text rotated to a certain angle in FFMPEG video. can someone help me how can i set text rotated to given angle while adding text on video by drawtext command.

  • How can I merge all the videos in a folder to make a single video file using FFMPEG

    10 juin 2016, par X_1

    I have a folder with 20+ video files and I need to merge them to make one long video file. How can I achieve this using FFMPEG in Python?

    I know the following command

    ffmpeg -vcodec copy -isync -i \ "concat:file1.mp4|file2.mp4|...|fileN.mp4" \
    

    outputfile.mp4

    But I'd rather not type all the names of the 20+ files.

  • running ffmpeg on windows through python causes error "av_interleaved_write_frame() : Invalid argument"

    10 juin 2016, par Swarage

    The following code is the python script:

    import subprocess as sp
    
    FFMPEG_BIN = "ffmpeg.exe"
    
    fullPath = 'test.mp4'
    
    command = [ FFMPEG_BIN,
                '-i', fullPath,
                '-f', 'image2pipe',
                '-vcodec', 'rawvideo', '-']
    
    pipe = sp.Popen(command, stdout = sp.PIPE, bufsize=10**8)
    

    What happens is that when I try to run it, I run into a very specific error titled "av_interleaved_write_frame(): Invalid argument" and "Error writing trailer of pipe:: Invalid argument." Some useful information is that I am on windows, I'm running python 2.7.1 (which I can't change as it is a requirement), and the version of ffmpeg I'm using is "ffmpeg-20160610-git-0a9e781-win64-static." I know somewhat that the reason for this is because the pipe is incorrect, but I'm not entirely sure how to fix it.