Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Why is the resulting clip of my ffmpeg concatenation much longer than expected ?

    21 mai 2018, par joeycato

    I'd like to extract a set of clips from a 60fps input video, change each of their durations, then recombine those modified clips. Unfortunately when I attempt this, the resulting clip doesn't exactly match the sum of those durations.

    Here's my repro case:

    1. Extend an extracted 2-second clip to 4 seconds ( input frame count = 120 = 60fps * 2 sec ) )

    ffmpeg -y -ss 8 -t 2 -i ./clip_60fps.avi -filter:v "settb=(4/120),setpts=(4/120)*N/TB" -r 120/4 -vcodec huffyuv step1.avi

    1. Shorten an extracted 4-second clip to 1 second ( input frame count = 240 = 60fps * 4 sec )

    ffmpeg -y -ss 10 -t 4 -i ./clip_60fps.avi -filter:v "settb=(1/240),setpts=(1/240)*N/TB" -r 240/1 -vcodec huffyuv step2.avi

    1. Concatenate the modified clips:

    mylist.txt contents:

    file './step1.avi'
    file './step2.avi'
    

    ffmpeg -y -safe 0 -f concat -i ./mylist.txt -r 60 -vcodec huffyuv steps_joined.avi

    The result:

    ffmpeg -i step1.avi 2>&1 | grep Duration
    ffmpeg -i step2.avi 2>&1 | grep Duration
    ffmpeg -i steps_joined.avi 2>&1 | grep Duration
    

    Duration: 00:00:04.00, start: 0.000000, bitrate: 3228 kb/s

    Duration: 00:00:01.00, start: 0.000000, bitrate: 23132 kb/s

    Duration: 00:00:39.98, start: 0.000000, bitrate: 910 kb/s

    Why am I not getting an exact result of 5 seconds, but instead a much larger value?

  • Rendering a remote raw h264 video stream in javascript using WebRTC [on hold]

    20 mai 2018, par Shahabi

    I'm new in Video streaming and decoding for rendering on Web Browser. My plan is to create a raw h264 stream on localhost environment and in Nodejs application, I want to read the raw h264 stream and render it on Web browser with Low latency.

    For creating a stream, I'm using VLC Stream option in h264 format on HTTP server. I'm using my laptop webcam and mic for streaming audio/video on localhost environment.

    Now I'm stuck on getting that stream on web page and render it on Web browser. I want to use WebRTC or any other opensource library for fast rendering.

    Anyone know or guide me into the right direction where i can solve my problem as mention above?

    Thanks

  • FFmpeg Logo error

    20 mai 2018, par AniEncoder

    I tried to below code but it gives me error

    ffmpeg -i 1.mkv -i 1.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy 1.mkv
    pause
    

    Gives Only 2s video output

  • How should one start with ffmpeg's API ?

    20 mai 2018, par JoeDough

    I'd like to make a real time streaming program that takes input from a webcamera, ffmpeg looks like a good library for encoding a stream of images but there is no documentation or community tutorials (there is just a doxygen API reference).Where should I start if there's no official documentation?

  • youtube-dl sometime hangs with "[ffmpeg] Correcting container"

    20 mai 2018, par user292344

    Ubuntu 16.04

    /usr/local/bin/youtube-dl --version
    2018.05.09
    

    I have a bash script that attemts to download a youtube video. The output is below. The problem is that sometimes it works perfectly (completes quickly). But most of the time it hangs on "Correcting container....". Does anyone know why?

    + /usr/local/bin/youtube-dl --verbose -x 'https://www.youtube.com/watch?v=8HVWitAW-Qg'
    
    [debug] System config: []
    
    [debug] User config: []
    
    [debug] Custom config: []
    
    [debug] Command-line args: [u'--verbose', u'-x', u'https://www.youtube.com/watch?v=8HVWitAW-Qg']
    
    [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
    
    [debug] youtube-dl version 2018.05.09
    
    [debug] Python version 2.7.12 (CPython) - Linux-4.4.0-124-generic-x86_64-with-Ubuntu-16.04-xenial
    
    [debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1, rtmpdump 2.4
    
    [debug] Proxy map: {}
    
    [youtube] 8HVWitAW-Qg: Downloading webpage
    
    [youtube] 8HVWitAW-Qg: Downloading video info webpage
    
    [youtube] 8HVWitAW-Qg: Extracting video information
    
    [debug] Invoking downloader on u'https://r5---sn-5uaeznkl.googlevideo.com/videoplayback?expire=1526159728&source=youtube&key=yt6&mime=audio%2Fmp4&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&keepalive=yes&lmt=1518142590597815&dur=231.131&mv=m&mt=1526137933&ms=au%2Conr&signature=18BB34F3716B412AC5757872DD2AF402B6EE20D2.43D2E68B5A5ED2E2D3076DF9264B9BB723484821&ip=71.81.217.251&c=WEB&initcwndbps=1583750&mn=sn-5uaeznkl%2Csn-p5qs7n7l&clen=3671757&gir=yes&id=o-AOxj8Rg2IuZek8KwvgPy-N7_FSGzxQ0Zl2HX1T4gepLf&ipbits=0&fvip=5&ei=EAX3WqbOH8fg4QSlkrGoAg&pl=20&mm=31%2C26&itag=140&usequic=no&requiressl=yes&ratebypass=yes'
    
    [download] Destination: Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a
    
    [download] 100% of 3.50MiB in 00:00
    
    [ffmpeg] Correcting container in "Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a"
    
    [debug] ffmpeg command line: avconv -y -i 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a' -c copy -f mp4 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.temp.m4a'
    
    ^C
    ERROR: Interrupted by user