Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (16)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (2971)

  • avformat/wvdec : Check rate for overflow

    20 septembre 2020, par Michael Niedermayer
    avformat/wvdec : Check rate for overflow
    

    Fixes : signed integer overflow : 6000 * -2147483648 cannot be represented in type 'int'
    Fixes : 25700/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6578316302352384

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/wvdec.c
  • ffmpeg capture for usb v4l2 card

    8 décembre 2020, par elbarna

    I have a Grabby Terratec USB card.

    &#xA;

    Bus 001 Device 006: ID 0ccd:10af TerraTec Electronic GmbH Terratec G1&#xA;

    &#xA;

    With mencoder I capture fine video and audio using a script like this one

    &#xA;

    #!/bin/sh&#xA;#script for capture&#xA;#settings for pal 25 fps 720:576 normid=5&#xA;#settings for ntsc 30000/1001 fps normid 0 720:480&#xA;#settings for INPUT,0=composite,1=s-video,but depend on card&#xA;&#xA;TITLE="MYMOVIE"&#xA;CROP="612:467:16:1"&#xA;SCALE="560:432"&#xA;DEVVID=0&#xA;INPUT=1&#xA;ADEVICE=hw.2,0&#xA;NORMID=5&#xA;WIDTH=640&#xA;HEIGHT=480&#xA;FPS=25&#xA;AUDIORATE=48000&#xA;ASPECT=4/3&#xA;VFS="yadif,crop=$CROP,scale=$SCALE,harddup"&#xA;&#xA;mencoder tv:// -tv driver=v4l2:normid=$NORMID:width=$WIDTH:height=$HEIGHT:device=/dev/video$DEVVID:input=$INPUT:fps=$FPS:alsa:adevice=$ADEVICE:audiorate=${AUDIORATE}:amode=1:forceaudio:immediatemode=0 -of mpeg -mpegopts format=dvd -oac lavc -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=8000:vbitrate=6000:keyint=15:acodec=ac3:abitrate=320 -aspect $ASPECT -vf $VFS -o "$TITLE".mpg&#xA;

    &#xA;

    The script capture audio because this line is present

    &#xA;

    :amode=1:forceaudio:immediatemode=0&#xA;

    &#xA;

    Now the problem, I want to capture using ffmpeg with libx265 and aac

    &#xA;

    #!/bin/sh&#xA;SCALE=528:400&#xA;CROP=616:471:14:0&#xA;ASPECT=4:3&#xA;TITLE="MYTITLE"&#xA;&#xA;#usbstream:CARD=Generic&#xA;#    HD-Audio Generic&#xA;#    USB Stream Output&#xA;#sysdefault:CARD=G1&#xA;#    Terratec G1, USB Audio&#xA;#    Default Audio Device&#xA;#front:CARD=G1,DEV=0&#xA;#    Terratec G1, USB Audio&#xA;#    Front output / input&#xA;#usbstream:CARD=G1&#xA;#    Terratec G1&#xA;#    USB Stream Output&#xA;&#xA;ffmpeg -y -f video4linux2 -i /dev/video0  -thread_queue_size 512 -f alsa -i hw:CARD=G1 -ac 2 -vf yadif,crop=$CROP,scale=$SCALE -c:v libx265 -c:a aac -b:v 1200k -b:a 320k -metadata language=eng -metadata title="Mymovie" -aspect $ASPECT "$TITLE".mkv&#xA;

    &#xA;

    The problem is.. video is captured but without audio, I have tried the line

    &#xA;

     -f alsa -i hw:CARD=G1&#xA;

    &#xA;

    and

    &#xA;

     -f alsa -i hw:CARD=G1,DEV=0&#xA;

    &#xA;

    and

    &#xA;

     -f alsa -i hw:2,0&#xA;

    &#xA;

    But no way. The option " :amode=1:forceaudio:immediatemode=0" doesn't exist on ffmpeg.&#xA;Any suggestion ?Thanks

    &#xA;

  • FFmpeg - generate x264 CBR video transport stream with C-API

    6 juillet 2020, par ZeroDefect

    Using various posts sprinkled around the Internet, including this one here on SO, I've been able to understand how to use the FFmpeg cli to generate a CBR video bitrate using the x264 codec (wrapped in an MPEG-2 transport stream). Note : I'm concerned with the video bitrate - nothing else.

    &#xA;

    ffmpeg -i cbr_test_file_input.mp4 -c:v libx264 -pix_fmt yuv420p -b:v 6000000 -preset fast -tune film -g 25 -x264-params vbv-maxrate=6000:vbv-bufsize=6000:force-cfr=1:nal-hrd=cbr -flags &#x2B;ildct&#x2B;ilme x264_cbr_test_output.ts&#xA;

    &#xA;

    However, I'm trying to approach this from an FFmpeg C-API point of view. I'm having issues. I've knocked together some code to try do something very similar to what is being done in the FFmpeg CLI. I can generate a transport stream of what I think should be CBR, but the profile of the video bitrate is very different from what I thought was the FFmpeg cli equivalent :

    &#xA;

    The initialisation of the AVCodecContext looks something like :

    &#xA;

          av_dict_set(&amp;pDict, "preset", "faster", 0);&#xA;      av_dict_set(&amp;pDict, "tune", "film", 0);&#xA;      av_dict_set_int(&amp;pDict, "rc-lookahead", 25, 0);&#xA;&#xA;      pCdcCtxOut->width = pCdcCtxIn->width;&#xA;      pCdcCtxOut->height = pCdcCtxIn->height;&#xA;      pCdcCtxOut->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;      pCdcCtxOut->gop_size = 25;&#xA;&#xA;      // Going for 6Mbit/s&#xA;      pCdcCtxOut->bit_rate = 6000000;&#xA;      //pCdcCtxOut->rc_min_rate = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_max_rate = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_buffer_size = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_initial_buffer_occupancy = static_cast<int>((pCdcCtxOut->bit_rate * 9) / 10);&#xA;&#xA;      std::string strParams = "vbv-maxrate="&#xA;                              &#x2B; std::to_string(pCdcCtxOut->bit_rate / 1000)&#xA;                              &#x2B; ":vbv-bufsize="&#xA;                              &#x2B; std::to_string(pCdcCtxOut->bit_rate / 1000)&#xA;                              &#x2B; ":force-cfr=1:nal-hrd=cbr";&#xA;&#xA;      av_dict_set(&amp;pDict, "x264-params", strParams.c_str(), 0);&#xA;&#xA;      pCdcCtxOut->field_order = AV_FIELD_TT;&#xA;      pCdcCtxOut->flags = (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME | AV_CODEC_FLAG_CLOSED_GOP);&#xA;&#xA;      // WARN: Make some assumptions here!&#xA;      pCdcCtxOut->time_base = AVRational{1,25};&#xA;      pCdcCtxOut->framerate = AVRational{25,1};&#xA;      pCdcCtxOut->sample_aspect_ratio = AVRational{64,45};&#xA;</int>

    &#xA;

    The output graphs appear very different :

    &#xA;

    FFmpeg CLI output

    &#xA;

    Above is the FFmpeg CLI output - video bitrate holds fairly steady.

    &#xA;

    enter image description here

    &#xA;

    Above is the output of my sample application - some significant dips in the video bitrate.

    &#xA;

    I've taken this a step further and created a git repo consisting of :

    &#xA;

      &#xA;
    • Code of sample application
    • &#xA;

    • Test input file (.mp4)
    • &#xA;

    • Outputs (.ts file) of tests
    • &#xA;

    • Graphs of output bitrates.
    • &#xA;

    &#xA;