Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (108)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

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

Sur d’autres sites (11978)

  • matplotlib 3D linecollection animation gets slower over time

    15 juin 2021, par Vignesh Desmond

    I'm trying to animate a 3d line plot for attractors, using Line3DCollection. The animation is initally fast but it gets progressively slower over time. A minimal example of my code :

    


    def generate_video(nframes):

    fig = plt.figure(figsize=(16, 9), dpi=120)
    canvas_width, canvas_height = fig.canvas.get_width_height()
    ax = fig.add_axes([0, 0, 1, 1], projection='3d')

    X = np.random.random(nframes)
    Y = np.random.random(nframes)
    Z = np.random.random(nframes)

    cmap = plt.cm.get_cmap("hsv")
    line = Line3DCollection([], cmap=cmap)
    ax.add_collection3d(line)
    line.set_segments([])

    def update(frame):
        i = frame % len(vect.X)
        points = np.array([vect.X[:i], vect.Y[:i], vect.Z[:i]]).transpose().reshape(-1,1,3)
        segs = np.concatenate([points[:-1],points[1:]],axis=1)
        line.set_segments(segs)
        line.set_array(np.array(vect.Y)) # Color gradient
        ax.elev += 0.0001
        ax.azim += 0.1

    outf = 'test.mp4'
    cmdstring = ('ffmpeg', 
                    '-y', '-r', '60', # overwrite, 1fps
                    '-s', '%dx%d' % (canvas_width, canvas_height),
                    '-pix_fmt', 'argb',
                    '-f', 'rawvideo',  '-i', '-',
                    '-b:v', '5000k','-vcodec', 'mpeg4', outf)
    p = subprocess.Popen(cmdstring, stdin=subprocess.PIPE)

    for frame in range(nframes):
        update(frame)
        fig.canvas.draw()
        string = fig.canvas.tostring_argb()
        p.stdin.write(string)

    p.communicate()

generate_video(nframes=10000)


    


    I used the code from this answer to save the animation to mp4 using ffmpeg instead of anim.FuncAnimation as its much faster for me. But both methods get slower over time and I'm not sure how to make the animation not become slower. Any advice is welcome.

    


    Versions :
Matplotlib : 3.4.2
FFMpeg : 4.2.4-1ubuntu0.1

    


  • Playing RTP stream on Android 4.1.2 (Jelly Bean) [closed]

    27 décembre 2024, par Homie_Tomie

    I'll try to keep it quick. Using FFMPEG I started a stream on my PC. Here is the code :

    


    import subprocess

def start_stream():
    command = [
        'ffmpeg',
        '-f', 'gdigrab',  # Desktop capture (Windows)
        '-framerate', '15',  # Low framerate for higher performance
        '-i', 'desktop',  # Capture desktop
        '-c:v', 'libx264',  # Video codec (H.264)
        '-preset', 'ultrafast',  # Ultra-fast encoding preset for minimal latency
        '-tune', 'zerolatency',  # Zero latency for real-time streaming
        '-x264opts', 'keyint=15:min-keyint=15:no-scenecut',  # Frequent keyframes
        '-b:v', '500k',  # Low bitrate to minimize data usage and reduce latency
        '-s', '800x480',  # Resolution fits phone screen and helps performance
        '-max_delay', '0',  # No buffering, instant frame output
        '-flush_packets', '1',  # Flush packets immediately after encoding
        '-f', 'rtp',  # Use mpegts as the container for RTP stream
        'rtp://192.168.72.26:1234',  # Stream over UDP to localhost on port 1234
        '-sdp_file', 'stream.sdp'  # Create SDP file
    ]
    
    try:
        print("Starting stream...")
        subprocess.run(command, check=True)
    except subprocess.CalledProcessError as e:
        print(f"Error occurred: {e}")
    except KeyboardInterrupt:
        print("\nStream interrupted")

if __name__ == "__main__":
    print("Starting screen capture...")
    start_stream()


    


    Now, when I start the stream I can connect to it in VLC when I open up the stream.sdp file. Using the same method I can open up the stream on my iPhone, but when I try to open it on my old Android phone the stream connects but the screen is black. However, when I turn the screen I can see the first frame that was sent to the phone. Why does the stream not work ?

    


    I will be thankful for any and all advice :)

    


  • iOS Radio App : Need to extract and stream audio-only from HLS streams with video content

    20 décembre 2024, par Bader Alghamdi

    I'm developing an iOS radio app that plays various HLS streams. The challenge is that some stations broadcast HLS streams containing both audio and video (example : https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8), but I want to :

    


    Extract and play only the audio track
Support AirPlay for audio-only streaming
Minimize data usage by not downloading video content
Technical Details :

    


    iOS 17+
Swift 6
Using AVFoundation for playback
Current implementation uses AVPlayer with AVPlayerItem
Current Code Structure :

    


    class StreamPlayer: ObservableObject { @Published var isPlaying = false private var player: AVPlayer? private var playerItem: AVPlayerItem?

func playStream(url: URL) {
    let asset = AVURLAsset(url: url)
    playerItem = AVPlayerItem(asset: asset)
    player = AVPlayer(playerItem: playerItem)
    player?.play()
}



    


    Stream Analysis : When analyzing the video stream using FFmpeg :

    


    CopyInput #0, hls, from 'https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8':
  Stream #0:0: Video: h264, yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps
  Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp



    


    Attempted Solutions :

    


    Using MobileFFmpeg :

    


    let command = [
    "-i", streamUrl,
    "-vn",
    "-acodec", "aac",
    "-ac", "2",
    "-ar", "44100",
    "-b:a", "128k",
    "-f", "mpegts",
    "udp://127.0.0.1:12345"
].joined(separator: " ")

ffmpegProcess = MobileFFmpeg.execute(command)

I


    


    ssue : While FFmpeg successfully extracts audio, playback through AVPlayer doesn't work reliably.

    


    Tried using HLS output :

    


    let command = [
    "-i", streamUrl,
    "-vn",
    "-acodec", "aac",
    "-ac", "2",
    "-ar", "44100",
    "-b:a", "128k",
    "-f", "hls",
    "-hls_time", "2",
    "-hls_list_size", "3",
    outputUrl.path
]



    


    Issue : Creates temporary files but faces synchronization issues with live streams.

    



    


    Testing URLs :

    


    Audio+Video : https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8
Audio Only : https://mbcfm-radio.mbc.net/mbcfm-radio.m3u8

    



    


    Requirements :

    


      

    • Real-time audio extraction from HLS stream
    • 


    • Maintain live streaming capabilities
    • 


    • Full AirPlay support
    • 


    • Minimal data usage (avoid downloading video content)
    • 


    • Handle network interruptions gracefully
    • 


    


    Questions :

    


      

    • What's the most efficient way to extract only audio from an HLS stream in real-time ?
    • 


    • Is there a way to tell AVPlayer to ignore video tracks completely ?
    • 


    • Are there better alternatives to FFmpeg for this specific use case ?
    • 


    • What's the recommended approach for handling AirPlay with modified streams ?
    • 


    


    Any guidance or alternative approaches would be greatly appreciated. Thank you !

    


    What I Tried :

    


      

    1. Direct AVPlayer Implementation :
    2. 


    


      

    • Used standard AVPlayer to play HLS stream
    • 


    • Expected it to allow selecting audio-only tracks
    • 


    • Result : Always downloads both video and audio, consuming unnecessary bandwidth
    • 


    



    

      

    1. FFmpeg Audio Extraction :
    2. 


    


    let command = [
    "-i", "https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8",
    "-vn",                    // Remove video
    "-acodec", "aac",        // Audio codec
    "-ac", "2",              // 2 channels
    "-ar", "44100",          // Sample rate
    "-b:a", "128k",          // Bitrate
    "-f", "mpegts",          // Output format
    "udp://127.0.0.1:12345"  // Local stream
]
ffmpegProcess = MobileFFmpeg.execute(command)



    


    Expected : Clean audio stream that AVPlayer could play
Result : FFmpeg extracts audio but AVPlayer can't play the UDP stream

    



    

      

    1. HLS Segmented Approach :
    2. 


    


    swiftCopylet command = [
    "-i", streamUrl,
    "-vn",
    "-acodec", "aac",
    "-f", "hls",
    "-hls_time", "2",
    "-hls_list_size", "3",
    outputUrl.path
]



    


    Expected : Create local HLS playlist with audio-only segments
Result : Creates files but faces sync issues with live stream

    



    


    Expected Behavior :

    


      

    • Stream plays audio only
    • 


    • Minimal data usage (no video download)
    • 


    • Working AirPlay support
    • 


    • Real-time playback without delays
    • 


    


    Actual Results :

    


      

    • Either downloads full video stream (wasteful)
    • 


    • Or fails to play extracted audio
    • 


    • AirPlay issues with modified streams
    • 


    • Sync problems with live content
    •