Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (79)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (5536)

  • Batch process audio files and image files to create movie files by matching multiple wildcard values

    29 septembre 2022, par psychaudio

    I'm attempting to batch-process audio and image files to create video files using a Shell script with FFmpeg.

    


      

    1. The ffmpeg script works in Terminal :
    2. 


    


    ffmpeg -loop 1 -i image.png -i audio.wav -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest output.mp4


    


      

    1. A nested for loop with wildcards works as a batch script :
    2. 


    


    #!/bin/sh
for img in *.png; do
    for wav in *.wav; do
        ffmpeg -loop 1 -i $img -i $wav -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest ../mb/$img.mp4
    done
done


    


    The only problem here is that it creates more combinations than I need. I'd like to be able to match wildcard values and only mix those together. I'd like to be able to prepare the filenames to match in advance to make this easier : For example, only match 1.png with 1.wav to make 1.mp4, 2.png with 2.wav to make 2.mp4 and so on. I'm able to modify the script to match the wildcards in a Regex, but I'm not sure if there is a way to then execute the logic above. Here is what I am attempting :

    


    #!/bin/sh
img=*.png
wav=*.wav

if [[ ${img%.*} == ${wav%.*} ]];
    then
        ffmpeg -loop 1 -i $img -i $wav -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest $img.mp4;
    else
        echo "Failure"
    fi


    


    This begins by overwriting the image files, so it does not appear to work as planned. Is there a simpler way to do this ? Perhaps looping through images 1..5 in one folder and audio files 1..5 in another ?

    


    Thanks for any insights, and happy to provide more context (very new to this, so still learning).

    


  • Convert MPEG4 to MPEGTS on Android with FFmpeg

    3 juin 2013, par Ardoramor

    Ok, so obviously I know very little to none about ffmpeg API when I made the original post... it is quite overwhelming when one starts learning about digital media and conversion details. After reading quite a bit more and going through ffmpeg source, I was able to get a working output from mp4 to mpegts. The concept is similar to executing :

    ffmpeg -i in.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb out.ts

    But as I mentioned before, I need to implement it with ffmpeg API in C.

    So, although I am able to generate a playable .ts file, its video and audio streams are not synced. That is, playing them back on Android tablet plays the video very slowly while audio is playing at normal speed and then (once audio stream ends) video plays at normal speed to the end. Playing the same generated .ts file in VLC produces a very condensed audio (as though fast-forwarded) and plays video fine.

    There are still many aspects of media conversion that I am not familiar with. I am sure that some of them prevent me from successful conversion.

    Here is some information (via ffprobe) about the files :
    - in.mp4 - file generated via Android recording - MPEG4 (H.264 + AAC)
    - ffmpeg.ts - file generated via ffmpeg conversion - MPEG2TS (H.264 + AAC)
    - out.ts - file generated via my code - MPEGTS (H.264 + AAC)

    in.mp4

    filename=in.mp4
    nb_streams=2
    format_name=mov,mp4,m4a,3gp,3g2,mj2
    format_long_name=QuickTime/MPEG-4/Motion JPEG 2000 format
    start_time=0:00:00.000000
    duration=0:00:09.961383
    size=4.730 Mibyte
    bit_rate=3.983 Mbit/s
    TAG:major_brand=isom
    TAG:minor_version=0
    TAG:compatible_brands=isom3gp4
    TAG:creation_time=2013-05-28 17:06:57

    ffmpeg.ts

    filename=ffmpeg.ts
    nb_streams=2
    format_name=mpegts
    format_long_name=MPEG-2 transport stream format
    start_time=0:00:01.400000
    duration=0:00:09.741267
    size=5.132 Mibyte
    bit_rate=4.419 Mbit/s

    out.ts

    filename=out.ts
    nb_streams=2
    format_name=mpegts
    format_long_name=MPEG-2 transport stream format
    start_time=0:00:00.000000
    duration=0:00:09.741267
    size=5.166 Mibyte
    bit_rate=4.449 Mbit/s

    Firstly, I was unable to affect my output file's start_time. Next, upon examining the -show_packets output of probe, I saw the following :

    ffmpeg.ts

    [PACKET]
    codec_type=video
    stream_index=0
    pts=N/A
    pts_time=N/A
    dts=N/A
    dts_time=N/A
    duration=0
    duration_time=0:00:00.000000
    size=20.506 Kibyte
    pos=564
    flags=K
    [/PACKET]
    [PACKET]
    codec_type=video
    stream_index=0
    pts=N/A
    pts_time=N/A
    dts=N/A
    dts_time=N/A
    duration=0
    duration_time=0:00:00.000000
    size=11.727 Kibyte
    pos=22936
    flags=_
    [/PACKET]
    ...
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=126000
    pts_time=0:00:01.400000
    dts=126000
    dts_time=0:00:01.400000
    duration=2089
    duration_time=0:00:00.023211
    size=285.000 byte
    pos=109416
    flags=K
    [/PACKET]
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=128089
    pts_time=0:00:01.423211
    dts=128089
    dts_time=0:00:01.423211
    duration=2089
    duration_time=0:00:00.023211
    size=374.000 byte
    pos=-1
    flags=K
    [/PACKET]
    ...
    [PACKET]
    codec_type=video
    stream_index=0
    pts=N/A
    pts_time=N/A
    dts=N/A
    dts_time=N/A
    duration=0
    duration_time=0:00:00.000000
    size=20.000 Kibyte
    pos=87232
    flags=_
    [/PACKET]
    [PACKET]
    codec_type=video
    stream_index=0
    pts=N/A
    pts_time=N/A
    dts=N/A
    dts_time=N/A
    duration=0
    duration_time=0:00:00.000000
    size=16.852 Kibyte
    pos=112800
    flags=_
    [/PACKET]

    out.ts

    [PACKET]
    codec_type=audio
    stream_index=1
    pts=0
    pts_time=0:00:00.000000
    dts=0
    dts_time=0:00:00.000000
    duration=2089
    duration_time=0:00:00.023211
    size=285.000 byte
    pos=22936
    flags=K
    [/PACKET]
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=1024
    pts_time=0:00:00.011378
    dts=1024
    dts_time=0:00:00.011378
    duration=2089
    duration_time=0:00:00.023211
    size=374.000 byte
    pos=23312
    flags=K
    [/PACKET]
    ...

    [PACKET]
    codec_type=video
    stream_index=0
    pts=N/A
    pts_time=N/A
    dts=N/A
    dts_time=N/A
    duration=0
    duration_time=0:00:00.000000
    size=11.727 Kibyte
    pos=25004
    flags=_
    [/PACKET]
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=7168
    pts_time=0:00:00.079644
    dts=7168
    dts_time=0:00:00.079644
    duration=2089
    duration_time=0:00:00.023211
    size=299.000 byte
    pos=55460
    flags=K
    [/PACKET]

    As you can see, ffmpeg.ts starts out with video packets that do not have pts/dts. The audio packets that follow contain pts/dts. This repeats until the end. All video packets do not have pts/dts according to ffprobe output.

    However, out.ts starts with audio packets and alternate with video packets. Here, video packets also do not have pts/dts. The difference is that here there is one video packet between a series of audio packets. What happened to the rest of the video packets (ffmpeg.ts has 5 audio followed by 5 video).

    Obviously, I'm still learning and don't know way too much yet... Does anything jump out as obvious a problem to anyone ? I will greatly appreciate any info / suggestions but will continue to grind at it !!

  • Not able to display first frame of mp4 file

    23 juin 2024, par Jatin Parmar

    I am learning OpenCV from YouTube, and I just created a very basic program in Python.

    


    import cv2 as cv

sources = cv.VideoCapture("test.mp4");

if not sources.isOpened():
    print("Failed to open video file");
else:
    print("video file opened successfully");

win_name = "test"
cv.namedWindow(win_name)

(has_input, frame) = sources.read()
if has_input:
    cv.imshow(win_name, frame[...,::-1])
    cv.waitKey(0)

sources.release()


    


    But when I run the program, I have the following errors : I have tried Googling it, but I didn't find any working solutions.

    


    [av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
[av1 @ 0x55e6dc8b0780] Missing Sequence Header.
video file opened successfully
[av1 @ 0x55e6dc97a7c0] Your platform doesn't suppport hardware accelerated AV1 decoding.
[av1 @ 0x55e6dc97a7c0] Failed to get pixel format.


    


    here is the link of video
https://drive.google.com/file/d/1TgY5O6pFLU3eEGsvmU0LoAw6_I8kGM6s/view?usp=sharing
I have no idea how to fix this.