Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (108)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (8915)

  • How to flatten a VR video to display in normal screen ? [closed]

    14 mai 2023, par d-b

    I am not sure about the terminology here, but I have a VR-video that is intended to be shown using a headset with separate screens for each eye. It is not 3D in the sense that when you turn your head you will see something different, it is just "2,5D" so you get a sense of depth when looking at it. There are two video channels that are more or less identical, they are just recorded with slightly different angle, similar to how human eyes see the world. I hope this makes it clear what type of video I have, otherwise please ask for clarification in a comment (and if there is a special terminology for this type of video, please let me know).

    


    More details : the original video is 4320x2160, basically 2 square channels at 2160 x 2160.

    


    I want to show this video undistorted on a regular screen.

    


    I have read the following questions here on SO :

    


      

    1. How to reproject and join these two clips with ffmpeg ?

      


    2. 


    3. Flatten 360 fisheye video

      


    4. 


    5. How to de-warp 180 degree or 360 degree fisheye video with ffmpeg ?

      


    6. 


    7. Flatten 360 fisheye video

      


    8. 


    9. Unwarping 180 VR Footage with FFmpeg v360 Filter

      


    10. 


    


    (and problably a few more).

    


    I think I want to extract the two video channels (note that they are in the same video stream, not like in a movie where you can have several separate audio streams for different languages) into separate files and then "undistort" them.

    


    (3) gave me a command to splitting the video into two files :

    


    ffmpeg -i -myclip.mp4 -filter_complex "[0]crop=iw/2:ih:0:0[left];[0]crop=iw/2:ih:ow:0[right]" -map "[left]" -map 0:a /tmp/left.mp4 -map "[right]" -map 0:a /tmp/right.mp4


    


    That seemed to have worked as expected but then I also need to "undistort" the content because it was filmed with some fisheye lens or something like that (straight lines not in the absolute centre of the image are more or less circular).

    


    (5) suggested this command :

    


    ffmpeg -i left.mp4 -vf "v360=input=hequirect:output=flat:h_fov=100:v_fov=67.5:w=1280:h=720" leftfixed.mp4


    


    but that produced an output that was 4320x2160 (obviously only from one channel, since input was just one channel) but just the centre of the original image, I estimate the content to be the 500x250 px (upscaled to 4320x2160, so very blocky) of the midpoint of the original image.

    


    How can I "undistort" this video so it looks good on a 2D-screen while the size is preserved ?

    


  • ffmpeg doesn't work when the script is launched by cron - No protocol specified, Cannot open display :0.0

    14 janvier 2024, par a k

    ffmpeg in my script doesn't work when the script is launched by cron of the root

    


    Error : No protocol specified, Cannot open display :0.0

    


    OS : Ubuntu 20.04

    


    #!/bin/bash
log=/var/log/log2/log2.txt

echo ______________ $(date) >> "$log"
echo "$""DISPLAY" "=      "  "$DISPLAY" >> "$log" ;
echo whoami '         ' $(whoami) >> "$log" 
echo pwd '            ' $(pwd) >> "$log" 
echo "$""USER" "=" '        ' "$USER" >> "$log"
echo PATH '           ' "$PATH" >> "$log"
echo which ffmpeg '   ' $(which ffmpeg)>> "$log" 
echo whereis ffmpeg ' ' $(whereis ffmpeg) >> "$log" 
echo "\nls -l /bin/* | grep ffmpeg" '        ' >> "$log"
ls -l /usr/bin/* | grep ffmpeg >> "$log"
echo "ls -l /var/log | grep log2" ' '>> "$log"
ls -l /var/log | grep log2 >> "$log"

ffmpeg -y -f x11grab -s 1366x768 -i :0.0 -r 25 /var/log/log2/test.mp4 -loglevel error 2>>"$log" &

echo "pid ffmpeg ""$""!"" = " "$!" >> "$log" 
sleep 5
kill "$!"
echo exit >> "$log"
exit


    


    When Cron (Cron of the root) launches the script, ffmpeg shows the error "No protocol specified, Cannot open display :0.0"

    


    /var/log/log2/log2.txt :

    


    ______________ ven. 05 mai 2023 04:10:01 CEST
$DISPLAY =       
whoami           root
pwd              /root
$USER =          
PATH             /usr/bin:/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 04:09 log2
pid ffmpeg $! =  74590
No protocol specified
[x11grab @ 0x56244aa06740] Cannot open display :0.0, error 1.
:0.0: Input/output error
exit


    


    When I launch the script manually as a not-root user (with sudo), everything work correctly :

    


    ______________ ven. 05 mai 2023 04:10:47 CEST
$DISPLAY =       :0
whoami           root
pwd              /home/an
$USER =          root
PATH             /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 04:09 log2
pid ffmpeg $! =  74618
exit


    


    When I launch the script manually as the root, everything works correctly :

    


    ______________ ven. 05 mai 2023 04:11:27 CEST
$DISPLAY =       :0
whoami           root
pwd              /root
$USER =          root
PATH             /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 04:11 log2
pid ffmpeg $! =  74683
exit


    


    When crontab of an ordinary user launches the script, it works correctly :

    


    $DISPLAY =       
whoami           an
pwd              /home/an
$USER =          
PATH             /usr/bin:/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 05:05 log2
pid ffmpeg $! =  77601
exit


    


    I have tried to put into the script :

    


    export DISPLAY=":0"

    


    export DISPLAY=":0.0"

    


    export DISPLAY=":1"

    


  • mov : Do not blindly disable advanced edit lists if use_mfra_for is set

    20 avril 2023, par Derek Buitenhuis
    mov : Do not blindly disable advanced edit lists if use_mfra_for is set
    

    This was a bug/mistake in dae3679a9bfa421829ef9049ae2167089a2fdef7.

    use_mfra_for by defintion only has an effect on fragmented MP4 files,
    making the check not only redundant, but also broken if a user used
    the option globally (i.e. set on non-fragmented MP4s).

    Signed-off-by : Derek Buitenhuis <derek.buitenhuis@gmail.com>

    • [DH] libavformat/mov.c