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
Libav 11beta #476
Libav 11beta #476
Conversation
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
…ng functions. Added conversion/resampling functionality. Added using of libav audio fifo buffer. Works with latest git master of libav. Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
…only once. Second we now try to determine the best fitting sample_fmt and channel_layout for the encoder. Based on was is has available. Tested with encoder MPEG2, AAC and Vorbis. Signed-off-by: Michel Verbraak <info@1st-setup.nl>
|
Finalized the update to the latest version of libav and using the new decoding and encoding functions. |
|
Trying this out with a recent (today) git build of libx264 and libav, seems to go ok to begin with but no video (sound is transcoded and plays) then this line appears in the log: "transcode: No output from avcodec_encode_video2()" Relevent parts of the log: http://pastebin.com/kb0uvjuk Any ideas? |
…uffer. Signed-off-by: Michel Verbraak <info@1st-setup.nl>
|
I have just made a small change. It did a reset of an index when it did not receive a fully encoded packet. But not getting an encoded packet and not receiving an error means the encoder needs more data which probably will come in on the next packet to decode and encode. |
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
|
I just ran a test in converting MPEG2VIDEO 720x576 ==> H264 600x480 and tvheadend crashed. Currently investigating. |
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
…m. Now they are. Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
The flushing should only be done completely at the end when no more new packet will receive. In our case never as the listening end most of the time already closed the connection. Signed-off-by: Michel Verbraak <info@1st-setup.nl>
|
Video conversion to H264 is now working. Only audio is out of sync. Probably has to do with the fact that the pts is not set alright. Next thing on the todo list. |
…a complete header." This reverts commit 7936b84.
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
|
Please try this latest version. |
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
|
VP8 and MPEG2 are working well for me (sidenote: the tvhclient android app calls for mpeg2 using "MPEG4VIDEO" instead of "MPEG2VIDEO" and so doesn't work) H264 shows a single frame forever whilst audio plays as normal. P.S is VP8 meant to be really heavy on the cpu or do I have another problem? |
|
On my machine VP8 also uses more cpu than h264. Are you using my Cast branch of TVHClient where the mpeg2/mpeg2video problem is in? |
|
I was using the Google play store version as I did not know you had modified it, I'll try your version! |
|
Compiled and Installed latest git master of libav and running this branch but when trying: /stream/channel/0d0f074e16d0a199820f702044bf657a?mux=mpegts&acodec=aac&vcodec=H264&transcode=1&resolution=576 I'm still getting errors: |
|
Did you compile libav with an aac library into it. Like fdk-aac (https://github.com/mstorsjo/fdk-aac.git). My configure line for libav is: ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/ --shlibdir=/usr/lib/x86_64-linux-gnu/ --enable-libfdk_aac --enable-nonfree --enable-shared --enable-vaapi --enable-libvpx --enable-libvorbis --enable-libx264 --enable-gpl |
|
And if you want to know more about libav aan aac see https://wiki.libav.org/Encoding/aac |
|
Thanks for the extra help. I hadn't done all that but I have now. But I'm still getting the same errors. |
|
Merged (in one patch) - 4e098bd . Some updates: .. but it does not work with my ffmpeg libs (previous code didn't work either): DEBUG]:transcode: Using decoder mpeg2video DEBUG]:transcode: Using encoder libx264 INFO]:transcode: 5:MPEG2VIDEO 720x576 ==> H264 480x384 DEBUG]:transcode: Using decoder mp2 DEBUG]:transcode: Using encoder libvorbis INFO]:transcode: 2:MPEG2AUDIO ==> VORBIS ERROR]:transcode: Unable to decode video (-22) WARNING]:transcode: Detected framedrop in audio TRACE]:transcode: Decoded packet. length-consumed=-22 from in-length=768, got_frame=0 TRACE]:transcode: Did not have a full frame in the packet ERROR]:transcode: Unable to decode audio (-22) Also. I would recommend to use valgrind to check for leaks (and there are many)... |
|
perexg what is the source of your stream? Satellite or something else. When Satellite which one. I am in Europe and have a satellite. Maybe I can reproduce. Which OS are you running on and which version of libav? |
|
I'm using ffmpeg which might be the culprit.. Also other on IRC reports that ffmpeg support is broken with this change... ffmpeg-libs-2.1.5-1.fc20.x86_64 |
|
My patch only works with libav and then also latest git (tag v11 will work) |
|
OK, Made some fixes in da9b9b5 . Could you check with libav ? |
|
i got an compile error src/plumbing/transcoding.c:875:10: error: ‘AVFrame’ has no member named ‘channels’ |
|
Fixed in 930bd97 . |
|
builds now fine |
During my tests of streaming to a ChromeCast dongle the audio most of the times did not come through or was distorted.
Therefore I tried to fix it in the code and this is the result.
It still contains extra debug lines and I can remove them.
It can now also down or upsample channels on request but I have not yet changed this in the code so you can specify this on the GET URL.