Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (43)

  • 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 (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (7412)

  • Android ffmpeg very slow to transcode

    23 mars 2016, par Nat

    In Android phones (different phone models) it takes ffmpeg 5x the length of the video to transcode. A 1-minute video takes near 5 minutes to transcode. I have tried the following to improve performance and nothing has helped,

    -b:v 16K to 1024K
    -s 180x120 to 1920x1080
    -preset ultrafast
    -profile:v baseline
    -r 24 to 100
    maxrate 64K to 512K
    rate 64K to 512K
    -threads 0 to 16

    Nothing seems to help. Of course, some of them bring the speed up to 3x from 5x.

    Please help as I have run out of options.

    My current code is,

    ffmpeg -y -i /storage/emulated/0/DCIM/Camera/VID_20150819_220414.mp4 -strict experimental -s 480x270 -vcodec libx264 -r 24 -c:a copy /storage/emulated/0/Android/data/<myapp>/cache/VID_-K-qMCldTSzZomKakNzq.mp4
    </myapp>

    Console log -----

    configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib
    libavutil      51. 54.100 / 51. 54.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavcodec     54. 23.100 / 54. 23.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavformat    54.  6.100 / 54.  6.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavdevice    54.  0.100 / 54.  0.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavfilter     2. 77.100 /  2. 77.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libswscale      2.  1.100 /  2.  1.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libswresample   0. 15.100 /  0. 15.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libpostproc    52.  0.100 / 52.  0.100
    10-05 10:29:22.740: V/VideoEditor(7655): shellOut: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DCIM/Camera/VID_20151002_152817.mp4':
    10-05 10:29:22.740: V/VideoEditor(7655): shellOut:   Metadata:
    10-05 10:29:22.741: V/VideoEditor(7655): shellOut:     major_brand     : mp42
    10-05 10:29:22.741: V/VideoEditor(7655): shellOut:     minor_version   : 0
    10-05 10:29:22.742: V/VideoEditor(7655): shellOut:     compatible_brands: isommp42
    10-05 10:29:22.742: V/VideoEditor(7655): shellOut:     creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.743: V/VideoEditor(7655): shellOut:   Duration: 00:01:14.13, start: 0.000000, bitrate: 17112 kb/s
    10-05 10:29:22.745: V/VideoEditor(7655): shellOut:     Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 16991 kb/s, SAR 65536:65536 DAR 16:9, 29.84 fps, 29.85 tbr, 90k tbn, 180k tbc
    10-05 10:29:22.745: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.747: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.748: V/VideoEditor(7655): shellOut:       handler_name    : VideoHandle
    10-05 10:29:22.749: V/VideoEditor(7655): shellOut:     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 96 kb/s
    10-05 10:29:22.749: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.750: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.751: V/VideoEditor(7655): shellOut:       handler_name    : SoundHandle
    10-05 10:29:22.760: V/VideoEditor(7655): shellOut: [buffer @ 0xb5caa0a0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 sar:65536/65536 sws_param:flags=2
    10-05 10:29:22.760: V/VideoEditor(7655): shellOut: [buffersink @ 0xb5caa0d0] No opaque field provided
    10-05 10:29:22.802: V/VideoEditor(7655): shellOut: [scale @ 0xb5caa100] w:1920 h:1080 fmt:yuv420p sar:65536/65536 -> w:720 h:404 fmt:yuv420p sar:404/405 flags:0x4
    10-05 10:29:22.803: V/VideoEditor(7655): shellOut: [libx264 @ 0xb5c28000] using SAR=1/1
    10-05 10:29:22.818: V/VideoEditor(7655): shellOut: [libx264 @ 0xb5c28000] using cpu capabilities: ARMv6 NEON
    10-05 10:29:22.904: V/VideoEditor(7655): shellOut: [libx264 @ 0xb5c28000] profile High, level 3.0
    shellOut: [libx264 @ 0xb5c28000] 264 - core 125 r680+1521 37be552 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    10-05 10:29:22.909: V/VideoEditor(7655): shellOut: Output #0, mp4, to '/storage/emulated/0/Android/data/com.myapp/cache/VID_-K-t2E4MtV_RTw4a1JXb.mp4':
    10-05 10:29:22.910: V/VideoEditor(7655): shellOut:   Metadata:
    10-05 10:29:22.911: V/VideoEditor(7655): shellOut:     major_brand     : mp42
    10-05 10:29:22.912: V/VideoEditor(7655): shellOut:     minor_version   : 0
    10-05 10:29:22.913: V/VideoEditor(7655): shellOut:     compatible_brands: isommp42
    10-05 10:29:22.913: V/VideoEditor(7655): shellOut:     creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.914: V/VideoEditor(7655): shellOut:     encoder         : Lavf54.6.100
    10-05 10:29:22.916: V/VideoEditor(7655): shellOut:     Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 720x404 [SAR 1:1 DAR 180:101], q=-1--1, 512 kb/s, 24 tbn, 24 tbc
    10-05 10:29:22.916: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.917: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.918: V/VideoEditor(7655): shellOut:       handler_name    : VideoHandle
    10-05 10:29:22.919: V/VideoEditor(7655): shellOut:     Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, mono, 96 kb/s
    10-05 10:29:22.920: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.921: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.922: V/VideoEditor(7655): shellOut:       handler_name    : SoundHandle
    10-05 10:29:22.922: V/VideoEditor(7655): shellOut: Stream mapping:
    10-05 10:29:22.923: V/VideoEditor(7655): shellOut:   Stream #0:0 -> #0:0 (h264 -> libx264)
    10-05 10:29:22.924: V/VideoEditor(7655): shellOut:   Stream #0:1 -> #0:1 (copy)
    10-05 10:29:22.924: V/VideoEditor(7655): shellOut: Press [q] to stop, [?] for help
    10-05 10:29:23.637: V/VideoEditor(7655): shellOut: frame=    6 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
    10-05 10:29:24.205: V/VideoEditor(7655): shellOut: frame=   12 fps= 10 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
    10-05 10:29:24.735: I/chromium(7655): [INFO:CONSOLE(25)] "No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.", source: file:///android_asset/www/plugins/cordova-plugin-whitelist/whitelist.js (25)
    10-05 10:29:24.756: V/VideoEditor(7655): shellOut: frame=   17 fps=9.8 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=1    
    10-05 10:29:25.327: V/VideoEditor(7655): shellOut: frame=   22 fps=9.5 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=2    
    10-05 10:29:25.904: V/VideoEditor(7655): shellOut: frame=   26 fps=9.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=4    

  • FFMPEG - adding a nullsrc causes my script to report "1000 duplicate frames"

    14 juin 2020, par rossmcm

    I'm trying to add coloured rectangle highlights to a video, appearing at different locations and times. The highlights are on a 6x6 grid of 320x180 rectangles.

    &#xA;&#xA;

    Originally I didn't have the nullsrc=size=1920x1080 thinking that it would start with an empty image, but it seems that that causes it to make assumptions about where the input is coming from. So I added the nullsrc=size=1920x1080 to start with a transparent 1920x1080 image but this command returns a warning that 1000 duplicate frames have been produced and it keeps going past the end of the input video with no signs of stopping.

    &#xA;&#xA;

    ffmpeg -y \       &#xA;  -i "Input.mp4" \           &#xA;  -filter_complex \ &#xA; "nullsrc=size=1920x1080, drawbox=x=(3-1)*320:y=(3-1)*180:w=320:h=180:t=7:c=cyan,   fade=in:st=10:d=1:alpha=1, fade=out:st=40:d=1:alpha=1[tmp1]; \&#xA;  nullsrc=size=1920x1080, drawbox=x=(4-1)*320:y=(4-1)*180:w=320:h=180:t=7:c=blue,   fade=in:st=20:d=1:alpha=1, fade=out:st=50:d=1:alpha=1[tmp2]; \&#xA;  nullsrc=size=1920x1080, drawbox=x=(5-1)*320:y=(5-1)*180:w=320:h=180:t=7:c=green,  fade=in:st=30:d=1:alpha=1, fade=out:st=60:d=1:alpha=1[tmp3]; \&#xA;  nullsrc=size=1920x1080, drawbox=x=(6-1)*320:y=(6-1)*180:w=320:h=180:t=7:c=yellow, fade=in:st=40:d=1:alpha=1, fade=out:st=70:d=1:alpha=1[tmp4]; \&#xA;  [tmp1][tmp2] overlay=0:0[ovr1]; \ &#xA;  [tmp3][tmp4] overlay=0:0[ovr2]; \ &#xA;  [ovr1][ovr2] overlay=0:0[boxes]; \ &#xA;  [0:v][boxes] overlay=0:0" \        &#xA;  "Output.mp4"&#xA;

    &#xA;&#xA;

    The input video is around 01:45 long. Log of run :

    &#xA;&#xA;

    ffmpeg -y        -loglevel verbose       -i "Input.mp4"          -filter_complex " nullsrc=size=1920x1080, drawbox=x=(3-1)*320:y=(3-1)*180:w=320:h=180:t=7:c=cyan,   fade=in:st=10:d=1:alpha=1, fade=out:st=40:d=1:alpha=1[tmp1]; nullsrc=size=1920x1080, drawbox=x  =(4-1)*320:y=(4-1)*180:w=320:h=180:t=7:c=blue,   fade=in:st=20:d=1:alpha=1, fade=out:st=50:d=1:alpha=1[tmp2]; nullsrc=size=1920x1080, drawbox=x=(5-1)*320:y=(5-1)*180:w=320:h=180:t=7:c=green,  fa&#xA;de=in:st=30:d=1:alpha=1, fade=out:st=60:d=1:alpha=1[tmp3]; nullsrc=size=1920x1080, drawbox=x=(6-1)*320:y=(6-1)*180:w=320:h=180:t=7:c=yellow, fade=in:st=40:d=1:alpha=1, fade=out:st=70:d=1:alpha=1[tmp4]; [tmp1][tmp2] overlay=0:0[ovr1]; [tmp3][tmp4] overlay=0:0[ovr2]; [ovr1][ovr2] overlay=0:0[boxes]; [0:v][boxes] overlay=0:0"      "Output.mp4"&#xA;ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers&#xA;  built with gcc 7.2.0 (GCC)&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvid&#xA;stab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;[h264 @ 000001df2b623ea0] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;Input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.29.100&#xA;  Duration: 00:01:48.67, start: 0.000000, bitrate: 1825 kb/s&#xA;    Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 1693 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, s16p, 127 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;[Parsed_nullsrc_0 @ 000001df2b61af00] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_2 @ 000001df2b6a6860] type:in start_time:10.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_3 @ 000001df2b9ddec0] type:out start_time:40.000000 duration:1.000000 alpha:1&#xA;[Parsed_nullsrc_4 @ 000001df2bc00560] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_6 @ 000001df29fe6780] type:in start_time:20.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_7 @ 000001df29fe6840] type:out start_time:50.000000 duration:1.000000 alpha:1&#xA;[Parsed_nullsrc_8 @ 000001df2b642dc0] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_10 @ 000001df2b6442a0] type:in start_time:30.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_11 @ 000001df2b6444e0] type:out start_time:60.000000 duration:1.000000 alpha:1&#xA;[Parsed_nullsrc_12 @ 000001df2b62d000] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_14 @ 000001df2b62d580] type:in start_time:40.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_15 @ 000001df2b62ddc0] type:out start_time:70.000000 duration:1.000000 alpha:1&#xA;Stream mapping:&#xA;  Stream #0:0 (h264) -> overlay:main (graph 0)&#xA;  overlay (graph 0) -> Stream #0:0 (libx264)&#xA;  Stream #0:1 -> #0:1 (mp3 (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[h264 @ 000001df2b8e5040] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[graph_1_in_0_1 @ 000001df2b62e100] tb:1/44100 samplefmt:s16p samplerate:44100 chlayout:0x3&#xA;[format_out_0_1 @ 000001df2b62e5e0] auto-inserting filter &#x27;auto_resampler_0&#x27; between the filter &#x27;Parsed_anull_0&#x27; and the filter &#x27;format_out_0_1&#x27;&#xA;[auto_resampler_0 @ 000001df2b62dd00] ch:2 chl:stereo fmt:s16p r:44100Hz -> ch:2 chl:stereo fmt:fltp r:44100Hz&#xA;[Parsed_nullsrc_0 @ 000001df2b62e440] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_2 @ 000001df2b62df60] type:in start_time:10.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_3 @ 000001df2b62e6c0] type:out start_time:40.000000 duration:1.000000 alpha:1&#xA;[Parsed_nullsrc_4 @ 000001df2b62d9c0] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_6 @ 000001df2b62e520] type:in start_time:20.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_7 @ 000001df2b62d8e0] type:out start_time:50.000000 duration:1.000000 alpha:1&#xA;[Parsed_nullsrc_8 @ 000001df2b62e1e0] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_10 @ 000001df2b62e2a0] type:in start_time:30.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_11 @ 000001df2b62e380] type:out start_time:60.000000 duration:1.000000 alpha:1&#xA;[Parsed_nullsrc_12 @ 000001df2b62dc20] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1&#xA;[Parsed_fade_14 @ 000001df2b816f60] type:in start_time:40.000000 duration:1.000000 alpha:1&#xA;[Parsed_fade_15 @ 000001df2b817ac0] type:out start_time:70.000000 duration:1.000000 alpha:1&#xA;[graph 0 input from stream 0:0 @ 000001df2b817ba0] w:1920 h:1080 pixfmt:yuv420p tb:1/15360 fr:30/1 sar:1/1 sws_param:flags=2&#xA;[Parsed_drawbox_1 @ 000001df2b62da80] x:640 y:360 w:320 h:180 color:0xA9A610FF&#xA;[Parsed_drawbox_5 @ 000001df2b62e780] x:960 y:540 w:320 h:180 color:0x29F06EFF&#xA;[Parsed_overlay_16 @ 000001df2b817860] main w:1920 h:1080 fmt:yuva420p overlay w:1920 h:1080 fmt:yuva420p&#xA;[Parsed_overlay_16 @ 000001df2b817860] [framesync @ 000001df2b815348] Selected 1/25 time base&#xA;[Parsed_overlay_16 @ 000001df2b817860] [framesync @ 000001df2b815348] Sync level 2&#xA;[Parsed_drawbox_9 @ 000001df2b62db60] x:1280 y:720 w:320 h:180 color:0x515B51FF&#xA;[Parsed_drawbox_13 @ 000001df2b818be0] x:1600 y:900 w:320 h:180 color:0xD21092FF&#xA;[Parsed_overlay_17 @ 000001df2b816d00] main w:1920 h:1080 fmt:yuva420p overlay w:1920 h:1080 fmt:yuva420p&#xA;[Parsed_overlay_17 @ 000001df2b816d00] [framesync @ 000001df2b815e48] Selected 1/25 time base&#xA;[Parsed_overlay_17 @ 000001df2b816d00] [framesync @ 000001df2b815e48] Sync level 2&#xA;[Parsed_overlay_18 @ 000001df2b8183c0] main w:1920 h:1080 fmt:yuva420p overlay w:1920 h:1080 fmt:yuva420p&#xA;[Parsed_overlay_18 @ 000001df2b8183c0] [framesync @ 000001df2b815668] Selected 1/25 time base&#xA;[Parsed_overlay_18 @ 000001df2b8183c0] [framesync @ 000001df2b815668] Sync level 2&#xA;[Parsed_overlay_19 @ 000001df2b817d40] main w:1920 h:1080 fmt:yuv420p overlay w:1920 h:1080 fmt:yuva420p&#xA;[Parsed_overlay_19 @ 000001df2b817d40] [framesync @ 000001df2b816488] Selected 1/76800 time base&#xA;[Parsed_overlay_19 @ 000001df2b817d40] [framesync @ 000001df2b816488] Sync level 2&#xA;[libx264 @ 000001df2b62cd40] using SAR=1/1&#xA;[libx264 @ 000001df2b62cd40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 000001df2b62cd40] profile High, level 4.0&#xA;[libx264 @ 000001df2b62cd40] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weigh&#xA;tb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;Output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Video: h264 (libx264), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, delay 1024, 128 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      encoder         : Lavc57.107.100 aac&#xA;[Parsed_overlay_19 @ 000001df2b817d40] [framesync @ 000001df2b816488] Sync level 1speed=0.78x&#xA;Past duration 0.800774 too large&#xA;*** 1 dup!5 fps= 24 q=29.0 size=   21760kB time=00:01:46.86 bitrate=1668.0kbits/s speed=0.78x&#xA;    Last message repeated 1 times&#xA;*** 1 dup!8 fps= 24 q=29.0 size=   21760kB time=00:01:47.30 bitrate=1661.3kbits/s dup=2 drop=0 speed=0.78x&#xA;    Last message repeated 2 times&#xA;*** 1 dup!3 fps= 24 q=29.0 size=   21760kB time=00:01:47.80 bitrate=1653.6kbits/s dup=5 drop=0 speed=0.781x&#xA;    Last message repeated 1 times&#xA;&#xA;...&#xA;&#xA;    Last message repeated 2 times&#xA;*** 1 dup!3 fps= 25 q=29.0 size=   27392kB time=00:05:05.80 bitrate= 733.8kbits/s dup=995 drop=0 speed=0.832x&#xA;    Last message repeated 1 times&#xA;*** 1 dup!6 fps= 25 q=29.0 size=   27392kB time=00:05:06.23 bitrate= 732.8kbits/s dup=997 drop=0 speed=0.832x&#xA;    Last message repeated 1 times&#xA;*** 1 dup!0 fps= 25 q=29.0 size=   27392kB time=00:05:06.70 bitrate= 731.6kbits/s dup=999 drop=0 speed=0.832x&#xA;    Last message repeated 1 times&#xA;More than 1000 frames duplicated&#xA;*** 1 dup!3 fps= 25 q=29.0 size=   27392kB time=00:05:07.13 bitrate= 730.6kbits/s dup=1001 drop=0 speed=0.832x&#xA;    Last message repeated 2 times&#xA;*** 1 dup!8 fps= 25 q=29.0 size=   27392kB time=00:05:07.63 bitrate= 729.4kbits/s dup=1004 drop=0 speed=0.832x&#xA;    Last message repeated 1 times&#xA;... &#xA;*** 1 dup!9 fps= 25 q=29.0 size=   27904kB time=00:05:18.66 bitrate= 717.3kbits/s dup=1059 drop=0 speed=0.834x&#xA;    Last message repeated 1 times&#xA;*** 1 dup!3 fps= 25 q=29.0 size=   27904kB time=00:05:19.13 bitrate= 716.3kbits/s dup=1061 drop=0 speed=0.834x&#xA;frame= 9635 fps= 25 q=-1.0 Lsize=   28364kB time=00:05:21.06 bitrate= 723.7kbits/s dup=1062 drop=0 speed=0.837x&#xA;video:26539kB audio:1637kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.669889%&#xA;Input file #0 (Input.mp4):&#xA;  Input stream #0:0 (video): 3260 packets read (23006797 bytes); 3260 frames decoded;&#xA;  Input stream #0:1 (audio): 4025 packets read (1682285 bytes); 4025 frames decoded (4636800 samples);&#xA;  Total: 7285 packets (24689082 bytes) demuxed&#xA;Output file #0 (Output.mp4):&#xA;  Output stream #0:0 (video): 9635 frames encoded; 9635 packets muxed (27175566 bytes);&#xA;  Output stream #0:1 (audio): 4529 frames encoded (4636800 samples); 4530 packets muxed (1676214 bytes);&#xA;  Total: 14165 packets (28851780 bytes) muxed&#xA;[libx264 @ 000001df2b62cd40] frame I:39    Avg QP:16.49  size:213954&#xA;[libx264 @ 000001df2b62cd40] frame P:2446  Avg QP:17.77  size:  6277&#xA;[libx264 @ 000001df2b62cd40] frame B:7150  Avg QP:30.38  size:   486&#xA;[libx264 @ 000001df2b62cd40] consecutive B-frames:  0.8%  0.8%  0.1% 98.3%&#xA;[libx264 @ 000001df2b62cd40] mb I  I16..4: 13.2% 43.0% 43.8%&#xA;[libx264 @ 000001df2b62cd40] mb P  I16..4:  0.2%  0.2%  0.1%  P16..4:  7.1%  3.3%  1.7%  0.0%  0.0%    skip:87.5%&#xA;[libx264 @ 000001df2b62cd40] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  4.3%  0.1%  0.0%  direct: 0.0%  skip:95.5%  L0:41.9% L1:56.1% BI: 2.0%&#xA;[libx264 @ 000001df2b62cd40] 8x8 transform intra:44.1% inter:65.8%&#xA;[libx264 @ 000001df2b62cd40] coded y,uvDC,uvAC intra: 71.3% 83.5% 52.5% inter: 1.1% 1.5% 0.0%&#xA;[libx264 @ 000001df2b62cd40] i16 v,h,dc,p: 31% 28%  4% 38%&#xA;[libx264 @ 000001df2b62cd40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 20% 10%  6%  6%  7%  7%  8%  8%&#xA;[libx264 @ 000001df2b62cd40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 28%  7%  4%  6%  6%  6%  5%  5%&#xA;[libx264 @ 000001df2b62cd40] i8c dc,h,v,p: 34% 27% 28% 11%&#xA;[libx264 @ 000001df2b62cd40] Weighted P-Frames: Y:0.0% UV:0.0%&#xA;[libx264 @ 000001df2b62cd40] ref P L0: 71.1% 14.9% 10.6%  3.4%&#xA;[libx264 @ 000001df2b62cd40] ref B L0: 93.3%  5.9%  0.8%&#xA;[libx264 @ 000001df2b62cd40] ref B L1: 97.8%  2.2%&#xA;[libx264 @ 000001df2b62cd40] kb/s:676.90&#xA;[aac @ 000001df2b6a5620] Qavg: 1165.766&#xA;Exiting normally, received signal 2.&#xA;Terminate batch job (Y/N)? y&#xA;

    &#xA;

  • Q. FFMPEG - linux (Rasberry pi 4- Raspbian)- FFMPEG av_read_frame error

    5 juin 2020, par KNS

    User environment

    &#xA;&#xA;

    -Raspberry Pi 4B 4G x2

    &#xA;&#xA;

    -arm32 & arm64

    &#xA;&#xA;

    -OS : Raspbian

    &#xA;&#xA;

    -gcc (Raspbian 8.3.0-6+rpi1) 8.3.0

    &#xA;&#xA;

    -ffmpeg version 4.1.4-1+rpt7 deb10u1&#xA; built with gcc 8 (Raspbian 8.3.0-6+rpi1)

    &#xA;&#xA;

    -IDE-visual studio 2017-ssh connetction

    &#xA;&#xA;

    Good morning. I have a question and post it.

    &#xA;&#xA;

    When Raspbian is installed, the installed FFMPEG library is used.

    &#xA;&#xA;

    I want to output a video display - file encoded in h264 using gtk3.0.

    &#xA;&#xA;

    When I open the video file & find the codec and try to read the frame,&#xA;I get an error and I'm asking.Error symptoms

    &#xA;&#xA;

      &#xA;
    1. AVPacket struct memory padding ? error
    2. &#xA;

    &#xA;&#xA;

    2.AVPacket-data error:Cannot access memory at address 0xxxxxxxxxxxx>

    &#xA;&#xA;

      &#xA;
    1. AVPacket-stream_index value error- The stream_index and flags values ​​seem to have been reversed.
    2. &#xA;

    &#xA;&#xA;

    my source code and error photos are attached.&#xA;Thank you.

    &#xA;&#xA;

    case 1 stream_index error (flags value ->stream_index)

    &#xA;&#xA;

    enter image description here

    &#xA;&#xA;

    case 2 data memory access error

    &#xA;&#xA;

    enter image description here

    &#xA;&#xA;

    typedef struct _struMovContext2&#xA;{&#xA;AVFormatContext*    pFormatCtx;&#xA;AVCodecContext*     pVCodecCtx;&#xA;AVCodecContext*     pACodecCtx;&#xA;AVCodec*            pVCodec;&#xA;AVCodec*            pACodec;&#xA;int                 nVStreamIndex;&#xA;int                 nAStreamIndex;&#xA;struct SwsContext*  pSwsCtx;&#xA;GtkWidget*          pImage;&#xA;pthread_t           tID;    &#xA;}MovContext2;&#xA;&#xA;static MovContext2      Ctx;&#xA;&#xA;static void pixmap_destroy_nf(guchar *pixels, gpointer data)&#xA;{&#xA;    printf("Destroy pixmap - not sure how\n");&#xA;}&#xA;&#xA;static void* PlayBackGround(void* pData)&#xA;{&#xA;MovContext2*    pCtx = NULL;&#xA;GdkPixbuf*      pixbuf = NULL;&#xA;GError*         error = NULL;   &#xA;int             nFrameWidth, nFrameHeight;&#xA;int             nFrameEos = 0;&#xA;AVFrame*        pFrame = NULL;&#xA;AVFrame*        pPicture_RGB = NULL;&#xA;AVPacket        packet;&#xA;uint8_t*        pBuffer = NULL;&#xA;&#xA;cairo_surface_t*    surface = NULL;&#xA;cairo_t*            cr = NULL;&#xA;&#xA;//if ((pCtx = static_cast(pData)) == NULL)&#xA;pCtx = &amp;Ctx;&#xA;if(pCtx == NULL)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t get context struct - Data nullpointer");&#xA;    return NULL;&#xA;}&#xA;&#xA;printf("In Thread - PlayBackGround\n");&#xA;&#xA;&#xA;if ((pFrame = av_frame_alloc()) == NULL)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t alloc frame");&#xA;    return NULL;&#xA;}&#xA;&#xA;if ((pPicture_RGB = av_frame_alloc()) == NULL)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t alloc Picture RGB");&#xA;    return NULL;&#xA;}&#xA;&#xA;if ((pBuffer = (uint8_t*)malloc(avpicture_get_size(AV_PIX_FMT_RGB24, 1920, 1080))) == NULL)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t malloc data buffer");&#xA;    return NULL;&#xA;}&#xA;avpicture_fill((AVPicture*)pPicture_RGB, pBuffer, AV_PIX_FMT_RGB24, 1920, 1080);*/&#xA;&#xA;av_init_packet(&amp;packet);    &#xA;packet.data = NULL;&#xA;packet.size = 0;&#xA;&#xA;//packet = *av_packet_alloc();&#xA;&#xA;while (av_read_frame(pCtx->pFormatCtx, &amp;packet) >= 0)&#xA;{&#xA;    printf("Read packet stream index : %d\n", packet.stream_index);&#xA;&#xA;    if (packet.stream_index == pCtx->nVStreamIndex)&#xA;    {&#xA;        //av_usleep(33670);&#xA;&#xA;        printf("Decoding to frame start\n");&#xA;        if (avcodec_decode_video2(pCtx->pVCodecCtx, pFrame, &amp;nFrameEos, &amp;packet) &lt; 0)&#xA;        {&#xA;            av_log(NULL, AV_LOG_ERROR, "Decod video error");&#xA;            return NULL;&#xA;        }&#xA;        printf("Decoding to frame end\n");&#xA;&#xA;        nFrameWidth = pCtx->pVCodecCtx->width;&#xA;        nFrameHeight = pCtx->pVCodecCtx->height;&#xA;&#xA;        printf("frame Width : %d, Height : %d\n", nFrameWidth, nFrameHeight);&#xA;&#xA;        pCtx->pSwsCtx = sws_getContext(nFrameWidth,&#xA;            nFrameHeight,&#xA;            pCtx->pVCodecCtx->pix_fmt,&#xA;            nFrameWidth,&#xA;            nFrameHeight,&#xA;            AV_PIX_FMT_RGB24,&#xA;            SWS_BICUBIC,&#xA;            NULL, NULL, NULL);&#xA;&#xA;        printf("sws Get context\n");&#xA;&#xA;        if (nFrameEos > 0)&#xA;        {&#xA;            sws_scale(  pCtx->pSwsCtx,&#xA;                        pFrame->data,&#xA;                        pFrame->linesize,&#xA;                        0,&#xA;                        nFrameHeight,&#xA;                        pPicture_RGB->data,&#xA;                        pPicture_RGB->linesize);&#xA;&#xA;            printf("sws set scale\n");&#xA;&#xA;            pixbuf = gdk_pixbuf_new_from_data(pPicture_RGB->data[0],&#xA;                GDK_COLORSPACE_RGB,&#xA;                0,&#xA;                8,&#xA;                nFrameWidth,&#xA;                nFrameHeight,&#xA;                pPicture_RGB->linesize[0],&#xA;                pixmap_destroy_nf,&#xA;                NULL);&#xA;&#xA;            printf("create pixbuf from frame data\n");&#xA;&#xA;            gtk_image_set_from_pixbuf((GtkImage*)pCtx->pImage, pixbuf);&#xA;&#xA;            g_object_unref(pixbuf);&#xA;            cairo_surface_destroy(surface);&#xA;            cairo_destroy(cr);&#xA;&#xA;            //gdk_threads_leave();&#xA;&#xA;        }&#xA;        av_free_packet(&amp;packet);&#xA;    }&#xA;}&#xA;&#xA;&#xA;printf("Exit Thread\n");&#xA;&#xA;return NULL;&#xA;}&#xA;&#xA;&#xA;int main(int argc, char *argv[])&#xA;{&#xA;GtkWidget*          overlay;&#xA;GtkWidget*          eventBox;&#xA;GError*             err = NULL;&#xA;CMonitorManager*    pManager;&#xA;GdkRectangle        Rect;&#xA;char*               pFileURI = "/home/pi/test.mp4";&#xA;//char*             pFileURI = "/home/ubuntu/test.mp4";&#xA;//char*             pFileURI = "/home/ubuntu/cev.avi";&#xA;int                 nIndex;&#xA;//MovContext2           Ctx;&#xA;&#xA;//XInitThreads();   &#xA;memset(&amp;Ctx, 0x00, sizeof(Ctx));&#xA;av_register_all();&#xA;&#xA;if (avformat_open_input(&amp;Ctx.pFormatCtx, pFileURI, NULL, NULL) != 0)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t open file");&#xA;    return FALSE;&#xA;}&#xA;printf("C - open uri\n");&#xA;&#xA;if (avformat_find_stream_info(Ctx.pFormatCtx, NULL) != 0)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t find stream information");&#xA;    return FALSE;&#xA;}&#xA;printf("C - find stream info\n");&#xA;&#xA;av_dump_format(Ctx.pFormatCtx, 0, pFileURI, 0);&#xA;printf("C - media dump\n");&#xA;&#xA;Ctx.nVStreamIndex = av_find_best_stream(Ctx.pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);&#xA;if (Ctx.nVStreamIndex == AVERROR_STREAM_NOT_FOUND)&#xA;{&#xA;    for (nIndex = 0; nIndex &lt; Ctx.pFormatCtx->nb_streams; nIndex&#x2B;&#x2B;)&#xA;    {&#xA;        if (Ctx.pFormatCtx->streams[nIndex]->codec->codec_type == AVMEDIA_TYPE_VIDEO)&#xA;        {&#xA;            Ctx.nVStreamIndex = nIndex;&#xA;            break;&#xA;        }&#xA;    }&#xA;&#xA;    if (Ctx.nVStreamIndex &lt; 0)&#xA;    {&#xA;        av_log(NULL, AV_LOG_ERROR, "Didn&#x27;t find a video stream");&#xA;        return FALSE;&#xA;    }&#xA;}&#xA;printf("C - get video stream index\n");&#xA;&#xA;Ctx.nAStreamIndex = av_find_best_stream(Ctx.pFormatCtx, AVMEDIA_TYPE_AUDIO, Ctx.nVStreamIndex, -1, NULL, 0);&#xA;if (Ctx.nAStreamIndex == AVERROR_STREAM_NOT_FOUND)&#xA;{&#xA;    for (nIndex = 0; nIndex &lt; Ctx.pFormatCtx->nb_streams; nIndex&#x2B;&#x2B;)&#xA;    {&#xA;        if (Ctx.pFormatCtx->streams[nIndex]->codec->codec_type == AVMEDIA_TYPE_AUDIO)&#xA;        {&#xA;            Ctx.nAStreamIndex = nIndex;&#xA;            break;&#xA;        }&#xA;    }&#xA;&#xA;    if (Ctx.nAStreamIndex &lt; 0)&#xA;    {&#xA;        av_log(NULL, AV_LOG_ERROR, "Didn&#x27;t find a audio stream");&#xA;    }&#xA;}&#xA;printf("C - get audio stream index\n");&#xA;&#xA;if ((Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar = avcodec_parameters_alloc()) == NULL)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t alloc video codec parameters");&#xA;    return FALSE;&#xA;}&#xA;avcodec_parameters_from_context(Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar,&#xA;    Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codec);&#xA;printf("C - video codec parameter alloc\n");&#xA;&#xA;&#xA;Ctx.pVCodec = avcodec_find_decoder(Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar->codec_id);&#xA;printf("C - find video codec %s \n", Ctx.pVCodec->long_name);&#xA;Ctx.pVCodecCtx = avcodec_alloc_context3(Ctx.pVCodec);&#xA;&#xA;avcodec_parameters_to_context(Ctx.pVCodecCtx, Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar);&#xA;&#xA;if (avcodec_open2(Ctx.pVCodecCtx, Ctx.pVCodec, NULL) &lt; 0)&#xA;{&#xA;    av_log(NULL, AV_LOG_ERROR, "Could not open video codec");&#xA;    return FALSE;&#xA;}&#xA;printf("C - video codec context oepn\n");&#xA;&#xA;if (Ctx.nAStreamIndex > 0)&#xA;{&#xA;    if ((Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codecpar = avcodec_parameters_alloc()) != NULL)&#xA;    {&#xA;        avcodec_parameters_from_context(Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codecpar,&#xA;            Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codec);&#xA;        printf("C - audio codec parameter alloc\n");&#xA;&#xA;        Ctx.pACodec = avcodec_find_decoder(Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codecpar->codec_id);&#xA;        printf("C - find audio codec\n");&#xA;        Ctx.pACodecCtx = avcodec_alloc_context3(Ctx.pACodec);&#xA;&#xA;        if (avcodec_open2(Ctx.pACodecCtx, Ctx.pACodec, NULL) &lt; 0) {&#xA;            av_log(NULL, AV_LOG_ERROR, "Could not open audio codec");&#xA;        }&#xA;        printf("C - audio codec context oepn\n");&#xA;    }&#xA;    else&#xA;    {&#xA;        av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t alloc video codec parameters");&#xA;    }&#xA;}&#xA;&#xA;Ctx.pVCodecCtx->width = 1920;&#xA;Ctx.pVCodecCtx->height = 1080;&#xA;&#xA;Ctx.pSwsCtx = sws_getContext(Ctx.pVCodecCtx->width,&#xA;    Ctx.pVCodecCtx->height,&#xA;    Ctx.pVCodecCtx->pix_fmt,&#xA;    Ctx.pVCodecCtx->width,&#xA;    Ctx.pVCodecCtx->height,&#xA;    AV_PIX_FMT_YUV420P,&#xA;    SWS_BILINEAR,&#xA;    NULL,&#xA;    NULL,&#xA;    NULL);&#xA;&#xA;pthread_create(&amp;Ctx.tID, NULL, PlayBackGround, &amp;Ctx);&#xA;&#xA;GtkWidget *window;&#xA;&#xA;gtk_init(&amp;argc, &amp;argv);&#xA;&#xA;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&#xA;&#xA;Ctx.pImage = gtk_image_new();&#xA;gtk_container_add(GTK_CONTAINER(window), Ctx.pImage);&#xA;&#xA;gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);&#xA;gtk_window_set_default_size(GTK_WINDOW(window), 1920, 1080);&#xA;gtk_widget_show_all(window);&#xA;&#xA;gtk_main();&#xA;&#xA;return 0;&#xA;}&#xA;

    &#xA;