Quantcast

ffmpeg for DLNA

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ffmpeg for DLNA

Serguei Miridonov
Hello,

Probably this or similar question has been already asked... I'm trying to use
minidlna server (https://sourceforge.net/projects/minidlna/) for playing back
AVCHD video recorded by Panasonic camcorder on TV connected to DLNA capable
Samsung BD-C6900 blu-ray player. In general, this setup works but...

1. Every short scene recorded by the camcorder is stored as separate file
   (h.264 + ac3 streams in a mpeg-ts container).
2. The player and minidlna server play every file separately.
3. Buffering time for every file is quite long (several seconds).

So, when playing back complete unedited video, most of the time is spent for
buffering between files.

I would like to add a capability to minidlna server to represent a sequence of
files as a continuous mpeg-ts stream, so that buffering will be only at the
beginning of the playback or when jumping forth and back over video.

As I see, this will require to read TS from the files, fix DTS and PTS for all
video/audio packets to play them smoothly, and stream them to the player. Do I
miss anything?

My question is basically this: is ffmpeg library set a right thing to do this
task? I have experience in programming but never dealt with any MPEG video. So,
any links to similar software using ffmpeg will be appreciated.

Thank you and best regards,

Serguei.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg for DLNA

rogerdpack2
> As I see, this will require to read TS from the files, fix DTS and PTS for all
> video/audio packets to play them smoothly, and stream them to the player. Do I
> miss anything?

It might work with "broken" PTS times for the packets, as well.
One thing related (though off topic) might be VLC's "sout-keep" and
mencoder's "reindex" ffserver might work here, too.
cheers!
-roger-
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg for DLNA

Serguei Miridonov
On Thursday 11 August 2011, Roger Pack wrote:
> > As I see, this will require to read TS from the files, fix DTS and PTS
> > for all video/audio packets to play them smoothly, and stream them to
> > the player. Do I miss anything?
>
> It might work with "broken" PTS times for the packets, as well.

I'm not sure. I tried just to concatenate files and play them but this does not
work well.

> One thing related (though off topic) might be VLC's "sout-keep" and
> mencoder's "reindex" ffserver might work here, too.

Thank you for your reply. Unfortunately, these words still mean nothing to me.
Any links to the docs or some examples?

I'm going to start to dig into ffmpeg APIs but they are huge. As I see, I need
to check only one or two layers: stream container and packets/frames without
video/audio decoding:

1. open an input file
2. get streams info
3. open output MPEG transport stream
4. loop: (get packet/frame, fix DTS/PTS, send it to the output stream)
5. open next input file, and so on.

I would appreciate if someone familiar with ffmpeg API shows me a right
direction: where to start. Is there anything like "ffmpeg for idiots"? :)

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg for DLNA

rogerdpack2
> I'm not sure. I tried just to concatenate files and play them but this does not
> work well.

Did you try concatenating them with ffmpeg or mencoder? (make a separate file).
Cheers!
-roger-
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg for DLNA

Serguei Miridonov
On Thursday 11 August 2011, Roger Pack wrote:
> > I'm not sure. I tried just to concatenate files and play them but this
> > does not work well.
>
> Did you try concatenating them with ffmpeg or mencoder? (make a separate
> file). Cheers!

No, here I meant the concatenation by cat command. This did not work even though
files were just MPEG transport streams. They do not contain a header like AVI
files, right?

If I concatenate them using mencoder with -vc copy -ac copy options, it works
quite well. But I believe that mencoder recalculates DTS and PTS to make frames
really sequential, so this was not a simple concatenation of streams.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...