Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (111)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (8337)

  • ffmpeg jpg frame capture - How to discard corrupted frames

    28 juin 2020, par Ryan Griggs

    I'm using ffmpeg 2.2.2 (Windows) to export a live camera stream into JPG frames. I'm using the command line :

    



    ffmpeg -err_detect aggressive -i rtsp://[ip address]:554/11 -r 1 -s 640x320 -an -f image2 c:\temp\snapshots\snapshot-%03d.jpg


    



    This starts a continuous process which exports approximately 1 frame per second from the live stream. However, at various times during the export, ffmpeg throws errors like this :

    



    [h264 @ 00037ae0] RTP: missed 2 packets=00:01:09.00 bitrate=N/A dup=0 drop=1186
[h264 @ 02fbc340] Cannot use next picture in error concealment
[h264 @ 02fbc340] concealing 4386 DC, 4386 AC, 4386 MV errors in P frame
[h264 @ 00037ae0] RTP: missed 13 packets
[h264 @ 02fbf7a0] left block unavailable for requested intra mode at 0 15p=1196
[h264 @ 02fbf7a0] error while decoding MB 0 15, bytestream 128288
[h264 @ 02fbf7a0] concealing 6409 DC, 6409 AC, 6409 MV errors in I frame


    



    However, it proceeds to create a jpg file that is corrupted. For example, the top of the file is fine, but then the same pixels smear down the rest of the image. Here's an example :
enter image description here

    



    How can I force ffmpeg to either 1) discard these corrupt images after saving, or 2) simply "don't write" the image to a file after an error like this occurs ?

    



    I thought the err_detect flag may help, but it seems to make no difference.

    


  • Using FFMPEG to add a single frame to end of MP4

    22 août 2017, par J. Scull

    I have written some image acquisition software and as I am acquiring these images I want to add the last image onto the end of a video file (a time-lapse of all images acquired so far). This will give a video view of all the images.

    However I am struggling with trying to add the single frame. I have generated the time-lapse fine. The way I am doing this is waiting until I have gathered 10 images, then I generate the time-lapse. The command I have used to generate the time-lapse I will be adding the frames to is :

    -framerate 40 -start_number N -i DSC_%05d.JPG -c:V libx264 -r 30 output.mp4

    I have tried a few different method, all almost working but none quite working as needed. Here is what I’ve tried, with what command and what the outputs are :

    Concat Demuxer to join JPG to MP4
    The text file with list of files to use for the concatenation looks as follows :

    file ’B00334_1.mp4’
    file ’test_image.jpg’
    duration 10

    The command I use to attempt to join the files is :

    ffmpeg -f concat -i concat.txt -c copy outputfile.mp4

    The output from this attempt is a non-corrupt video (score !) but it only shows the first video and does not show any signs of the new frame, especially not for the specified 10 seconds. (I don’t want it there for 10 seconds more like 0.1, however am using 10 seconds just so I can easily see when successful).

    Converting JPG to MP4 then Concat Demuxer
    So I thought ; Maybe it wants a second video instead of an image, so I’ll create a shor, frame-long video and append that onto the end of the time lapse.

    Command used to create MP4 from JPG :

    fmpeg -loop 1 -i test_image.jpg -r -t 5 test_video.mp4

    This generates the video fine, I get a 5 second long video showing the still image. This video does not load a thumbnail, I’m not sure if this means anything. Now the concat.txt file looks like this :

    file ’B00334_1.mp4’
    file ’text_video.mp4’

    Upon running the same command to call the text file shown in the first example I get the output of the first file (time-lapse) + the time of the concatenated video (success !?). However once you reach the point in the video at which it should be showing the image, it just shows the last frame of the timelapse and it glitches downwards for the 5 seconds of the second video. Basically not at all showing the second video and for however long the second video is the last frame will glitch out for that long.

    Converting both JPG and MP4 to .ts then concating back to MP4
    Command used to attempt to turn JPG to TS file :

    ffmpeg -y -i test_image.jpg -c copy -bsf:v h264_mp4toannexb -f mpegts medium1.ts

    This fails and returns the output :
    Codec 'mjpeg' (8) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (28).
    Changing the codec to the apparently supported h264 doesn’t affect the outcome either.

    Converting JPG to MP4 and then to .ts then concatenating
    Creating two TS files from the MP4s is fine, using the same command as before ffmpeg -y -i input.jpg -c copy -bsf:v h264_mp4toannexb -f mpegts output.ts. The newly made files also display as they should, the ts file created from the image just shows the image and the video shows the video. Now with these two new TS files I should be able to concatenate them together right ?

    I try to join these files with the concat protocol function of FFMPEG. Using this command :

    ffmpeg -y -i ’concat:medium1.ts|medium2.ts’ -c copy -bsf:a aac_adtstoasc output.mp4

    Now this joins the videos together ! The time is appended onto the end, and if you skip to the last few seconds you see the newly added image. However if you let the video play, as soon as it hits that second video the media-player crashes.

    Any help and or ideas are greatly appreciated, I can give more information as needed. Thanks for reading.

    Edit : Output log from Mulvya’s answer :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000255c0a0] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from 'concat.txt':
     Duration: N/A, start: 0.000000, bitrate: 44807 kb/s
       Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuvj422p(pc), 2896x1944, 44807 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
       Metadata:
         handler_name    : VideoHandler
    Output #0, mp4, to 'merged.mp4':
     Metadata:
       encoder         : Lavf57.66.102
       Stream #0:0(und): Video: h264 (High 4:2:2) ([33][0][0][0] / 0x0021), yuvj422p(pc), 2896x1944, q=2-31, 44807 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc
       Metadata:
         handler_name    : VideoHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002564840] Auto-inserting h264_mp4toannexb
    bitstream filter
    frame=   60 fps=0.0 q=-1.0 Lsize=    5564kB time=00:00:01.90
    bitrate=23990.6kbits/s speed=30.6x
    video:5563kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024155%
  • ffmpeg error - reference frames exceeds max, video is mp4 from matlab

    23 août 2017, par guyts

    I’m saving videos in matlab as mpeg-4 (using VideoWriter) and when I open them in my media player they seem to be working (albeit not the best quality).
    However, when I’m loading them into another piece of code that uses ffmpeg I’m getting a bunch of errors as seen here :

    [h264 @ 0000000000E0BED0] number of reference frames (0+2) exceeds max (1; proba
    bly corrupt input), discarding one
    [h264 @ 00000000072B0A80] number of reference frames (0+2) exceeds max (1; proba
    bly corrupt input), discarding one

    When using ffprobe, this is the output I get :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'YDXJ0113_left.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
     Duration: 00:00:19.96, start: 0.000000, bitrate: 10733 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x720 [
    SAR 1:1 DAR 8:9], 10725 kb/s, 239.76 fps, 239.76 tbr, 239762 tbn, 479524 tbc (de
    fault)
       Metadata:
         handler_name    : VideoHandler
         encoder         : AVC Coding

    Any ideas how to fix this ?