Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • python request.put causing my entire function to loop infinitely

    16 mars 2018, par M.Izzat

    I created a function to convert a video using ffmpeg on form save and then update the same entry with the new convered video path using API request.put, but for some reason this function cause the ffmpeg to convert the video over and over again, how can I terminate the process without closing my terminal. also because im using 'rb' it create a new video file with binary which I'm not needed and update that in my database, I try using 'r' and 'r+' but its not working

    Be low is my code :

    def video_conversion(video_id, raw_file):
        cmd = "ffmpeg -i {} -s 1280x720 {}".format(input, output)
        thumbnail_cmd = "ffmpeg -ss {} -i {} -vframes 1 {}".format(middle_duration, input, image_output)
        subprocess.call(cmd)
        subprocess.call(thumbnail_cmd)
        mp4_480_file = {'mp4_480': open('D:/Development/VideoConverter/media/{}.mp4'.format(filename), 'rb')}
        video_request = requests.put(
                    'http://127.0.0.1:8000/api/lemoncore/video_detail/{}/'.format(video_id),
                    data={'id': video_id},
                    files=mp4_480_file
                    )
        video_request.close()
        return output
    
  • ffplay too slow decoding h264 stream over RTP

    16 mars 2018, par Alejandro Aristizábal

    I need some help getting ffplay to receive and decode a Real Time stream encoded in h264.

    I'm trying to make a point-to-point stream between computer A receiving video frames from a Kinect and computer B running ffplay to show the livestream.

    These are the commands I'm running on both computers.

    Computer A (RPI 3)

    ffmpeg -f rawvideo -vcodec rawvideo -pix_fmt rgb24 -s 640x480 -i - -threads 4 -preset ultrafast -codec:v libx2 64 -an -f rtp rtp://192.168.0.100:2000

    This is what ffmpeg outputs:

    fps= 14 q=12.0 size=856kB time=00:00:05.56 bitrate=1261.4kbits/s speed=0.54x

    The out stream runs in between 10-20 frames. It's not good, but I can work with that.

    Computer B

    ffplay -protocol_whitelist "file,udp,rtp" -probesize 32 -sync ext -i streaming.sdp

    streaming.sdp

    v=0
    0=- 0 0 IN IP4 127.0.0.1
    s=No Name
    c=IN IP4 192.168.0.100
    t=0 0
    a=tool:libavformat 57.56.100
    m=video 2000 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1
    

    I'm getting the stream, but at about 0.0001fps which is crearly bad. My guess is I'm missing something on the ffplay command, since ffmpeg shows a more stable and fast stream, but I can't seem to find what I'm missing.

    Thanks in advance

  • How to save the whole transportstream(meaning incl. PAT and PMT,etc.) using ffmpeg

    15 mars 2018, par Harris Tailor

    I have been searching the whole Internet for a long time and seems it can only save video/audio using ffmpeg,any help or advice will be appreciate!thanks!

  • Bus error by FFmpeg av_opt_set

    15 mars 2018, par Kevinvs

    I got strange error after I run this piece of code.

    av_opt_set(codecContext, "sub_charenc", "ISO-8859-1", 0);
    av_opt_set_int(codecContext, "sub_charenc_mode", FF_SUB_CHARENC_MODE_PRE_DECODER, 0);
    

    This is the backtrace from gdb.

    #0  0x00000000014a9d82 in av_opt_next (last=0x0, obj=) at libavutil/opt.c:51
    #1  av_opt_find2 (obj=0x40f5ac0, name=0x162a176 "sub_charenc", search_flags=0, target_obj=0x7fffffffe0b8, opt_flags=0, 
    unit=0x0) at libavutil/opt.c:1628
    #2  0x00000000014ab070 in av_opt_set (obj=0x40f5ac0, name=0x162a176 "sub_charenc", val=0x1e6ddd8  "ISO-8859-1", 
    search_flags=0) at libavutil/opt.c:453
    
  • I am trying to download a streaming video with .m4s segments and I am unable to play videos

    15 mars 2018, par Albertputin Jobs

    I am trying to download a streaming video with .m4s segments and I am unable to play videos can anyone please tell me how to download a streaming video step by step which has .m4s segments I used inviDownloader and downloader all segments and now I am clueless as to how to join then and play them

    For website: log into bharatacharyaeducation.com and log in using these credentials

    emai : chinnu.akanksh@gmail.com pwd: bankai

    and choose 8086 as topic for watching videos

    Now how to download these videos ??

    please explain step by step if possible