Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • VLC recorded stream - No VIDEO MPEG2-TS

    19 décembre 2017, par Milan Freddy Múčka

    I have got problem playing my recorded stream in VLC. Audio is OK, but video seems corrupted. It was transmitted in MPEG2-TS format and recorded without encoding. When I'm trying to convert in different format, it keeps only audio. FFmpeg shows error

    Could not find codec parameters for stream 1 (Video: mpeg4 (mp4v / 0x7634706D), none, 6000 kb/s): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options

    I tried more players, but none of them can decode it.

    Can I somehow edit video header, or specify codec to use in VLC/FFmpeg?

    Video ID : 2

    Codec ID : 0

    Bit rate : 6 001 Kbps

    Width : 720 pixels

    Height : 576 pixels

    Display aspect ratio : 5:4

    Frame rate : 25.000 fps

    Standard : PAL

    Stream size : 504 MiB (96%)

  • Adding loop video to sound ffmpeg

    19 décembre 2017, par Cuviline

    i start working with ffmpeg, and here my first doubt:

    I have one sound file, example.mp3 (1 min duration). I want add a loop video, example.mp4 ( x sec duration).

    I want generate 1 min mp4 video and loop this video 3 times in this case, but this could be dynamic.

    Its posible do this with ffmpeg ?

    Thanks in advance

  • When passing arguments with php shell script eval isn't properly executing the script

    19 décembre 2017, par Aleksandra Lozanovska

    This is the part of my php script:

    $result ='ffmpeg -re -i /home/neotel/sample.mp4 -s 320x240 -vf setdar=4:3 -r 
    25 -c:v libx264 -b:v 2500k -c:a aac -b:a 128k -f mpegts 
    udp://192.168.88.211:5000' 
    $FILE1 = escapeshellarg($result);
    $output = shell_exec("sh testpetar.sh $FILE1 2>&1");
    

    This is my shell script:

    #!/usr/bin/env bash
    FILE1=$1
    FILE2="nohup "
    FILE3=" > log.txt"
    FILE="$FILE2$FILE1$FILE3"
    eval $FILE
    

    I am trying to pass the $results strings as the $FILE1 argument and then concatenate it with the strings $FILE2 and $FILE3 to form a whole ffmpeg command and execute it as a script in shell. When i execute it manually through Putty it is working properly, but when i am passing the $results command from php the eval function is not working.

  • ffmpeg installation on xampp not working

    19 décembre 2017, par Mian Majid

    I am trying to install ffmpeg extension on xampp on windows 8.1. I copied php_ffmpeg.dll to xampp/php/ext directory, added entry as "extension=php_ffmpeg.dll" in php.ini file, and copied other dll files ( avcodec-52.dll, avdevice-52.dll, avformat-52.dll, avutil-50.dll, pthreadGC2.dll, swscale-0.dll ) in system32 and SysWOW64 folders of Windows. I restarted xampp, and computer as well, but no success, it is not appearing in phpinfo() list.

    Kindly someone help me to resolve issue.

    Thanks.

  • how to do mjpeg streaming using ffmpeg and c#

    19 décembre 2017, par Mahesh Vemuri

    I am trying to create a preview of my rtmp stream. But RTMP playback occupies the bandwidth as source, I want to do mjpeg streaming using ffmpeg and c#. Is it possible to do?

    I am trying to create a webpage where users can monitor the stream. For this I dont need to use RTMP url to watch as it needs more and more bandwidth.

    So, my idea is to capture images and show them in sequence rate controlled at 1 frame per second. In this way users can monitor.

    I have tried various methods like using mjpeg

    ffmpeg.exe -i renditiontest.mp4 -c:v mjpeg -q:v 31 -an sample.avi
    

    Now, output file is getting generated. But, it is occupying harddisk.

    So, next way is to create images overwriting previous images

    ffmpeg.exe -y -i renditiontest.mp4 -f image2 -updatefirst 1 sample2.jpg
    

    Now, I tried creating a stream which will continously read the image and write it as response in C#.

    using (WebClient webClient = new WebClient())
                    {
                        string url = "http://localhost/probe_VOD/mjpg/sample2.jpg";
                        var memoryStream = new MemoryStream(webClient.DownloadData(url));
    
                        response.Headers.AcceptRanges.Add("bytes");
                        response.StatusCode = HttpStatusCode.OK;
                        response.Content = new StreamContent(memoryStream);
                        //response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("render");
                        //response.Content.Headers.ContentDisposition.FileName = "sample.jpg";
                        response.Content.Headers.ContentType = new MediaTypeHeaderValue("multipart/x-mixed-replace; boundary=myboundary");
                        response.Content.Headers.ContentLength = memoryStream.Length;
                    }
                    return response; 
    

    Please let me know how do I acheive this.