Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (103)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (10769)

  • Parse dynamic mpd file with Media Source Extensions

    17 février 2023, par FrankC

    I just started learning about adaptive streaming, and currently I'm working on a project that needs showing a live video. In order to control some of the elements in mpd file, I determined to use MSE instead of dash.js. I refer to the code at the following URL :https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/dn551368(v=vs.85)
But I found out that there is no "Initialization" tag or "range" attribute in my mpd file. I don't find any relative attribute as well. By the way I'm use nginx-rtmp + ffmpeg to generate dash file.
So here is my dash file looks like

    


    &lt;?xml version="1.0"?>&#xA; &#xA;  <period start="PT0S">&#xA;    &#xA;      &#xA;        &#xA;          <segmenttimeline>&#xA;             <s t="0" d="10000"></s>&#xA;             <s t="10000" d="10000"></s>&#xA;             <s t="20000" d="5000"></s>&#xA;             <s t="25000" d="10000"></s>&#xA;          </segmenttimeline>&#xA;        &#xA;      &#xA;    &#xA;  </period>&#xA;&#xA;

    &#xA;

    My question is :&#xA;1.Did I have any missing parameters in using ffmpeg or nginx-rtmp resulting in losting tag in mpd file ?&#xA;2.Or there is other way to setup "Initialization"/"range" attribute and let my program work ?&#xA;3.I also curious about why my mpd file doesn't have a baseURL element ?

    &#xA;

    ※My mpd file works fine with dash.js, I can see the video properly

    &#xA;

    THANKS A LOT

    &#xA;

  • FileNotFoundError when extracting audio from recently saved video using FFMPEG"

    3 août 2023, par Peter Long

    Scenario : I'm using this tool to record tiktok live. I write another script to call the main.pytool because I want to add some additional options, for example, to extract the audio of the live video that is recorded

    &#xA;

    FFMPEG is used to extract the audio. First the video is saved (with FFMPEG) and after I want to extract the audio of that video (again with FFMPEG). The path where the video is recorded and saved is C:\Users\Administrator\Desktop\tiktok

    &#xA;

    The problem is that I see the file and it is saved, but this error is generated as output : FileNotFoundError: [WinError 2] The system cannot find the file specified

    &#xA;

    I can't figure out why it doesn't detect the last saved video file in general

    &#xA;

    I try with this

    &#xA;

    import os&#xA;import subprocess&#xA;import time&#xA;from moviepy.editor import VideoFileClip&#xA;&#xA;def main():&#xA;    # Command to run main.py and record the video&#xA;    cmd = &#x27;python main.py -user ryzebenny -output "C:\\Users\\Administrator\\Desktop\\tiktok" -ffmpeg -duration 30 --auto-convert&#x27;&#xA;    subprocess.run(cmd, shell=True)&#xA;&#xA;    # Wait for the video file to appear in the folder&#xA;    wait_for_video("C:\\Users\\Administrator\\Desktop\\tiktok")&#xA;&#xA;    # Extract audio from recorded video&#xA;    video_filename = find_latest_file("C:\\Users\\Administrator\\Desktop\\tiktok", ".mp4")&#xA;    if video_filename:&#xA;        video_path = os.path.join("C:\\Users\\Administrator\\Desktop\\tiktok", video_filename)&#xA;        audio_filename = video_filename.replace(".mp4", ".mp3")&#xA;        audio_path = os.path.join("C:\\Users\\Administrator\\Desktop\\tiktok", audio_filename)&#xA;&#xA;        video_clip = VideoFileClip(video_path)&#xA;        audio_clip = video_clip.audio&#xA;        audio_clip.write_audiofile(audio_path)&#xA;        audio_clip.close()&#xA;        video_clip.close()&#xA;        print(f"Audio extraction completed: {audio_filename}")&#xA;    else:&#xA;        print("No video files found.")&#xA;&#xA;def wait_for_video(directory):&#xA;    max_wait_time = 60  # Maximum time to wait in seconds&#xA;    start_time = time.time()&#xA;    while time.time() - start_time &lt; max_wait_time:&#xA;        if find_latest_file(directory, ".mp4"):&#xA;            break&#xA;        time.sleep(1)&#xA;&#xA;def find_latest_file(directory, extension):&#xA;    list_of_files = [f for f in os.listdir(directory) if f.endswith(extension) and os.path.isfile(os.path.join(directory, f))]&#xA;    if list_of_files:&#xA;        return max(list_of_files, key=os.path.getctime)&#xA;    return None&#xA;&#xA;if __name__ == "__main__":&#xA;    main()&#xA;

    &#xA;

    but i get this error

    &#xA;

    [*] 2023-08-03 15:57:09 - INFO - START RECORDING FOR 30 SECONDS&#xA;[*] 2023-08-03 15:57:09 - INFO - [PRESS &#x27;q&#x27; TO STOP RECORDING]&#xA;[*] 2023-08-03 15:57:31 - INFO - FINISH: C:\Users\Administrator\Desktop\tiktok\TK_ryzebenny_2023.08.03_15-57-09_flv.mp4&#xA;&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 45, in <module>&#xA;    main()&#xA;  File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 12, in main&#xA;    wait_for_video("C:\\Users\\Administrator\\Desktop\\tiktok")&#xA;  File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 34, in wait_for_video&#xA;    if find_latest_file(directory, ".mp4"):&#xA;       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 41, in find_latest_file&#xA;    return max(list_of_files, key=os.path.getctime)&#xA;           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "<frozen genericpath="genericpath">", line 65, in getctime&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified: &#x27;TK_ryzebenny_2023.08.03_15-57-09.mp4&#x27;&#xA;</frozen></module>

    &#xA;

    Instead, I expect that once I save the video (in .mp4) the audio of that video will be extracted afterwards

    &#xA;

  • Why is audio bitrate value of ffprobe output higher ?

    9 mars 2023, par 19xlr95

    When I check audio bitrate of my video via OS file details, media players or ffprobe -i my_video.mp4, I get the bitrate is 128 kbps. And I want to get more detailed meta information of the video by ffprobe -loglevel 0 -print_format json -show_format -show_streams my_video.mp4. However audio bitrate value of the output is 128615 bps.

    &#xA;

    I thought it should be 128000 not 128615. Or 128 x 1024 = 131072. I wonder why it is not one of the values that I assumed. Also how can I safely say that this 128615 bps is 128 kbps ?

    &#xA;

    Below is the detailed meta information for my video.

    &#xA;

    {&#xA;    "streams": [&#xA;        {&#xA;            "index": 0,&#xA;            "codec_name": "aac",&#xA;            "codec_long_name": "AAC (Advanced Audio Coding)",&#xA;            "profile": "LC",&#xA;            "codec_type": "audio",&#xA;            "codec_tag_string": "mp4a",&#xA;            "codec_tag": "0x6134706d",&#xA;            "sample_fmt": "fltp",&#xA;            "sample_rate": "48000",&#xA;            "channels": 2,&#xA;            "channel_layout": "stereo",&#xA;            "bits_per_sample": 0,&#xA;            "initial_padding": 0,&#xA;            "id": "0x1",&#xA;            "r_frame_rate": "0/0",&#xA;            "avg_frame_rate": "0/0",&#xA;            "time_base": "1/48000",&#xA;            "start_pts": 0,&#xA;            "start_time": "0.000000",&#xA;            "duration_ts": 965760,&#xA;            "duration": "20.120000",&#xA;            "bit_rate": "128615",&#xA;            "nb_frames": "946",&#xA;            "extradata_size": 2,&#xA;            "disposition": {&#xA;                "default": 1,&#xA;                "dub": 0,&#xA;                "original": 0,&#xA;                "comment": 0,&#xA;                "lyrics": 0,&#xA;                "karaoke": 0,&#xA;                "forced": 0,&#xA;                "hearing_impaired": 0,&#xA;                "visual_impaired": 0,&#xA;                "clean_effects": 0,&#xA;                "attached_pic": 0,&#xA;                "timed_thumbnails": 0,&#xA;                "captions": 0,&#xA;                "descriptions": 0,&#xA;                "metadata": 0,&#xA;                "dependent": 0,&#xA;                "still_image": 0&#xA;            },&#xA;            "tags": {&#xA;                "creation_time": "2023-02-20T09:00:58.000000Z",&#xA;                "language": "deu",&#xA;                "handler_name": "Core Media Audio",&#xA;                "vendor_id": "[0][0][0][0]"&#xA;            }&#xA;        },&#xA;        {&#xA;            "index": 1,&#xA;            "codec_name": "h264",&#xA;            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",&#xA;            "profile": "High",&#xA;            "codec_type": "video",&#xA;            "codec_tag_string": "avc1",&#xA;            "codec_tag": "0x31637661",&#xA;            "width": 1080,&#xA;            "height": 1920,&#xA;            "coded_width": 1080,&#xA;            "coded_height": 1920,&#xA;            "closed_captions": 0,&#xA;            "film_grain": 0,&#xA;            "has_b_frames": 0,&#xA;            "sample_aspect_ratio": "1:1",&#xA;            "display_aspect_ratio": "9:16",&#xA;            "pix_fmt": "yuv420p",&#xA;            "level": 42,&#xA;            "color_range": "tv",&#xA;            "color_space": "bt709",&#xA;            "color_transfer": "bt709",&#xA;            "color_primaries": "bt709",&#xA;            "chroma_location": "left",&#xA;            "field_order": "progressive",&#xA;            "refs": 1,&#xA;            "is_avc": "true",&#xA;            "nal_length_size": "4",&#xA;            "id": "0x2",&#xA;            "r_frame_rate": "50/1",&#xA;            "avg_frame_rate": "50/1",&#xA;            "time_base": "1/50000",&#xA;            "start_pts": 0,&#xA;            "start_time": "0.000000",&#xA;            "duration_ts": 1006000,&#xA;            "duration": "20.120000",&#xA;            "bit_rate": "20958903",&#xA;            "bits_per_raw_sample": "8",&#xA;            "nb_frames": "1006",&#xA;            "extradata_size": 35,&#xA;            "disposition": {&#xA;                "default": 1,&#xA;                "dub": 0,&#xA;                "original": 0,&#xA;                "comment": 0,&#xA;                "lyrics": 0,&#xA;                "karaoke": 0,&#xA;                "forced": 0,&#xA;                "hearing_impaired": 0,&#xA;                "visual_impaired": 0,&#xA;                "clean_effects": 0,&#xA;                "attached_pic": 0,&#xA;                "timed_thumbnails": 0,&#xA;                "captions": 0,&#xA;                "descriptions": 0,&#xA;                "metadata": 0,&#xA;                "dependent": 0,&#xA;                "still_image": 0&#xA;            },&#xA;            "tags": {&#xA;                "creation_time": "2023-02-20T09:00:58.000000Z",&#xA;                "language": "und",&#xA;                "handler_name": "Core Media Video",&#xA;                "vendor_id": "[0][0][0][0]"&#xA;            }&#xA;        }&#xA;    ],&#xA;    "format": {&#xA;        "filename": "my_video.mp4",&#xA;        "nb_streams": 2,&#xA;        "nb_programs": 0,&#xA;        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",&#xA;        "format_long_name": "QuickTime / MOV",&#xA;        "start_time": "0.000000",&#xA;        "duration": "20.120000",&#xA;        "size": "53309460",&#xA;        "bit_rate": "21196604",&#xA;        "probe_score": 100,&#xA;        "tags": {&#xA;            "major_brand": "mp42",&#xA;            "minor_version": "1",&#xA;            "compatible_brands": "isommp41mp42",&#xA;            "creation_time": "2023-02-20T09:00:58.000000Z"&#xA;        }&#xA;    }&#xA;}&#xA;

    &#xA;

    I checked 1 kbps is 1000 bps and assumed 128 kbps of the audio bitrate should be 128000 bps. But it is 128615 bps when I run ffprobe.

    &#xA;