
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (36)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (6685)
-
FFmpeg starting manually but not with Systemd on boot
23 juin 2021, par eKrajnakOn Raspberry Pi 4 B 4GB with official Debian 10 image, I have /home/pi/run.sh script with following :


#!/bin/bash
ffmpeg -nostdin -framerate 15 -video_size 1280x720 -input_format yuyv422 -i /dev/video0 -f alsa -i hw:Device \
 -af acompressor=threshold=-14dB:ratio=9:attack=10:release=1000 -c:a aac -ac 2 -ar 48000 -ab 160k \
 -c:v libx264 -pix_fmt yuv420p -b:v 3M -bf 1 -g 20 -flags +ilme+ildct -preset ultrafast \
 -streamid 0:0x101 -streamid 1:0x100 -mpegts_pmt_start_pid 4096 -mpegts_start_pid 0x259 -metadata:s:a:0 language="" -mpegts_service_id 131 -mpegts_transport_stream_id 9217 -metadata provider_name="Doesnt matter" -metadata service_name="Doesnt matter" \
 -minrate 3500 -maxrate 3500k -bufsize 4500k -muxrate 4000k -f mpegts "udp://@239.1.67.13:1234?pkt_size=1316&bitrate=4000000&dscp=34" -loglevel debug < /dev/null > /tmp/ff3.log 2>&1



Script is starting from console without problems. It takes audio from USB sound card and video from USB camera and creates UDP stream to IPTV. Then I created Systemd service :


[Unit]
Description=Streamer
After=multi-user.target sound.target network.target

[Service]
ExecStart=/home/pi/run.sh
KillMode=control-group
Restart=on-failure
TimeoutSec=1

[Install]
WantedBy=multi-user.target
Alias=streaming.service



After restarting Raspberry, script has started, but FFmpeg hangs on error failures in log :


cur_dts is invalid st:0 (257) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (256) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (257) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (256) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (257) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (256) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (257) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (256) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)



and will not start streaming to UDP target. But, if I manually login to SSH and issue systemctl stop streaming and then systemctl start streaming Ffmpeg starts successfully. What's different with service auto-start on boot ?


Setting the "sleep timeout" at script begginging will not help. However, removing audio stream from FFmpeg config looks to solve auto-start on boot.


-
Pass embedded closed captions with FFmpeg
4 décembre 2020, par AndrewI am taking an HLS stream and outputting it through a DeckLink card to convert it to SDI. I need to pass the CEA-708 closed captions that are embedded in the stream, and it has to happen live. This is the command I'm currently using :



ffmpeg.exe -loglevel info -re -i https://my-url.m3u8 -c:v wrapped_avframe -pix_fmt uyvy422 -vf scale=1280x720 -c:a pcm_s16le -ar 48000 -ac 2 -f decklink -s 1280x720 -r 60000/1001 -b:v 4M "DeckLink SDI (2)"



I have tried adding the
-teletext all
command to no avail.


Here is the output of FFprobe :



Input #0, hls, from 'https://my-url.m3u8':
 Duration: N/A, start: 83023.890600, bitrate: N/A
 Program 0
 Metadata:
 variant_bitrate : 998000
 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 640x360, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Metadata:
 variant_bitrate : 998000
 Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 158 kb/s (default)
 Metadata:
 variant_bitrate : 998000
 comment : Master Audio
 Stream #0:2: Data: timed_id3 (ID3 / 0x20334449)
 Metadata:
 variant_bitrate : 998000
 Program 1
 Metadata:
 variant_bitrate : 658000
 Stream #0:3: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 480x270, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Metadata:
 variant_bitrate : 658000
 Stream #0:4(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 158 kb/s (default)
 Metadata:
 variant_bitrate : 658000
 comment : Master Audio
 Stream #0:5: Data: timed_id3 (ID3 / 0x20334449)
 Metadata:
 variant_bitrate : 658000
 Program 2
 Metadata:
 variant_bitrate : 1958000
 Stream #0:6: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 960x540, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Metadata:
 variant_bitrate : 1958000
 Stream #0:7(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 158 kb/s (default)
 Metadata:
 variant_bitrate : 1958000
 comment : Master Audio
 Stream #0:8: Data: timed_id3 (ID3 / 0x20334449)
 Metadata:
 variant_bitrate : 1958000
 Program 3
 Metadata:
 variant_bitrate : 2658000
 Stream #0:9: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Metadata:
 variant_bitrate : 2658000
 Stream #0:10(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 158 kb/s (default)
 Metadata:
 variant_bitrate : 2658000
 comment : Master Audio
 Stream #0:11: Data: timed_id3 (ID3 / 0x20334449)
 Metadata:
 variant_bitrate : 2658000
Unsupported codec with id 100358 for input stream 2
Unsupported codec with id 100358 for input stream 5
Unsupported codec with id 100358 for input stream 8
Unsupported codec with id 100358 for input stream 11




As you can see, closed captions are embedded in each of the VBR streams, but are getting stripped during the transcode to SDI. How can I pass these to view them ?


-
AVFrame with NV12 format breaks using D3D11 HW acceleration
5 décembre 2024, par faith0058I have a
ffmpeg-autogen
video decoder, im trying to use aD3D11
as HW accelerator, but the frame i get in result(withNV12
format) is broken. If im doing the same withVulkan
as accelerator, everything works fine, butvulkan
uses more graphic card resources..

For rendering i use OpenTK, received frames i convert to RGB with textures and shaders.


Below my decoder initialization.


public VideoStreamDecoder(AVCodecParameters* parameters, AVCodec* codec)
{
 AVCodec* _codec = codec;
 
 _pCodecContext = ffmpeg.avcodec_alloc_context3(_codec);

 ffmpeg.av_hwdevice_ctx_create(&_pCodecContext->hw_device_ctx, AVHWDeviceType.AV_HWDEVICE_TYPE_D3D11VA, null, null, 0).ThrowExceptionIfError();

 ffmpeg.avcodec_parameters_to_context(_pCodecContext, parameters).ThrowExceptionIfError();
 ffmpeg.avcodec_open2(_pCodecContext, _codec, null).ThrowExceptionIfError();

 CodecName = ffmpeg.avcodec_get_name(_codec->id);
 FrameSize = new Size(_pCodecContext->width, _pCodecContext->height);
 PixelFormat = _pCodecContext->pix_fmt;

 _pFrame = ffmpeg.av_frame_alloc();
 _receivedFrame = ffmpeg.av_frame_alloc();
}



And frames reading function


public bool TryReadNextFrame(out AVFrame frame, AVPacket packet)
{
 int error;

 do
 {
 ffmpeg.avcodec_send_packet(_pCodecContext, &packet).ThrowExceptionIfError();

 error = ffmpeg.avcodec_receive_frame(_pCodecContext, _pFrame);

 } while (error == ffmpeg.AVERROR(ffmpeg.EAGAIN));

 error.ThrowExceptionIfError();

 ffmpeg.av_hwframe_transfer_data(_receivedFrame, _pFrame, 0);
 //here i get NV12 frame

 var clonedFrame = ffmpeg.av_frame_clone(_receivedFrame);

 frame = *clonedFrame;

 return true;
}



And here is result i get with both accelerators :


Vulkan

normally working

The same camera, but
D3D11

broken

One more intresting moment, is that cameras, that dont work have
yuv420p
format, the only one working withD3D11
hasyuvj420
.

I tried changing format using
sws_scale
from NV12 to NV12, and it worked, but it uses too much CPU.
Also tried changin format to rgb beforeav_hwframe_transfer_data
function and rendering it using Vulkan rendering, it sort of works withVulkan
, but withD3D11
it doesnt.

UPDATE


I noticed, that frame linesize was bigger, than width and tried


_receivedFrame->linesize[0] = _receivedFrame->width;



And it helped, now image looks better, but still not perfect.


UPDATE 2


I triead also

_receivedFrame->linesize[1] = _receivedFrame->width;
and now everything works just as it should, took me whole day to write two lines of code :)