Skip to content
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

transcoding: update to ffmpeg 2 #323

Closed
wants to merge 83 commits into from
Closed

transcoding: update to ffmpeg 2 #323

wants to merge 83 commits into from

Conversation

pimzand
Copy link
Contributor

@pimzand pimzand commented Jan 23, 2014

No description provided.

Adam Sutton and others added 30 commits December 22, 2013 20:55
This could still be spammy if the signal isn't clean and keeps going
in and out. But that's just tough luck I guess!
This works fine for most native compilations, so saves spec'ing anything else.
I don't actually check for valid MC group address, I simply try and add group
and just warn if it fails (but carry on anyway).
I was not properly checking completion on table completion and CAT processing
was not marking that table as complete (ever).
This is useful for validating new code against older versions (and newer).
This occurs where compressing small, already compressd files, typically images.

I could avoid compression of very small (or already compressed) files. But its
simple to keep things uniform and fixing this makes sense anyway!
linuxdvb: fix typo in diseqc toneburst switch setting.  Fixes #1856
This affects IPTV where there is only 1 input, if 2 services have the same PIDs
then both services were receiving each others packets and causing a mess!

I think later on I should really remove the transport list from the input and
have it on the mux? I think I did it this way to keep some things simpler, but
it's caused confusion here.

This should fix #1875.
At the moment the configuration is global so starting another mapping will
override existing config.
src/descrambler/cwc.c:493:11: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
  if (len < 0) return -1;
      ~~~ ^ ~
- works with same hardcoded values (needs to setup)
- setup via gui is missing
adamsutton and others added 18 commits January 12, 2014 22:31
src/descrambler/capmt.c:485: warning: comparison is always false due to limited range of data type
src/descrambler/capmt.c:487: warning: comparison is always false due to limited range of data type
src/descrambler/capmt.c:538: warning: comparison is always false due to limited range of data type
src/descrambler/capmt.c:549: warning: comparison is always false due to limited range of data type
@ghost ghost assigned john-tornblom Jan 23, 2014
@adamsutton
Copy link
Contributor

This will break things on older systems. So it needs more work.

@pvagner
Copy link

pvagner commented Jan 26, 2014

Hello,
This is not yet complete I guess. The commit contains changes in variable types and function name changes however functional changes are not yet taken into account.
This is on arch linux with ffmpeg version 2.1.3.
Here is the log output: http://pastie.org/8669760

@FutureCow
Copy link

I got the same error as pvagner. Using Debian.

@pvagner
Copy link

pvagner commented Feb 4, 2014

With ffmpeg 1.X or 2.X we currently have issues transcoding audio. The problem is that sample format of input format is not supported by the output encoders. I haven't looked how older versions of ffmpeg or libav handled that but we should also use libavcodec functionality to compute and properly align buffers for storing the audio data and also use svresample to adjust the sample format. This is my first attempt with ffmpeg so I am really slow at figuring things out. I don't know if I will be able to turn this theory into usefull code but I think we should make the audio transcoding work similar how video transcoding is done now. This is currently failing even with ffmpeg 1.1 which appears as supported according to the ./configure checks.

@mwk6411
Copy link

mwk6411 commented Feb 7, 2014

I was playing with this as well, may I ask how you are sure it is an input format ? I have been working to understand the new FFMpeg as well, and making changes to use the AVFRAME structures and ffmpeg malloc's, new audio4 calls etc.

@mwk6411
Copy link

mwk6411 commented Feb 7, 2014

I am at the point where the FFMpeg calls video and audio decode calls return -22 but not sure what/where that error means ?

2014-02-06 17:44:03.698 transcode: 1:MPEG2VIDEO 1280x720 ==> VP8 854x480

2014-02-06 17:44:03.699 transcode: 2:AC3 ==> VORBIS

2014-02-06 17:44:03.826 transcode: Unable to decode video (-22)

2014-02-06 17:44:04.211 transcode: Detected framedrop in audio

2014-02-06 17:44:04.211 transcode: Unable to decode audio return (-22)

2014-02-06 17:44:04.211 transcode: Unable to decode audio len (0)

2014-02-06 17:44:23.700 webui: Stop streaming /stream/channel/e4c6a5f90633ca17e1b706706d919d56?transcode=1&mux=webm&acodec=VORBIS&vcodec=VP8&scodec=NONE&resolution=480&bandwidth=0&language

I also need to track back why the output codecs are getting mixed away from x264/aac this is with git versions of ffmpeg/tvheadend from less than a week ago

@pvagner
Copy link

pvagner commented Feb 7, 2014

I am having issues transcoding audio even with ffmpeg 0.10 and ffmpeg 1.1. I don't have error message with me at this time however I have found out that decoding mpeg2 audio results in s16 sample format audio. This sample format is not supported by the aac nor vorbis encoders. openning the either of these codecs resulted in a sample format invalid or not supported errors. Also I have noticed some warnings that the data is not properly aligned and it's why I assume audio transcoding needs some work and the way on how to fix sample format issue is by using libswresample I guess.
I would rather like to make this working with the current implementation because tvheadend developers are focusing on ubuntu which uses libav rather than ffmpeg plus their libavcodec and libav format libraries are somewhat outdated to compare with more upstream friendly distros like arch linux, open suse and fedora. Still I have no usefull code so this is pure speculation. Unfortunatelly I have no idea about error -12.

@adamsutton
Copy link
Contributor

@pimzand Dropping this, transcoding may have to be removed for licensing reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet