[SOLVED] - Video Snaps not Playing
-
Pi Model or other hardware: Pi3b
Power Supply used: default
RetroPie Version Used: 4.4
Built From: Retropie download
USB Devices connected: Logitech USB Controller
Problem is in EmulationStation
File: /home/pi/RetroPie/roms/<system>/gamelist.xml
Attachment of config files:
How to replicate the problem: Not sure yetStarted building this image from ground up, everything was going fine, then I ran into an issue where I noticed that 4 (Ir-freeintv, lr-picodrive, advmame-0.94, lr-beetle-pce-fast) out of the 20 or so emulators' snaps were not playing. I'm currently focused on the mastersystem (lr-picodrive) as it seems very strange.
Here is snippet of just one of the roms in the gamelist.xml:
<game id="914" source="ScreenScraper"> <path>./Ace of Aces.7z</path> <name>Ace of Aces</name> <desc>Ace of Aces is a 1st person, 2D flight simulation. You're onboard a British RAF Mosquito, maverick fighter bomber. Your mission ... stop enemy trains, intercept the terrible german V-1 buzz bombs, sink the german U-boats and down the Nazi bombers. Are you ready for this challenge?</desc> <image>./boxart/Ace of Aces.png</image> <video>./snap/Ace of Aces.mp4</video> <thumbnail /> <rating>0.15</rating> <releasedate>19910101T000000</releasedate> <developer>Artech Studios</developer> <publisher>Artech Studios</publisher> <genre>Shoot'em Up</genre> <players>1</players> </game>
And of the command line to show the roms / png / mp4 names all match:
pi@retropie:~/RetroPie/roms/mastersystem $ pwd /home/pi/RetroPie/roms/mastersystem pi@retropie:~/RetroPie/roms/mastersystem $ ls boxart/Ace\ of\ Aces.png boxart/Ace of Aces.png pi@retropie:~/RetroPie/roms/mastersystem $ ls snap/Ace\ of\ Aces.mp4 snap/Ace of Aces.mp4 pi@retropie:~/RetroPie/roms/mastersystem $ ls | grep Ace\ of\ Aces.7z Ace of Aces.7z
I've restarted EmulationStation and tried to manually edit the gamelist.xml several times changing the name of the rom and mp4 to see if anything changes, but snap still doesn't play. The rom plays fine in either case.
Where should I start?
-
Your videos might by at fault. Depending on the scraping source, they could be using a video codec that's not supported by the video player. Which video player are you using to play the videos ? Try using the internal Vlc player to see if they play.
-
@mitu Thanks for the reply, very interesting. Am I executing it properly?:
pi@retropie:~/RetroPie/roms/mastersystem/snap $ vlc Ace\ of\ Aces.mp4
If so, I received same errors from mp4's that do (NES) and do not (MasterSystem) play in ES.
What does this mean?
-
@wiggy808 said in Video Snaps not Playing:
If so, I received same errors from mp4's that do (NES) and do not (MasterSystem) play in ES.
Which errors exactly?
Here's a way to show us the codecs of the video(s) in question. You'll have to run these commands:
sudo apt install libav-tools # install libav-tools if necessary avprobe /home/pi/Retropie/roms/mastersystem/snap/Ace\ of\ Aces.mp4 2>&1 | grep Stream # display the codecs of all streams in the file
Then show us the output of the last command. The first command
sudo apt …
is only needed once to make sureavprobe
is installed. All text behind#
in a line is only a comment an can be omitted.edit: Some nonsense removed. 😋
-
@Clyde Here is the output, looks the same (minus the kb/s) for both an mp4 that works in ES (all NES snaps work, I chose 1942.mp4 at random), and the mp4's that don't work in ES (all for the mastersystem, in this case I chose Ace of Aces at random).
Master Systems Ace of Aces tested (don't mind the "Europe" I renamed the mp4 during some more testing):
pi@retropie:~ $ avprobe /home/pi/RetroPie/roms/mastersystem/snap/Ace\ of\ Aces\ \(Europe\).mp4 2>&1 | grep Stream Stream #0.0(und): Video: h264 (High), yuv420p, 320x240 [PAR 1:1 DAR 4:3], 78 kb/s, 30 fps, 30 tbn, 60 tbc (default) Stream #0.1(und): Audio: aac, 48000 Hz, stereo, fltp, 126 kb/s (default)
NES 1942 tested:
pi@retropie:~ $ avprobe /home/pi/RetroPie/roms/nes/snap/1942\ \(Japan\,\ USA\).mp4 2>&1 | grep Stream Stream #0.0(und): Video: h264 (High), yuv420p, 320x240 [PAR 1:1 DAR 4:3], 394 kb/s, 30 fps, 30 tbn, 60 tbc (default) Stream #0.1(und): Audio: aac, 48000 Hz, stereo, fltp, 107 kb/s (default)
Were you still interested in the errors from vlc running on the command line, or should I try something else? I didn't put it in the OP because the NES ones play fine, so didn't think it was relevant or the cause.
-
@wiggy808 Okay, the most common reason for non-working videos isn't the case here (yuv444 instead of yuv420, because ES' hardware-accelerated OMX player only plays the latter).
Yes, the VLC errors are still interesting, too. My post was meant to check on both the errors and the encoding.
edit: Does it change anything if you turn hardware acceleration in Emulation Station on or off? ("Other Settings" > "Use OMX Player (HW Accelerated)")
edit 2: You could try to reencode the video without any changes to its codecs to see if it plays then. It may correct any errors we don't see in the stream info.
avconv -y -i input.mp4 output.mp4
Change "input" and "output" to the resp. paths+filenames.
(From Retropie 4.4 on,
avconv
was replaced byffmpeg
, but it remains as an working alias, so I still use it for backwards compatibility with RP 4.3 and before.) -
same issue, i'm trying to re-encode on my computer to get compatibility with retropie
-
i've resolved with this command:
ffmpeg -i input.mp4 -vf format=yuv420p output.mp4
than i re-upload the video inside media/vidoes
-
-
-
@Clyde my video were yuv 4.4.4 and after the conversion they became yuv420p. To check if all was good use the command:
ffprobe -v verbose input.mp4
I've noticed that i still have 2 videos that doesn't work also after the encoding and i'm thinking it could be a VBR video codec issue but i'm not sure...
-
@hyuma Thanks for the information. Yuv444 is a known problem for OMX player. There are at least two scripts to fix that for multiple videos, one by myself and one from @hiulit.
But @wiggy808's videos are already in yuv420p (at least the Ace of Aces video is), so alas, it's not that issue. I'm curious if re-encoding his/her videos will change anything.
Let's stay tuned. :)
-
Wow, good job with the script, @Clyde! I still have 2 mp4 that doesn't work also in yuv420p and i can't understand why... Here you can find the media information of video:
https://paste.ofcode.org/JfKAGPpCB7EJg7vtYkC7Az
if you can tell me why this video doens't work you will be very helpful for me! thanks
-
@hyuma Thanks for the compliment. My script isn't nearly as sophisticated as @hiulit's, but it does its job in the spirit of the Unix Philosophy #1, "make each program do one thing well". 😊
Alas, I can't say much about your media information, as I know next to nothing about video internals. But maybe someone else here can.
That said, did you compare the media data of the non-working videos to that of the working videos? That may give away some clues.
-
yes I've compared and the only difference comes from VBR against CBR... but the videos working as screensaver... only in preview they doesn't work...
-
@hyuma Check if
- You're using
omxplayer
for video previews, should be an Emulationstation setting. - The theme you're using has video preview support and the Gamelist View Style is set to
video
in the Emulationstation UI Settings.
- You're using
-
Just got in gang, thanks for the replies, I'm going to test now and post in a few minutes the results.
-
@mitu yes i have both, but as I said video preview works but not all preview are working and i'm trying to understand why..
-
@hyuma What theme are you using ? If you play the video from the CLi with
omxplayer <video_file>
do you get any errors or the playback is ok ? -
@mitu I tested various theme also with basic theme i had the problem, now I'll try that command to see which error i get. ;)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.