-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for almost-seamless playback of multiple streams (optionally, in a loop) #127
base: master
Are you sure you want to change the base?
Conversation
…ly allocated, use a pointer
…ious file to reduce delays
This has not been throughly tested and should definitely be considered a hack but is doing what I need.
There is some unknown resource leak occuring otherwise.
Conflicts: omxplayer.cpp
Conflicts: omxplayer.cpp
Hi Paski, the seamless loop (of a unique file) is exactly what I need. So, thanks for your awesome collaboration. My question is how to generate the bin file from your code? Any link with instructions? |
Hi! On Tue, Apr 02, 2013 at 06:23:31PM -0700, Manoel Lemos wrote:
Set up a crosscompile environment (sorry, too complex to elaborate, You can also try compiling it on your RPi. It will likely take several
|
I compiled omxplayer on my pi, only took about 40 mins, I was pleasantly I don't expect that your patch would push that out to several hours ;) |
Hmm, I admit that I was trying that on the 256M version and gave up |
Hi @triffid , how do you do that? Can you and/or @pasky also send me the binaries for omxplayer with seamless loop enabled? I'm having a really hard time to setup the crosscompile environment on my iMac with Mountain Lion. And also, can you send me some links with instructions on how to compile it on the RasPi and also on my mac machine? |
@mlemos on the pi just do make ffmpeg; make like it says in README.md no idea about the mac, everything I've ever tried to do on a mac has been hours of frustration so I avoid them at all costs now. |
Manos, you can download the binaries from |
Hi @pasky , thansk for the bin. But one last "dumb" question. How do I make it loop a single movie file? |
Pass omxplayer the -L parameter. |
Hey @pasky, thansk a lot man!!! It's working just fine here. Do you know if the amount of GPU RAM affects the vide playback experience? |
Hi @pasky, looping with -L works a treat!!! I really appreciate your efforts with this feature. |
Hi! Glad you enjoy it. :) Simply list multiple files on the command |
Hi @pasky, thanks for the reply :) I've tried: and also to ensure it's the same res, fps, etc.: Both stop at the first video. |
Hi, are you sure you are using the latest version I posted? This was an |
I repeated the installation of the binary you posted, and it works now, I must have done something wrong. Do you know of any clever way of storing the filenames in a playlist and having them load into the command using some sort of bash trickery? |
Hi! If you have the filenames in a text file, one per line, try
|
as long as there are no spaces in the filenames, If you might have spaces in filenames, we need a hair more complexity: |
Hi @pasky , it is working just fine for me for small videos. Here is what I get on the output: pi@raspberrypi /mnt/usbdisk1 $ omxplayer -L edit3-the-artist.mov I waited a lot but nothing happened after that. Another thing... do you know why videos being played from the usb disk plays better than videos played from the SD where the OS is installed? |
Thanks @pasky and @triffid, your suggestions for work great for creating a pseudo playlist to play filenames with and without spaces in them. @pasky, I wanted to understand more details to what exactly the files need to have in similar for them to play. I've run about 20 videos through a Handbrake script to reencode them uniformly, however whenever I return after stepping away, omxplayer has stopped. This may have something to do with @mlemos' query too? |
Hi! I'm sorry it doesn't work well for you; it worked fine in my |
@pasky thanks for your great work. Your binaries don't work for me too, so I want to set up my own RPi environment. I tried this RPi_Linaro_GCC_Compilation manual, but I had dozens of errors. Could you help me with some howtos of crosscompiling to RPi? |
@pasky, no worries. I figured out the issue, the audio sample rate's were different, some at 44.1khz and some 48khz. Everything about the videos needs to be the same, including audio codec! I found transcoding all vids through HandbrakeCLI useful for making this happen. |
@pasky I have downloaded your binary dated April 2 2013, pasted into the /home directory, ran sudo tar -zxvf omxplayer-loop-multifile-bin.tar.gz, it unpacked, I then moved to the directory cd /omxplayer-dist/usr/bin, ran ./omxplayer file1.mp4 file2.mp4, and only one file runs then i get a have a nice day and it exits or stops. I also tried ./omxplayer file1.mp4 file1.mp4, it plays the file 1 time and exits, same as above. I could not get the command to take the -L option. Unless it was -l which is something else I suppose according to the documentation (start position, etc...) What am I doing wrong? Any help would be greatly appreciated. Thanks |
Hi! If you also have system-wide omxplayer installed, ./omxplayer |
thanks @pasky, I did edit the script, now the loop function command is accepted. The issue now is... it returns meanwhile the file1.mp4 plays, but file2.mp4 never plays and it freezes. I have to end process to exit. Any suggestions. This appears to the issue that was happening from your February patch, i downloaded the patch from April. If anyone has suggestions i would greatly appreciate them. Thanks |
I have just evaluated your branch. Starting with the Big Bucks Bunny h264 to a youtube MP4. The first play stutters very badly on the logo scene (also with your master branch). It stutters less with the current huceke master. I don't see any transition between the two video's at all, it hangs after the first. |
This might be exactly what I'm looking for. However, being quite new in the Linux environment, I'm wondering how to install the new omxplayer replacing the one I already have in my Raspberry Pi? |
Has anyone successfully compiled from source code natively on the R-Pi? I am running Raspbian and would love to be able to accomplish this. When running make ffmpeg I get errors - unable to create the executable arm-unknown-linux-gnueabi-gcc. I do not know how to set up a cross compiler. I would need to make some changes to parameters that are output to the console for a project I am working on, but need to be able to compile. Anybody have a solution that they are able to provide? Thanks in advance. |
I have compiled it on Arch Linux without any hassles even on 256MB Pi. |
thanks for quick respnse @skinkie You have cross compiled on Arch Linux? Have you compiled on pi itself with Raspbian? I may be forced to cross compile, if so there is the headache of setting that up. Do you have the steps involved in this? Thanks |
My Pi runs Arch Linux. |
@skinkie Ok, |
Has anyone a binary for PI, Debian distro? |
It worked excellent before, but now, since I did a rpi-update, the video freezes on the last frame and plays no more. |
I am having the same problem as MrOaiki. Any ideas or fixes? thread nextreader 0x1bdd760 (0) -Edit (add) |
I solved it by re-installing omxplayer. I simply removed the folder and all subfolders and copied a fresh version. 28 jan 2014 kl. 23:48 skrev Tom Lemmons [email protected]:
|
Hi @pasky, thank you for great work. |
I also testet to checkout the "multiplestream" branch from https://github.com/pasky/omxplayer.git and compile it. After finish it, I have the same not smooth playback result. |
Hi! The code in pasky/omxplayer branch multiplestreams adds support for:
(i) Loop option (similar to another fork)
(ii) Multiple filenames on the command line
While running omxplayer in a shell loop causes gaps of about 2s between videos and dark screen with bunch of text in the meantime, with this patch the last frame of previous video is frozen for about 200ms (unless there is other load) before next video starts. The next video in the queue is opened and scanned by ffmpeg on the background while the current video is playing.
This is probably not ready for prime-time yet; at the very least, we should make some effort to gracefully handle (likely just by reinitializing OMX state) transitions between streams with different parameters.
Also, the current code contains not-so-few gotos and other ugly things. This is the main purpose of this pull request at this point, I would like to propose significant refactoring of the current main() function so that the above mentioned can be implemented much more sanely and maintainably. Basically, my idea is to create class OMXPlayer that will handle playback of a single file. Then, the main() function would just parse parameters (setting OMXPlayer attributes appropriately), take care of setting up OMXReader, call the OMXPlayer loop function, interpret keystrokes. All the stream-handling, feeding and synchronizing logic would be in the OMXPlayer class.
Does that sound sane? Would you accept a pull request containing such changes? Or would you prefer a different approach?