Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • does ffmpeg supports ONVIF like RTSP protocol ?

    5 décembre 2016, par Ranjith

    Does ffmpeg supports onvif like rtsp protocol to stream back audio.

    if yes, please provide ffmpeg/ffserver/ffplay command to do this ?

  • ffmpeg decode h.264 stream latency one frame always

    5 décembre 2016, par rywang

    Now I use the x264 library to compress the video (from camera) and transmit to client side by TCP. In the client side, use the ffmpeg library to decode the stream on the Win32. But I find the stream decoding always latency one frame. That is to say, if the client side received A,B,C three frame, when decode the A frame, can't get the image. Then decode the B frame, get the A frame image.

    For the h.264 encode, i have set zerolatency - ultrafast - baseline. So I think there is no B frame.

    For the ffmpeg decoder, i have tried to set the thread_type = 0 to disable frame buffering decoding. But no efficient! By the way, after decoded one frame, passing NULL to the decoder to flush the decoder can help this case. But i think this is not a good solution.

    So how to set the ffmpeg library to avoid the one frame latency?

  • ffmpeg - timestamp sync of same mp4-video in 1fps and 25fps - not possible ?

    5 décembre 2016, par chuckice

    I am using ffmpeg-3.2 to encode two formats of the same mp4-Video. I start with recording footage from a tv-receiver, where i get .ts-format.

    First thing i do, is transcoding an .ts-Stream with this ffmpeg-parameters:

    ffmpeg input.ts -crf 28 -c:v libx264 -an -preset medium -y -vf "fps=25,yadif,drawtext=fontfile=/usr/share/fonts/truetype/droid/DroidSans.ttf: text='%{pts}': fontcolor=green: box=1: boxcolor=0x00000000@1: x=10: y=20: fontsize=40" -vsync cfr -copyts -start_at_zero -force_key_frames 00:00:0.00 input.mp4
    

    After this, i transcode the new mp4 with:

    ffmpeg -i input.mp4 -y -vf "fps=25,drawtext=fontfile=/usr/share/fonts/truetype/droid/DroidSans.ttf: text='%{pts}': fontcolor=white: box=1: boxcolor=0x00000000@1: x=10: y=50: fontsize=40" -vsync cfr -force_key_frames 00:00:0.00 output-fps25.mp4
    

    Then i run:

    ffmpeg -i input.mp4 -y -vf "fps=1,scale=768:576,drawtext=fontfile=/usr/share/fonts/truetype/droid/DroidSans.ttf: text='%{pts}': fontcolor=yellow: box=1: boxcolor=0x00000000@1: x=10: y=70: fontsize=40" -vsync cfr -force_key_frames 00:00:0.00 output-fps1.mp4
    

    But, as you can see on the follwing snapshot, they are not sync: screenshot with all timestamps

    Of course i am missing a parameter, but it seems hart to find for me. Anyone familiar with this kind of problem?

    When i create screenshots for the first 5s, the following timestamps correspond to the -ss paramter -ss param, timestamp from screenshot

    • 0, 0
    • 1, 0.04
    • 2, 0.88
    • 3, 1.88
    • 4, 2.88

    How could i reset the stream somehow to get

    • 0, 0
    • 1, 1
    • 2, 2
    • 3, 3
    • 4, 4

    Have a nice day, Lars

  • How to concat two video webm files over nodejs ?

    5 décembre 2016, par SalvatoreAD

    I am creating a web video conferencing app where there are many people comunicating each other, and every 60 seconds I want to upload webm files (one video webm file for one person) to the server and add to the previous file.

    Is it possible to append video file?.

    I use this code:

    ffmpeg()
        .input(filePathTMP)
        .on('error', function(err) {
            console.log('An error occurred: ' + err.message);
        })
        .on('end', function() {
            console.log('Merging finished !');
        })
        .mergeToFile(filePath, filePathBase + 'temp');
    

    This code combines two files (filePathTMP and filePath) and and convert them before you join them, wasting time. Is there a similar command that combines the files without decoding?

  • why doesn't ffmpeg name files with sequence after using strftime ?

    5 décembre 2016, par user2030856

    I would like to know why ffmpeg stops naming my files with a sequence number (%03d) when using -strftime 1?

    for example: filename_%Y-%m-%d_%03d.ts

    I need to get filename_YEAR_MONTH_DAY_SEQUENCE#.ts

    references:
    What do the special characters in an ffmpeg file output format mean?
    ffmpeg filename output format
    http://man7.org/linux/man-pages/man3/strftime.3.html
    http://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence