Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (65)

Sur d’autres sites (13842)

  • FFmpeg IF/ELSE statement

    13 mai 2022, par Hrvoje

    I am doing reencoding of lots of video files, and sometimes some of them have subtitles included, some dont. Is it possible to "ignore"
-vf "subtitles=%%f:force_style='MarginV=25,Fontsize=20'" -sn statement in FFmpeg command IF input file does not have subtitles included ?

    


    My command is :

    


    for %%f in (*.mkv) do ffmpeg -hwaccel nvdec -i "%%f" -strict -2 -max_muxing_queue_size 1024 -map_metadata -1 -map_chapters -1 -vf "subtitles=%%f:force_style='MarginV=25,Fontsize=20'" -sn -c:v hevc_nvenc -rc vbr -cq 24 -qmin 24 -qmax 24 -tier high -level 4 -preset medium -profile:v main10 -pix_fmt p010le -b:v 0K -ac 6 -ar 48000 -b:a:0 640k -c:a:0 ac3 -metadata:s:a:0 title="Dolby Digital" E:\Encoded\%%f


    


    Note that there are more than 100 files in a batch and checking them by hand is time consuming.

    


    Maybe right aproach is to first inspect file in a batch script and if that file has subtitles, then execute first command, if it does not have subtitles, execute second command. But, I dont know how to do a script like that.

    


  • RTP H263 frames to FFMPEG

    25 août 2011, par Pierluigi Cifani

    I've been trying to develop an RTP demuxed based on RFC 2190 to pass to the FFMPEG (libavcodec) H263 packets in Mode-A.

    However I can't seem to make the FFMPEG happy with the I-frames I am feeding it with. With fragmented frames (such as a large I-frame) I am rebuilding the whole frame following RFC 2190 and the "Marker" rules and passing it to the Libavcodec layer. However video looks buggy and it looks that I have to add some kind of header to the beginning of each frame before passing it to the Libavcodec layer. Errors like this are coming out all the time :

    illegal dc 128 at 0 3
    illegal ac vlc code at 0x3
    Error at MB: 69
    illegal ac vlc code at 4x15
    Error at MB: 349
    concealing 379 DC, 379 AC, 379 MV errors

    I have previously built an H264 over RTP demuxer and I had to add 0x00 0x00 0x00 0x01 0x21 header to every fragment of I Frame in order for it to be decoded correctly. But I can't find anywhere documentation on how to do this with H263.

    Maybe you could lend me a hand ?

    Cheers and thanks a lot

  • Convert mp4 video to m3u8 format with C# ffmpack

    26 février 2020, par İlyas ARUCA

    I can convert the file with the extension mp4 in my hand from the code line related to PowerShell to m3u8 format.

    ffmpeg -i inputVideo.mp4 -profile:v baseline -level 3.0 -s 960x540 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls outputVideo.m3u8

    But I want to automate this process using C#. I did as written in the document on Microsoft’s site, but I could not add the relevant parameters. Has anyone done anything like this before ? or how can I follow a path.

    https://docs.microsoft.com/en-us/powershell/scripting/developer/hosting/adding-and-invoking-commands?view=powershell-7&fbclid=IwAR05LjyIa8Yv5YFVh-HcbWH5YqmaeQKJ8LzaGsCQxjvJBIepdLAx7E39y7Y