
Recherche avancée
Autres articles (13)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
La gestion des forums
3 novembre 2011, parSi les forums sont activés sur le site, les administrateurs ont la possibilité de les gérer depuis l’interface d’administration ou depuis l’article même dans le bloc de modification de l’article qui se trouve dans la navigation de la page.
Accès à l’interface de modération des messages
Lorsqu’il est identifié sur le site, l’administrateur peut procéder de deux manières pour gérer les forums.
S’il souhaite modifier (modérer, déclarer comme SPAM un message) les forums d’un article particulier, il a à sa (...)
Sur d’autres sites (3345)
-
FFmpeg stream giving me "Alsa" errors
14 mars 2019, par Sherman B.Of late I have been trying different ways of telling my Raspberry Pi to send video to YouTube live stream. One of the things I wanted to be able to do is boot the Pi up, and it automatically starts the live stream on its own. The advantages to this are huge (won’t have to tote around keyboard/mouse to start the stream, or have to ssh into the Pi to start the stream).
Now what I did to accomplish this was to make a Python program that pipes the stream from my encoder(FFmpeg) directly to the stream. My goal was to make the program work, and then, set it to run automatically. But every time I run the file in my terminal this is my result :
Traceback (most recent call last):
File "stream.py", line 22, in <module>
stream.stdin.close()
NameError: name 'stream' is not defined
[h264 @ 0x19ed450] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
pi@raspberrypi:~ $ Input #0, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264, none, 25 tbr, 1200k tbn, 50 tbc
Unknown input format: 'alsa'
</module>Now I think I can fix I can fix some of those errors, but the biggest thing that worries me there is : the fact that "alsa" is unknown. I installed "libsasound" which is supposed to make Alsa usable, but that clearly did not help.
I am using Python 3.
This is my syntax for this program :
import subprocess
import picamera
import time
YOUTUBE="rtmp://a.rtmp.youtube.com/live2/"
KEY = ("MY PERSONAL ENCODER KEY")
stream_cmd = 'ffmpeg -f h264 -r 25 -i - -itsoffset 5.5 -fflags nobuffer -f alsa -ac 1 -i hw:1,0 -vcodec copy -acodec aac -ac 1 -ar 8000 -ab 32k -map 0:0 -map 1:0 -strict experimental -f flv ' + YOUTUBE + KEY
stream_pipe = subprocess.Popen(stream_cmd, shell=True, stdin=subprocess.PIPE)
camera = picamera.PiCamera(resolution=(640, 480), framerate=25)
try:
now = time.strftime("%Y-%m-%d-%H:%M:%S")
camera.framerate = 25
camera.vflip = True
camera.hflip = True
camera.start_recording(stream.stdin, format='h264', bitrate = 2000000)
while True:
camera.wait_recording(1)
except KeyboardInterrupt:
camera.stop_recording()
finally:
camera.close()
stream.stdin.close()
stream.wait()
print("Camera safely shut down")
print("Good bye")Now maybe I am missing something simple here, but I don’t know what. I have tried many ideas (e.g. replacing Alsa with some other input, naming the "stream" function.) I have no idea.
-
Choppy Audio while playing Video from StreamingAssets in Unity's VideoPlayer
8 novembre 2017, par Saad AneesI have been trying to load video that I recorded from AVPro Movie Capture (Free Version). The video file was in GB so I converted it using ffmpeg command
-y -i RawVideo.avi -qscale 7 FinalVideo.avi
and saved it toStreamingAssets
. I got the desired result. Now I want to play that converted video file in video player for preview. But the problem is when video is played from URL the audio is very choppy. I played it in windows player and VLC and it was fine. The problem occurs only in Unity’sVideoPlayer
.PreviewVideo Class :
public class PreviewVideo : MonoBehaviour
{
public GameObject VideoSelection;
public GameObject RecordingCanvas;
public GameObject FacebookCanvas;
public GameObject Home;
public Sprite pauseImage;
public Sprite playImage;
public VideoPlayer videoPlayer;
public GameObject EmailCanvas;
// Use this for initialization
void Start ()
{
}
public void Referesh()
{
videoPlayer.gameObject.GetComponent<spriterenderer> ().sprite = Resources.Load<sprite> ("Thumbnails/" + StaticVariables.VideoToPlay);
videoPlayer.url = Application.streamingAssetsPath + "/FinalVideo.avi";
}
public void PlayVideo()
{
if (!videoPlayer.isPlaying) {
videoPlayer.Play ();
}
}
public void Back ()
{
this.gameObject.SetActive (false);
VideoSelection.SetActive (true);
}
public void HomeBtn ()
{
SceneManager.LoadScene (0);
}
public void SendEmailDialogue()
{
EmailCanvas.SetActive (true);
this.gameObject.SetActive (false);
}
public void FacebookShare()
{
FacebookCanvas.SetActive (true);
}
}
</sprite></spriterenderer>Refresh()
is called from RecordingCanvas class :public class RecordingCanvas : MonoBehaviour {
public GameObject VideoSelection;
public GameObject PreviewVideo;
public GameObject Home;
public GameObject canvas;
public RawImage rawImage;
public GameObject videoThumbnail;
float _seconds;
bool canStart = false;
public SpriteRenderer NumSprite;
public VideoPlayer videoPlayer;
WebCamTexture webcamTexture;
Process process;
void Start ()
{
Refresh ();
}
public void Refresh()
{
_seconds = 0;
NumSprite.gameObject.SetActive(true);
webcamTexture = new WebCamTexture (1280, 720);
webcamTexture.Stop ();
rawImage.texture = webcamTexture;
rawImage.material.mainTexture = webcamTexture;
webcamTexture.Play ();
videoPlayer.loopPointReached += VideoEndReached;
videoPlayer.gameObject.GetComponent<spriterenderer> ().sprite = Resources.Load<sprite> ("Thumbnails/" + StaticVariables.VideoToPlay);
videoThumbnail.GetComponent<spriterenderer> ().sprite = Resources.Load<sprite> ("Thumbnails/" + StaticVariables.VideoToPlay);
videoPlayer.clip = Resources.Load<videoclip> ("Videos/" + StaticVariables.VideoToPlay);
}
void Update()
{
_seconds += Time.deltaTime;
print ((int)_seconds);
if (_seconds < 1) {
NumSprite.sprite = Resources.Load<sprite> ("Numbers/3");
}
else if(_seconds <2)
NumSprite.sprite = Resources.Load<sprite>("Numbers/2");
else if(_seconds <3)
NumSprite.sprite = Resources.Load<sprite>("Numbers/1");
if (_seconds >= 3 && _seconds <=4 ) {
canStart = true;
}
if (canStart) {
NumSprite.gameObject.SetActive(false);
canStart = false;
FindObjectOfType<capturegui> ().StartCapture();
videoPlayer.Play ();
videoThumbnail.SetActive (false);
}
}
IEnumerator StartConversion()
{
yield return new WaitForSeconds (1.5f);
process = new Process();
if (File.Exists (Application.streamingAssetsPath + "/FinalVideo.avi"))
File.Delete(Application.streamingAssetsPath + "/FinalVideo.avi");
process.StartInfo.WorkingDirectory = Application.streamingAssetsPath;
process.StartInfo.FileName = Application.streamingAssetsPath + "/ffmpeg.exe";
process.StartInfo.Arguments = " -y -i " + StaticVariables.RawVideo + ".avi " + "-qscale 7 " + StaticVariables.FinalVideo + ".avi";
process.StartInfo.CreateNoWindow = false;
process.EnableRaisingEvents = true;
process.Exited += new EventHandler(Process_Exited);
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.Start();
process.WaitForExit ();
canvas.SetActive (false);
PreviewVideo.SetActive (true);
FindObjectOfType<previewvideo> ().Referesh ();
File.Copy (Application.streamingAssetsPath + "/FinalVideo.avi", @"C:\xampp\htdocs\facebook\images\FinalVideo.avi", true);
this.gameObject.SetActive (false);
}
void Process_Exited(object sender, EventArgs e)
{
process.Dispose ();
}
void VideoEndReached(UnityEngine.Video.VideoPlayer vp)
{
videoPlayer.Stop ();
FindObjectOfType<capturegui> ().StopCapture();
webcamTexture.Stop ();
canvas.SetActive (true);
StartCoroutine(StartConversion ());
}
}
</capturegui></previewvideo></capturegui></sprite></sprite></sprite></videoclip></sprite></spriterenderer></sprite></spriterenderer>I am using Unity version 2017.1.1p4 personal edition. Windows 10 with high end PC. I am making this app for standalone PC.
I am stuck here. Can’t proceed further. Please help me with this issue.
-
Is H.264 used with CRF 0 really strictly lossless ?
23 décembre 2017, par MephistoI am surprised by how small files are when encoded in ffmpeg with the libx264 codec in Constant Rate Factor mode equals zero (-crf 0) that, according to the documentation, is "lossless".
I would like to make sure what the word "lossless" here means. I would like to know if it follows my personal definition of lossless video : After encoding a video, you can confidently bet the life of your mother that, once you play it, the numerical values in the pixels of the restored video will be identically equal (within maybe a factor 0.00001 due to the floating point arithmetic) to the original.
Does the H.264 lossless encoding follow my definition, or do they call it "lossless" because it is visually very close, very beautiful, whatever... ?